Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership | k5 store

[P]
Diary of a debugger (Diaries)

By llimllib
Mon Sep 29th, 2003 at 07:31:16 AM EST

llimllib's Diary

Been working on an algorithms assignment for about 14 hours straight now.

music: Skatalites - Rough & Tough


4:45: I have to write a program implementing a simulated printer queue. I spent about 4 hours on it yesterday, and I'm on about hour 14 today. This program has been a bastard from start to finish, and I need to have it done in 3.5 hours. I have to do it in MSVC, which sucks. My program keeps b0rking when I switch from debug compilation to -O2.
Fiona Apple - Paper bag

debugging...

4:57: fixed that one, had a long overflow, switched to unsigned long, that seemed to work. Now, however, it seems that my queue never empties.
Pink Floyd - Money

debugging...

5:08: alright, the queue is sometimes empty, and I'm getting reasonable average times, urgent prints go faster than normal ones. The queue never seems to be full, so I've kicked it up to some higher numbers, which leaves me more time to type while I wait for the days to simulate.
Black Star - B Boys Will B Boys

debugging...

5:26: Fucked if I know. Behavior seems random. When I start my search at a high number of jobs per day, the queue is never empty, even as the number decreases. When I start it at a low number, search goes much faster, but the queue is never full, even when they reach the same number. arrggggggh. It's cold outside.
Rage Against The Machine - Guerilla Radio

debugging...

5:43: hands shaking. tired. Considered replacing my queue implementation, decided against it. Not even sure what's messed up. Giving up isn't an option anymore, two hours of sleep would just be worse than not sleeping until I'm done with my classes. Definitely skipping work in the math help room this afternoon.
Lovage - Everyone has a Summer

debugging...

6:05: Wow, breakthrough. I'm still in bad physical shape, my head seems to drift off from my body every once in a while, I'm actually surprised I was coherent enough to make a breakthrough. I wasn't reinitializing the probability that a job will be printed (jobs per day / cycles per workday) when I started a new simulation. This means I've effectively been running and rerunning the same godawful simulation for the past hour, and why the simulation was different if I started it at 4000 jobs per day vs. 10000. Still no sunlight, I'm surprised.
Muddy Waters - Sad Sad day

debugging...

6:50: Sunlight, code improving, documentation being done. I also improved a tricky algorithm by a lot, I think. I have to print this out in 40 minutes if I go to the class, 1:40 if I don't. work.
Beethoven - 6th Symphony (unknown orchestra)

debugging...

7:29: OK, it works. my new algorithm works about 100 times faster than the previous one. Once morning came, I felt a remarkable clarity. Unfortunately, I don't think I have enough time to finish documenting the code and go to class, so I'll be working on his code while he's giving class. My professor doesn't really care, fortunately. I can't wait to get real food.
People Under the Stairs - Acid Raindrops

Sponsors
Voxel dot net
o Managed Servers
o Managed Clusters
o Virtual Hosting


Collocated Linux/FreeBSD Server
As low as $45/month
o Root on your own FreeBSD or Linux server
o Very fast, triple-homed network
o NO hardware or setup fees, unlimited support
Testimonials from K5 Users

Login
Make a new account
Username:
Password:

Note: You must accept a cookie to log in.

Poll
I'm
o insane 0%
o tired 50%
o wired 25%
o all of the above 25%

Votes: 4
Results | Other Polls

Related Links
o llimllib's Diary


