It was a programming test in the lab, and while doing a functionality which relies on recurision, I made a terrible, terrible, blunder. It has something to do with tree traversal, so I just copied and pasted an existing function which I have wrote, then proceeded on.
But I couldn’t get the function to work. It’s only after the end of the test then I spot my mistake. I had ‘recurse’ the wrong function.
Let call the function I copied RecurseA and the new one I wrote RecurseB
So I had written:
RecurseB()
{
.
imagine tree traversal code here
.
.
**RecurseA()** < -- OOPS, shall be RecurseB()!!!
.
.
.
}
That’s my sad story. I shall go and drown myself or something.
I guess I should tell one on myself…this happened two weeks ago. Monday to Friday I get up at 7 a.m. Sunday I don’t need to get up until 8:30, and Saturday I can sleep as late as I like.
My alarm clock is the type that turning off the alarm leaves it set to go off again the next morning. Yes, that means as often as not I forget to turn if off for real on Friday night and end up getting woken up early Saturday. This, I’m some what used to: I curse, swat it off, and go back to sleep.
On this Saturday instead of just swatting the alarm off, I figured I might as well be efficient and get it switched to Sunday’s alarm time so I wouldn’t forget to do it that evening.
Yup. The damn thing woke me up again 90 minutes laer. :smack:
Oh man, that last one reminded me…a looong time ago when I was a teenager, I had a regular Saturday morning babysitting gig. One Friday in the late afternoon I decided to take a nap before dinner, and didn’t wake up until (what I thought was) early the next morning. I looked at the clock and it said 6pm, but instead of getting the clue I reset my clock for twelve hours later, thinking it was wrong. It wasn’t until I finally left my room to go get a shower that I realized that my whole family was awake, my mom was cooking dinner, and it was still Friday night.
This happened during the summer, and I still can’t believe I did it!
One night I was feeling kinda off, so I went to bed early, but set my alarm for work the next day (9:00). I woke up in the middle of the night freaking out that I was going to be late. I took a shower, let the dog out, got dressed, put on makeup, exc. Then looked at the clock. Yep, it was 3 in the morning. It hadnt even occured to me that 9:00 in the summer means light coming through the windows, noise from family, exc.
Yea, I yelled at myself for a few minutes then went back to sleep.
I didn’t witness this event firsthand, but my coworker told the story so well that I felt like I was there.
My coworker and his wife are still without power after Hurricane Wilma. This forced him to make a few small changes in his morning routine, such as brushing his teeth by candlelight. So there he was, surrounded by candles, when he spit the mouthwash into the sink. It was only after the resulting fireball singed off a chunk of his hair that he remembered that mouthwash contains alcohol.
He wasn’t burned at all (fortunately), but he had an interesting hairstyle on Friday morning.
I think I can top that. A few months ago I was writing a very simple checksumming function. It looked like this:
int CalcCheckSum(char *pBuffer, int iBufferSize)
{
int iTotal = 0;
int i;
for (i=0; i < iBufferSize; i++)
{
iTotal += pBuffer[iTotal];
}
return iTotal;
}
Can anyone spot the flaw in my algorithm?
The kicker was that I emailed this around to all the other programmers as a “man, I’m dumb” thing, and many of them quite seriously wrote back telling me what the problem was, and my boss (who doesn’t speak English very well) asked “is this a random number generator?”. Yes. Yes it is. More than it’s a checksummer, certainly…
I did take myself off to school one fine Monday morning, shame it was a public holiday. Did I wonder why my father wasn’t up, why there were no schoolkids on the train? No, I have to go the entire hour and a half to school and walk in the gate, then and only then realise. Sometimes I was a dumb kid.
So, I decided to customize a Buffy the Vampire Slayer figure (this one, which is supposed to be Faith). In order to make the figure look better, I was going to swap the hair with the hair from a Tara figure.
Now, for those of you who’ve never done this before (like, say, me), the hair comes off of the figures in one piece, but it needs to be pried off. Since I decided to start my first-ever customing venture during the down time before a gaming session, I had to borrow my husband’s Leatherman to do the prying.
I start prying away at the hair. While doing this, I am ignoring the cardinal rule–namely, to cut away from yourself. I am also behaving as though the blade will lock in the straight position. It doesn’t.
As was to be expected, within about a minute of starting this venture, I removed a small-yet-painful chunk of my thumb. At that point, my husband gave me one of those “dear, I love you, but, for the love of Og stop playing with pointy objects. You have the coordination of a drunk man” looks. Then he went to the bathroom and got me some paper towels without saying a word.
I love him for not pointing out how freakin’ stupid I was.
Last week, I was about to enter a traffic circle on Malik Road. I noticed there was a traffic police car about 200M behind me. I got to the traffic circle and noticed a white Toyota coming around the circle the wrong way. I slowed and exited the traffic circle.
Eager to see what the policeman would do, I kept an eye on my review mirror. He exited the traffic circle 200M behind me.
After all, someone driving the wrong way on a traffic circle is not the sort of thing you write a ticket for!