View Single Post
Old 02-09-2005, 01:10 PM   #5 (permalink)
technobard
Centurion Nova Prime
 
technobard's Avatar
 
Join Date: May 2002
Location: Oak Park, IL (USA)
Posts: 287
technobard is on a distinguished road
I don't remember the worst programming moments because they were so traumatic that my subconscious wiped them from my memory. I'm sorry, what was I saying?

Not too long ago, I was playing with a sorting program. I generated some sample data by creating 10000 and beyond objects. When the sort finished, I printed the first 10 records. Well, the print routine was left over from when I had less than 100 records. I kept looking at the output, thinking that the sort was wrong somehow, because the records appeared to be duplicates. I spent some time poring over the code, but I couldn't find anything wrong. Finally, it dawned on me that the code was fine. I was selecting data from a finite list at random. Within 10000 records there were a lot of duplicates. Doh!
__________________
It takes 2 points to draw a straight line, but at least 3 points to draw a conclusion.
technobard is offline   Reply With Quote