in reply to (OT) What Was Your Most Bone-headed Programming Error?

My dumbest mistakes tend to be in C rather than Perl, e.g.: a tool I wrote some time ago to do simple statistics on digital audio files (8-bin histogram of 16-bit sample values) worked just fine on my sparc, so I put it on a linux box, checked about 30 GB worth of audio files, found them to be "bad" (histograms were just too wacky), and so I deleted those files. (I was trying to validate a particular processing pipeline, and I concluded that something must have gone wrong with the process.)

Then I noticed that when the code detected the byte order of the 16-bit data, it was byte-swapping to big-endian when necessary, in order to get the numbers right -- on the sparc (which made them wrong on i686-linux). Oh well, it would only take a day or so to reconstitute those files... so the delivery would only be that much behind schedule.

  • Comment on Re: (OT) What Was Your Most Bone-headed Programming Error?