View: Display: Sort:
Diary of a debugger | 12 comments (12 topical, 0 editorial, 0 hidden)
On tricky code (5.00 / 1) (#9)
by Guybrush Threepwood on Mon Sep 29th, 2003 at 12:24:04 PM EST
(gt@meleeisland.net) www.lucasarts.com/products/monkey/default.htm

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. -- Brian W. Kernighan

A pint of grog to you, sir.
A pint of grog to you, sir.

I love that quote (none / 0) (#12)
by llimllib on Mon Sep 29th, 2003 at 01:24:48 PM EST
(llimllib at f2o .. org)

can't remember where I read it, maybe Guido van Rossum said it somewhere?

Peace.
[ Parent ]
I'm sorry. (2.50 / 2) (#8)
by tkatchev on Mon Sep 29th, 2003 at 10:28:46 AM EST

The diary of a who?

   -- Signed, Lev Andropoff, cosmonaut.

n. de ^bug er (none / 0) (#11)
by llimllib on Mon Sep 29th, 2003 at 01:24:05 PM EST
(llimllib at f2o .. org)

1. a person who attempts to remove errors from computer programs that *should* work.

Peace.
[ Parent ]
9:03 handed it in (5.00 / 1) (#6)
by llimllib on Mon Sep 29th, 2003 at 09:05:34 AM EST
(llimllib at f2o .. org)

I have a pretty bad stomach ache. I ate half a big bag of pretzels. Not sure whether to stay awake, go to breakfast, take a nap, or what.
Tom Petty - The Joker

Peace.
If you have time (5.00 / 1) (#7)
by Canthros on Mon Sep 29th, 2003 at 10:09:39 AM EST
http://www.punchdrunkmonkeyman.com

Nap.

An hour or two, and no more, 'cause you'll screw up your sleep schedule if you do. Then go to bed early this evening, and be sure to get lunch and dinner.

FWIW, I spent most of my last year of college with a sleep cycle that shifted around the clock about once a week. For about six months, I found myself up all night once a week. Ugh.

--
It's now obvious you are either A) Gay or B) Female, or possibly both.
RyoCokey
[ Parent ]

I'm pretty much there (none / 0) (#10)
by llimllib on Mon Sep 29th, 2003 at 01:21:50 PM EST
(llimllib at f2o .. org)

I have to do work in big bunches, and so I end up slaughtering myself for a few days, then sleeping a few. Usually I'll have a night at 4, and the rest at 1 or 2, but last night was a special exception. I would love to have a regular schedule, but unfortunately, I'm not stable enough to do it.

Peace.
[ Parent ]
Sleep deprivation -> bad code (5.00 / 2) (#3)
by swr on Mon Sep 29th, 2003 at 08:01:48 AM EST

Working into the wee hours of the morning is usually a bad idea.

Once you've slept, you'll probably realize your new algorithm that is 100 times faster has some fatal flaw. That happens pretty often when doing the all-nighter thing. The "extra" time you spend working on the code usually translates into roughly 2x that time in debugging.

In my experience, the only way to reliably get away with an all-nighter is to have the critical stuff finished by 2 or 3 am, then the rest (until work/school starts the next morning) is minor fixes, tweaks, and polish. Trivial stuff is the most one can can reasonably expect to accomplish when sleep deprived.



agreed, kind of (5.00 / 1) (#4)
by llimllib on Mon Sep 29th, 2003 at 08:23:01 AM EST
(llimllib at f2o .. org)

There's a middle period that I reserve for trivial coding, between, say, 4:00 - 6:00. That's when I hit my ebb. I find that the crack of dawn brings me a nice burst of decent coding; not coincidentally, that's when I thought of the far better algorithm.

In general though, I agree that it's better to *try* and avoid such binges, as they do tend to produce shitty code, although they produce a lot of code. As always, it's a tradeoff.

Peace.
[ Parent ]

It's the music (5.00 / 2) (#1)
by vnsnes on Mon Sep 29th, 2003 at 07:41:08 AM EST
(vnsnes at y!)

Jazz, hard rock, blues, classical... you need to get into a groove, man. Get yo-self in the zone, man. ;-) This musical cacophony is messing with your mind.

What were you on, btw? Coffee, Dew, pills?

i was about to post the same thing (5.00 / 1) (#5)
by tps12 on Mon Sep 29th, 2003 at 08:46:52 AM EST
(tps12@columbia...edu)

Also, nothing sets you right after an all nighter than a stiff drink with the sunrise.

[ Parent ]
no drugs (none / 0) (#2)
by llimllib on Mon Sep 29th, 2003 at 07:44:08 AM EST
(llimllib at f2o .. org)

I had an 8oz coffee, but that was at 11:00 or so, and 8oz doesn't do much anyway.

As for the music, the mix keeps me grooving. When I write (prose or poetry, that is) I like less of a mix; usually I'll put on my jazz playlist, or electronics mix, depending on my mood. Nothing beats writing to "Kind Of Blue". When I code, however, I like variety.

Peace.
[ Parent ]

Diary of a debugger | 12 comments (12 topical, 0 editorial, 0 hidden)
View: Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest © 2000 - 2003 Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
Erik Benson is a deadbeat.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories! K5 Store by Jinx Hackwear Syndication Supported by NewsIsFree