Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Programming IT Technology

Programming Marathons? 109

Mattygfunk asks: "Coming to the submission date of a major university project the other day, myself and another group member coded in XHTML/CSS and ASP (yuk!) for 27 hours straight to complete it. What is the longest Slashdot readers have coded in a single session? Apart from being more organized and having plenty of coffee, do you have any tips on getting through ultra-long coding sessions?"
This discussion has been archived. No new comments can be posted.

Programming Marathons?

Comments Filter:
  • The simple answer: (Score:4, Insightful)

    by c0wh ( 445032 ) on Tuesday October 29, 2002 @08:16PM (#4560291)
    Don't.
  • Don't do it (Score:2, Informative)

    by Anonymous Coward
    Plan ahead. Don't wait until the last minute. Your code will be better if you're well organized and on the ball.
  • by Gid1 ( 23642 ) <tom@@@gidden...net> on Tuesday October 29, 2002 @08:24PM (#4560361)
    At university, a few friends and I spent most of a week in a particular terminal room with no windows or natural light, without any sleep. We had left a six-month group project until the week before.

    As I remember it (it's pretty hazy!) we washed Pro-Plus tablets down with a lot of coffee, Coke, Red Bull, etc. I think we were awake for over four days continuously. One of my friends finally went to sleep in an armchair in the common room opposite, just before the deadline. We failed to wake him, even by slapping him. Sometime during the last day, I started shouting rather than speaking, though I wasn't aware of it.

    Believe it or not, we got a passing grade. I have absolutely no recollection of the quality of the code.

    There's one strange phenomenon I experience after a lot of coding: it feels like my hands are connected directly to my shoulders, and my eyes seem to zoom in so the screen fills my vision. I code faster and better, but it's really weird. Does anyone else get this?
    • (incidentally, my friend didn't actually die. He woke up on his own about 18 hours later)
    • There's one strange phenomenon I experience after a lot of coding: it feels like my hands are connected directly to my shoulders, and my eyes seem to zoom in so the screen fills my vision. I code faster and better, but it's really weird. Does anyone else get this?

      I can't program without that phenomenon :) I found a couple brands of music that (ambient psychadellic electronic music) that allow me to really concentrate on the project. Hours will go by and I won't notice...

      Of course, my jobs are typically 30% programming, 70% administration/human-interaction...
      • I get into that state too. I have one album that really gets me there easily. I just put it on "repeat" and go. It's by a guy called Plastikman and the album (or maybe the record label? can't tell) is called Novamute.

        What albums do it for you?

        (And just to stay on-topic - 72 hours baybee!!! And when I came back and looked at it three months later it was all good!)
        • Plastikman is great (Although I don't own any albums yet).

          My current favorites: Boards of Canada, Solvent, Lowfish, Plaid, & Autchre. Two really good labels for this stuff is Warp Records and Suction Records. I find more great stuff everywhere I look.

          I got so bored with electronica that I almost gave up. And then I found this stuff, and it just keeps getting better. It's like electronica, but it's way more complex and creative.

          One thing I'm really curious about: Plastikman, Lowfish, Solvent, and Boards of Canada are all from Canada. There's some undergound cultural revolution happening up there. What's going on?

          If you have access to Internet Radio, I highly reccommend these these two stations [slashdot.org].
      • American Head Charge [headcharge.com] and Smilin Liar [smilinliar.com] do it for me. My longest session is only a lowly 16 hours. I value my sleep when I can get it. It has been proven over and over again that even small naps can help you tackle problems and keep you code a wee bit neater.
    • There's one strange phenomenon I experience after a lot of coding: it feels like my hands are connected directly to my shoulders, and my eyes seem to zoom in so the screen fills my vision. I code faster and better, but it's really weird. Does anyone else get this?

      Nice try!

      It's obvious you are a robot.
    • Um, you don't actually code better, you just *think* you do. Just like blondes *think* they have more fun - it's all about your grip on reality ;)
    • I submitted the story, here are a few interesting stats on our programming marathon.

      Team: Matt and Ben
      Start time: 2.30pm Thursday
      Finish Time: 5.30pm Friday
      University: Deakin University [deakin.edu.au] (yes that meams the story has a spelling error but it was deliberate because /. is US centric and US editors pick the stories)
      Coffees: Matt ~12, Ben ~9
      Ciggie breaks (5 mins): Matt ~15, Ben N/A
      Final URLs: Private (you don't really need them, and I don't particularly wanna hear troll comments on our code)
      Accidental Walk-ins into the wrong computer lab due to lack of sleep: Matt ~4, Ben ~9 (had a shocker)
      Accidential deletions of good code due to lack of sleep / backups: Matt 1, Ben 0
      Final Grade: Not available yet
      Reasons for lack of organisation: Lack of programming ability of the other 3 coders (their code was so useless they weren't even invited to the session, 3rd year computing students using WYSIWYG frontpage code to program HTML!), lack of organisation, under-estimation of the time it would take to complete some code. Of course we had done a very considerable amount of work prior to the start of this final session.
      Dinner/Lunch breaks: Matt - 30 mins dinner, Ben 30 mins dinner/ 10 mins lunch
      Days needed to recover: Matt 2, Ben ??

      I think that covers it.

      -------
      Which came first the paper or the wall? [wallpaperscoverings.com]

      • I want to hear about the shocker. Get Ben to write us all the details.

      • As a senior year computer engineering student, I proudly state that the most complex stuff I can do with HTML is tables. If I need more than that I either need to use wysiwig and cringe at the results, or give it to somebody else to do.

        Yes HTML is popular, but since specifications change frequently (and xml looks to be the future), why should I learn the particulars now?

        Of course, I'm also of the opinion that generally, if it can't be displayed in w3m, its not a useful webpage.
        • Try Adobe GoLive. Generates the cleanest HTML I've seen to date.

          I used to write HTML by hand too. Don't base your opinion of all WYSIWYG editors on FrontPage (yuck). My roommate is the best web designer I've ever met, and he uses nothing but GoLive.


    • I get the same thing. It seems as though the screen consumes my entire attention. This also happens when reading sometimes for longer periods. Music does seem to help get into this "zone" as well. Strange but also kinda cool.

      • From my Kuro5hin post [kuro5hin.org]...

        Once, at my Tedious Retail Job, I was sitting at one of the sales kiosks, which weren't supposed to be used for anything besides selling computers, but I guess it was a quiet enough day that even the managers didn't care.

        I was using PuTTY to get to my laptop, and I had Emacs running with some of the code I was working on. I got interested in one particular problem, and since I seemed to have a clear mental path on how to solve it, I kept working. Some time later, I went to stretch, and I blinked in surprise as I suddenly became aware that I had been unaware of where I was, how much time had passed, which screen and what type of screen I was sitting at, which operating system I was using, and even the existence of the window decorations.

        It was the most extreme form of tunnel vision I've ever experienced. I guess the more accurate term would be "focus", both in the literal visual sense and in the mental sense. It's the most productive time I can remember, and every time I've worked on a block of code for a significant period of time, I've had the benefit of a similar mindset, but never anywhere close to that degree.

        I can't help noticing that this type of focus, which proved extremely helpful in my coding (and also somewhat surreal) is explicitly denied in the corporate environment. The office, it seems, is all about being aware of the image you are presenting at all times, coworkers walking by and saying hi, and various meetings, phone calls, and other interruptions.

        I keep wanting to achieve that level of attention again, but I'm easily distractable and hard to settle down. (For example, I was planning to work on my server code right now.) I just got some candles and little rocks that I set up in a nice arrangement at home; I'm hoping it provides a more conducive environment for meditating and working on code. Maybe one of those little burbling water fountains too...

    • There's one strange phenomenon I experience after a lot of coding: it feels like my hands are connected directly to my shoulders, and my eyes seem to zoom in so the screen fills my vision. I code faster and better, but it's really weird. Does anyone else get this?

      This is called "Tunnel vision" when you only can focus straight ahead. SEE A DOCTOR!!!!!!!

      actually that's probably not at all what tunnel vision is, but it really doesn't sound healthy :-)
    • I'm glad I'm not the only one. We did 30 hours straight once. The horrible thing was that when it was all over and I could go to bed I couldn't sleep! I kept running code paths through my head...it was freaky.

      One of the best reasons to avoid caffine in every day life. When you really need it, it kicks you in the ass!
    • by torpor ( 458 )
      That's called an out of body experience.

      Enjoy!

    • i kinda get that too, thought i was the only one. however, for me, it just comes from a lack of sleep, and i go back and forth between that and the opposite: the screen seems to become 50 feet away, and i feel extremely large, like i was looming 50 feet above the screen. its really odd, and it isnt just a computer screen, its whatever i pay attention to. really odd, but since im so tired, any coding i do is really shitty.
    • I'm not a drug advocate but light doses of speed would work (or ephedrine as a substitute). Be careful however b/c high blood pressure can cause stroke or heart attack.

      In the end it's not worth it to procrastinate on projects or go crazy trying to get them done quickly. The sooner (see my name for intended pun) you learn to schedule/plan your projects the better you will become as a future employee and developer.
    • There's one strange phenomenon I experience after a lot of coding: it feels like my hands are connected directly to my shoulders, and my eyes seem to zoom in so the screen fills my vision. I code faster and better, but it's really weird. Does anyone else get this?

      Sure do... For me it happens after a few hours.
  • Bad for you. Let us not forget our Korean friend that died after playing EverQuest for 80 hours straight. Our human bodies are simply not made for that kind of exertion.
    • well, thats precisely why we have caffine beverages such as the Monster Energy Drink [thinkgeek.com]
    • Bad for you. Let us not forget our Korean friend that died after playing EverQuest for 80 hours straight. Our human bodies are simply not made for that kind of exertion.

      While I agree that you shouldn't sit in one place working on a computer for such an extended period, I would add that our bodies were made for exertion - not for sitting on our backsides all day - and that a lack of regular exercise and/or breaks is also a contributor to physical/mental problems.

      In short - long sessions of physical inactivity of any form are bad for you, whether that be watching TV all day or coding all night.
  • ... that put hair on your chest. I did the same thing once - 27hrs in front of a Sun box, working on a damn OS project. Breaks for food and restroom only. That experience w/ pthreads scarred me for life. hehe - now I'm TA'ing pthreads, go figure. The one thing to take away from that experience is to NEVER do it again. ;) Other than that, congrats.
  • In other words:

    "We partied so hard and were passed out so long that now we have to cram 27 hours of programming into the last 24 hours that we have to complete this project... Since we're already screwed, let's ask Slashdot what we should do!"

  • Programming ASP for 27 hours? You need to attend AA (ASPers Anonymous).

    "Hi, my name is Mattygfunk, and I have a problem."
    "Hi Mattygfunk!"
    "I program in, er, um, ASP."
    "That's ok Mattygfunk, we have all been through rough times in our lives, and with the help of friends and this group, you can make it past this troubled time in your life."
    "Thanks, AA!"
  • That's easy (Score:5, Insightful)

    by devphil ( 51341 ) on Tuesday October 29, 2002 @08:26PM (#4560390) Homepage
    Apart from being more organized and having plenty of coffee, do you have any tips on getting through ultra-long coding sessions?

    Keep a separate piece of paper (sticky note, open text file, whatever) for jotting down reminders on how to do things better/correctly for when the code you're currently slamming out fails, and you need to go back and do it over again.

    Not if it fails, when.

    The human brain requires sleep. Deprive it and your work suffers. Trying to convince yourself (or your boss) of anything else is fucking moronic and a recipe for failure. Maybe you think that's acceptable in the short term, in which case I'm glad I don't work with you on any projects.

    • for jotting down reminders on how to do things better/correctly for when the code you're currently slamming out fails

      Ladies and gentlemen... we have a true-to-form coder here. Don't put the notes in comments, put them in seperate sheets of paper that can be quickly destroyed after the project is compiled and working.

      Remember... the code is the comments! If it was hard to write, it should be hard to read ;)


      ---Lane
  • by cpeterso ( 19082 ) on Tuesday October 29, 2002 @08:31PM (#4560422) Homepage

    What is the longest Slashdot readers have coded in a single session?

    10-15 minutes tops. phew..
  • Yes! (Score:5, Interesting)

    by 3-State Bit ( 225583 ) on Tuesday October 29, 2002 @08:33PM (#4560448)
    Given sufficient quantities of caffeine, humans working in shifts need only about three hours of sleep a day for 4-5 days.
    Of course you were able to stay up for 27 hours. But if you had had 3 hours of sleep after the first 18, your next six would have been far more productive than the 9 hours you actually got to code.
    Also, you'd be amazed how SMART taking a 3-hour break, with code swimming around your head, will make you.
    I think if there's a team up continuously, hard at work on an exciting project, then 5-7 days of 3 hours a night ought to be doable.
    Personally, I have done this (but without a team) on a few weekends, when I had very exciting code I was working on.
    A semi-recent experience: came home friday (not this past one) and coded till 4 in the morning, fell asleep at the keyboard until the sun woke me seven-ish, saw my project on the screen (well, under the screensaver), so I got up, drank a bit of coffee, and sat down and coded continuously until the afternoon, ate something, coded more. I didn't have incentive to finish by monday and be really tired during the beginning of the week, so i went to bed around 9 and slept till 9 in the morning (thus friday and saturday averaged to 7.5 hours of sleep), but I know that I could have again gotten only a few hours of sleep and coded all of sunday as well.
    I think that 48 minus 6 (for sleep) hours of continuous coding is about the extent someone can do without really really pushing herself or himself.

    So, take-home lesson:
    When people say that it really makes a difference to take a break from coding once in awhile, to get your head together and get a big picture of the project, maybe realize some of your mistakes while you still have time to change them, they mean it.

    TAKE BREAKS, PEOPLE!!!!
    At the very least, sleep 3 hours out of every twenty four.

    (On the other hand, I believe that six-hour nights are sustainable indefinitely.)
    • Re:Yes! (Score:3, Insightful)

      by Hast ( 24833 )
      Yeah, I have begun to regularly take a nap during the afternoon. (Preferably after eating.) About an hour or so is quite fine. I can then stay up quite a lot longer and still be functional the next day. (This isn't a "I have to cram before the exam." technique, I use it regularly.)

      If you can half an hour after lunch at work is often a good way to stay productive during the afternoon as well.
    • Given sufficient quantities of caffeine, humans working in shifts need only about three hours of sleep a day for 4-5 days.

      Perhaps, but only if it's a regular 3 hours a night! I've always needed less sleep than most people, but freshman fall in college I overdid it. I started keeping track of how many hours a night I slept (it started out as a contest with others on my hall), and the results were scary: my weekday median was 3.5 hours a night for a month and a half! The thing is, I was getting 1.5 hours one night, pulling an all-nighter the next, and then crashing for 12+ hours on weekends. I was a wreck.

      I find that a good, regular 6 hours a night is plenty sustainable, though 7 is about perfect.

      And more on the topic of the post, there was that one week with 44 computer lab hours in 5 days (around a full class schedule)...
    • TAKE BREAKS, PEOPLE!!!! At the very least, sleep 3 hours out of every twenty four.

      What about that sleep pattern to take 20 minutes of sleep every 4 hours? Anyone has any experience with programming marathons using such a sleep? I'd consider it a "programming marathon," since a 20 minutes of sleep is less than half an hour break to eat something. I'd like to hear any stories, but I personally don't know anybody who sleeps that way.

      • If I'm not mistaken, this is very similar to how Thomas Edison worked. He took cat naps regularly pretty much wherever he happened to be. (There are many pictures of him snoozing on desks, tables etc).
        From what I know, this is how he always functioned.
  • by Twintop ( 579924 ) <david@twintop-tahoe.com> on Tuesday October 29, 2002 @08:33PM (#4560449) Homepage Journal
    While I haven't gone quite 27 hours, I have gone 18+ hours in Perl and PHP. These are the only pieces of advice I can offer:

    -Windows open: Fresh Air + Sunlight = GOOD!
    -Music up: Radio or playlist, either way try to get a variety of songs/music you know.
    -Multitask: Well, this might make it not an exclusive coding session, but having AOL IM/ICQ open to talk to people makes it more bareable than it would be otherwise. Also, having an internet window open just at a random site makes it easy to take short 30 second 'breaks'.
    -Swivel Chair/Titlty Chair: So you can move around some and 'stretch' out.
    -Coffee/Mountain Dew/Jolt/Bawls/Etc: 'nough said
    -Food: Good snacks that don't really drain you. For me, these include things like Cashews, Chex Party Mix, and Kettle Chips (if you haven't had these potato chips, SHAME ON YOU!). Avoid anything that is really sugar-rich though, as it'll give you that little boost, then kill ya and make you want to sleep. Wanting to sleep=bad code.
    • Coffee/Mountain Dew/Jolt/Bawls/Etc: 'nough said
      [snip]
      Avoid anything that is really sugar-rich though, as it'll give you that little boost, then kill ya and make you want to sleep.
      Aren't you contradicting yourself there? Mountain Dew, Jolt and a lot of soft drinks have quite a bit of sugar (and caffiene) in them... of course, drinking a lot of those plus inhaling candy bars might make it even worse :)
    • by isorox ( 205688 ) on Tuesday October 29, 2002 @08:54PM (#4560589) Homepage Journal
      having an internet window open just at a random site makes it easy to take short 30 second 'breaks'

      Cnn or something, a page updated with a short story every few hours. Whatever you do - DONT have slashdot, or any site where you can start typing (Forums, usenet etc). I am 1 1/2 hours into a coding session so far. I've opened one rxvt and typed "vi Lexer.java" - unimpressive.

      Other tips I find help
      • Dont be hungry. Start getting hungry? Order a pizza (online).
      • Warmth. I find if I'm at home and dont put a pair of socks on I curl up in my seat, not very efficent
      • Have everything you need at hand, however keep your work area clear
      • Set a goal. Decide "OK, I'll work on this module until 3AM". If you have left it that late you'll be daunted at the amount of work you have to do. Quickly sketch a time plan, using no more then 2/3rds of your available time. Dont forget unexpected events (crashes etc).
      • Give yourself more time for ironing out missing semi-colons etc.
      • Dont get stressed, but be aware of the time. I did an all nighter in my first year in uni - had xplanet on the screen. The horizon moved over india, then the middle east, then greece. I liked it anyway.
      • Dont make last minute fixes. You'll break 5 other things.
      • Incremental backups. maybe a cron job, tar your files at least every hour, preferably every ten minutes.
      • Keep a paper version log. Write down what you've done so far - with a pen. It will give your hands a change of pace for starts.
      • Do pullups, go for a run, press ups etc. Every 20 or 30 minutes. Complete break for 5 minutes. Even if its just going to the local 24/7 to get some more caffine.
      • DONT READ SLASHDOT (again). Very important.

      • On this backup stuff, An even better idea is to teach yourself to use cvs or something similar. CVS is braindead easy to install, it will take 15 minutes of a competent unix guy's time. When you start a new project, make a new module. Train yourself to do "cvs commit -m 'blahblahblah'" after every major accomplishment, and every time you get up from the keyboard for a cigarette. Not only do you have a backup incase of rm problems, you also have a version history for when you decide that the change in direction you made an hour ago sucked and you want to revert.
      • by Permission Denied ( 551645 ) on Tuesday October 29, 2002 @11:37PM (#4561471) Journal
        I've opened one rxvt and typed "vi Lexer.java"

        Excellent start. vi is the proper editor for these sessions.

        The problem with Emacs? You're writing a lexer. You probably have a bunch of similar-looking statements for various keywords. Each statement is probably a little bit different, so cut-and-paste becomes tedious. Or, perhaps you have a table of thirty numbers in hex, which change using some complicated pattern. Perhaps there's some way to automate this, so you can lay out some sort of table, and have Emacs generate code and automatically indent it? Of course Emacs can do that. Why, all you have to do is read in the first character using thing-at-point, convert it to an integer and then use a bit of recursion...of course, this could be more generally useful, so you might as well add it to your .emacs - ah, but you forgot to call save-excursion, so it's not a very user-friendly function...

        STOP! No Lisp programming. Must write lexer.

        Warmth. I find if I'm at home and dont put a pair of socks on I curl up in my seat, not very efficent

        No, no, no. Must keep it cold. When it's warm, it's too easy to fall asleep. The colder, the better. If the temperature bothers you, repeat after me: Cold is the mind-killer. I will allow cold to pass over me. Cold is the mind-killer.

        Incremental backups. maybe a cron job, tar your files at least every hour, preferably every ten minutes.

        One word: CVS :) Important for larger projects, critical for marathons. cvs diff can answer the eternal question of "WTF was I thinking?"

        Dont be hungry. Start getting hungry? Order a pizza (online).

        Again, too easy to fall asleep after eating. Warm with full belly = nap time.

        My own suggestion? Lots of liquids. You can only consume so much caffeine before experiencing psychadelic effects, so you'll also need water, and lots of it. This is not a preventative measure, but is rather disaster recovery: if you do fall asleep, you won't sleep long before the call of nature, and when you get up, you'll feel so guilty about "lying down for a moment" that you'll write your best code.

        Good luck with the project - I imagine you're probably at the parser at this point, so go get those S/R conflicts :)

    • -Windows open: Fresh Air + Sunlight = GOOD!

      I like a quiet mostly dark room myself, but frequent breaks to the outside are great!

      -Swivel Chair/Titlty Chair: So you can move around some and 'stretch' out.

      When I was in retail prison, I used to try to sell this chair [officedepot.com] all the time ("Wow, your 6yo girl's first homework setup? Try this chair! It'll, um, last her for life..."), because it's comfortable! If only it leaned backwards a little farther. Just don't let those silly stripey-shirted inquisitive helpful salesbots fool you: it already has the good fabric (might be nice in a black and dark green, though...).

      -Music up: Radio or playlist, either way try to get a variety of songs/music you know.

      Back when I had bandwidth, Digitally Imported [digitallyimported.com] would protect me. Now that those fee guidelines are in place, can it even push me down the stairs anymore? :( (Sorry, long night...)

      -Coffee/Mountain Dew/Jolt/Bawls/Etc: 'nough said

      Bzzt! Tea. Hot, high-quality green or herbal tea, such as ginger.

      -Food: Good snacks that don't really drain you. For me, these include things like Cashews, Chex Party Mix, and Kettle Chips (if you haven't had these potato chips, SHAME ON YOU!). Avoid anything that is really sugar-rich though, as it'll give you that little boost, then kill ya and make you want to sleep. Wanting to sleep=bad code.

      Just had that happen. I had a good 6hrs sleep before coming to work, which is usually plenty for me to make it through the night. I didn't feel like making anything, so I grabbed a can of SpaghettiOs. Big mistake. After consuming half the can of starch/sugar, I immediately passed out on the floor for 3hrs. (I work nights at a hotel, and it's allowed, but still.)

      Sugar is poison in large quantities. Ever wonder why jellies and jams don't really go bad?

      Avoid anything sugar-rich or massively starchy, period. It'll make you fat and kill your energy in general, plus for me it causes skin problems. Protein and some fat, mostly; that'll keep you energetic for the long haul, and you should be able to stay up longer without an unpleasant crash in the middle. (Just be sure to wash hands and face if you eat anything greasy, or you'll feel gross and get grease on the keyboard besides.) Try any of Morningstar's hot dogs or Boca's sausages (brats, italian sausages, etc); they're basically pure wheat/soy protein and they taste great.

  • I'm a bit of a perfectionist when it comes to code. I have very rigid standards that I adhere to and that I expect fellow programmers to adhere to when working on an important project. Unfortunately, after eight hours of nonstop coding, even I start getting sloppy and writing quick hacks instead of well thought-out, well-commented, elegant code.

    If I can, I try to limit myself to no more than four hours of nonstop coding at a time, with a lengthy break in between that doesn't involve much brain activity and that will allow me to rest physically. TV is ideal for this, but a bit of online gaming will do the trick as well. I think the longest coding marathon I ever did was 18 hours, and by the end I was writing horrible, nearly unmaintainable code that I later regretted.

    • In addition to what I said above, I should add that caffeine is really a bad idea if you need to concentrate. Despite the fact that caffeine has for some reason gained some sort of legendary status as "hacker fuel", large amounts of caffeine only make you jittery and unable to concentrate.

      I've found that a much better replacement is good fresh, clean, cold water. Fill up a nice big 32 oz. bottle and take a swallow every few minutes. Not only is it good for you, consistent cold water intake throughout the day keeps you awake almost like caffeine does, only without the nasty side effects.

      • Do you have any research to back up the water claim? Not saying I don't believe you, I would just be interested in reading the research if it is there.
        • I read this in a study over a year ago, but I can't seem to find the article with Google. Basically, caffeine keeps you awake because the brain's adenosine receptors think it's adenosine. The caffeine molecules bind to the receptors rather than adenosine, but instead of slowing the receptors down as adenosine does, caffeine speeds them up. But all that blocked adenosine is still floating around out there, and when the caffeine goes away after 12 hours, a flood of adenosine hits the receptors, causing intense drowsiness.

          If I remember correctly, the study I read said that drinking large quantities of water slows or somehow blocks adenosine production in such a way that it helps you stay awake, just like caffeine, but without the overstimulation or the drowsiness after it wears off.

  • Rule #1 (Score:5, Funny)

    by cornice ( 9801 ) on Tuesday October 29, 2002 @08:34PM (#4560458)
    Don't let the cleaning company set the alarm on you.

    I got an adrenaline boost once when a cop pulled his gun and started screaming at me. I had been running around in my socks, checking on a couple of systems. This guy was seriously amped and very pissed when he found out that I didn't deserve a beating. Luckily his partner was calm, and chuckling a little. The cop that was pissed kept asking me what my boss would do if he knew I was working all night. All I could do was laugh and tell him my boss better damn well be pleased. That didn't help the situation...
  • Taking CS at Purdue, we had two weeks for each
    project. They each took me about two hours to
    complete. We had 4 weeks for the final project
    so I started two days before it was due thinking
    it would be a 4 hour job. 36 hours later... I
    only took bathroom breaks. Got it in on time.
  • Not coding, but... (Score:3, Interesting)

    by MrResistor ( 120588 ) <.peterahoff. .at. .gmail.com.> on Tuesday October 29, 2002 @08:36PM (#4560479) Homepage
    I once worked 54 hours straight building sets for a play at my old high school. I went home, got 4 hours of sleep, cooked "breakfast" for all the people sleeping on the floor of my apartment, and went back for another 30+ hours to finish it (things got a little hazy towards the end there).

    I didn't do caffeine at the time, either (I was one of those wacky straight-edge punks). Regular physical activity keeps the blood flowing and the limbs from cramping up or going to sleep. We also had a hot chick that brought us pizza every 6-12 hours, which is key ;-)

    • I feel your pain man. High school plays are always way more work then you think they are worth at the time. And then the scary "faculty advisor" decides the set needs to be redone like a week before opening night. Arrg.
      • then the scary "faculty advisor" decides the set needs to be redone like a week before opening night.

        That's exactly why I was there. A friend of mine was in charge of it, and everything got changed roughly one week before opening night. He called me because he needed someone with some carpentry experience to get the stuff built fast and right.

  • Don't do it... (Score:5, Insightful)

    by stefanlasiewski ( 63134 ) <(moc.ocnafets) (ta) (todhsals)> on Tuesday October 29, 2002 @08:37PM (#4560484) Homepage Journal
    do you have any tips on getting through ultra-long coding sessions?

    Yeah, remember the pain and agony of those 27 hours, realize that it's impossible to write quality programs with that strategy, and never do it again!

    It's even more fun when clueless mangement tries to get you to do that in the Real World. Feh... ... ponders ... ponders ...

    Oh well, Back to my job search!
  • What I do is brainstorm ideas during the time that I am not coding anything. When you write down all your ideas, visualize the structure of your code (especially if you are designing an API), it really helps when you actually sit down and start writing. I don't think that I have ever sat and wrote anything for 27 straight hours, but I have pulled all-nighters, from 8:00AM one day to 5:00 PM the next, and accomplished some things. You definitatly start to screw up after a while though. Good luck, Ditto
    • Ditto, ditto999999999999999.

      I telecommute, have a 5th grade son, wife works midnights, etc. I find that this can be a Better Way To Work(tm), but only if you're prepared. Wrap your mind around the problem, pick out every possible bad thing you can, then "just let go, Luke". Spend a couple of days just letting it slosh around, writing down those things that splash out. When you see a 24-hour window of opportunity on the horizon, get a good night's sleep beforehand, have a good breakfast, brew some coffee, and code like a mofo.

      This really only works for me because I'm a nitpicky sumbitch when it comes to coding. If I get an hour or two into a project, and find that something would be better if I made a generic method, and used that, then I'll fork off a sub-project, and spend time on that. If I'm not prepared for a marathon coding session, I'll 'leave something hanging' at the end of a normal shift. This way, I can find my loose ends, and take care of them, in one swell foop.
  • The initial port of Mozilla to Qt occurred immediately after the Mozilla source was released. I wasn't there myself, but apparently it was a 5 day (and night) event. More info on the current status of QtMozilla here [trolltech.com]

  • I just *did* a marathon - working on code from Friday at 5pm to 10pm, slept until 5am (my usual waking time) and coded solid through the next 39 hours to Sunday at 8pm, when my QA guy told me via AIM to go to sleep. :)

    I did a work week's worth of coding in my "spare time". I was supposed to go out on Saturday, but I didn't get a call from the guy I was supposed to meet up with. Ah, well... I chewed up a *huge* hunk of the TODO list. And on Monday morning, I got up, showered, and went to my regular office job.

    --
    Evan

  • by WeaponOfChoice ( 615003 ) on Tuesday October 29, 2002 @08:47PM (#4560551) Homepage
    STDOUT> 2500 lines undocumented PERL.

    By a stroke of luck it actually worked and did what I wanted it to do.

    I do however count not having to ever make any changes to it as the luckiest thing after simply making it. After too much work and wayyyy too much coffee you start writing things that are completely impossible to work out once you're in a sane state of mind again. Basically the type of thing Frost would have written had he known PERL...

    The best way to approach a project like this is with a thirst for discovery and new experience and [let me emphasise this] no intention whatsoever of deploying the results in a production environment.... ever

  • First I have to say that ultra-long coding sessions are NOT the best way to meet schedule.
    That said, you sometimes have to do it. In that case, the following substances may be of some help to be efficient past 12 hours of coding :
    • Coffee (of course)
    • Glucoronamide (in Guronsan(R) [intekom.com] in association with caffeine and Vit.C)
    • Adrafinil [adrafinil.com] or Modafinil [modafinil.com] (in Provigil(R), Olmifon(R) or Modiolal(R))
    Note : in some countries, modafinil and adrafinil are only delivered on medical prescription (indication: narcolepsy).

    My longest coding session using only coffee was +/- 24 hours. With Adrafinil I did 72h+.
    My advice : avoid coding more than 48h in a row : after 48h, the number of bugs seems to increase exponentially even if you feel perfectly awake.
    HTH
    • And don't forget Ephedrine. In low dosages it makes you much sharper and more energetic. But go easy on it, too much and you will not be able to think and just sit there staring at the code and shaking.
      • I would NOT advise anyone to take ephedrine as I would not advise anyone to take amphetamines or cocain : the side effects, risks of addiction and risk of overdose are too high in both case.
  • at my first pro job i came in one day at 9am. we had an unmeetable deadline so I ended up staying until 11pm (i still wasn't done). i drove ~30 mins home. as i was going to bed i had a realization, which i scribbled on a sheet of paper. i tried to go to sleep, but i ended up saying "screw it", got dressed and went back to work. i got to work about 1am. i worked until about 2pm, went home and slept for a long time. total hours 13+13 = 26 with a two hour "break" (an hour which was driving).
  • Long Hours (Score:5, Informative)

    by Tadrith ( 557354 ) on Tuesday October 29, 2002 @08:52PM (#4560578) Homepage
    The most I've ever actually coded in a single session would be around 35 hours or so. However, I've had the lucky experience of having 100+ hour work weeks of coding, mainly due to the fact that I was recently employed (and so very eager to do a good job), and my boss was of the type to think that everything had to be done yesterday, and that any price was worth paying to get it done.

    Needless to say, I burned out like a match. The best thing I can suggest for anyone stuck doing this is to use it as an education lesson. No matter how much caffeine you want to put through your body, your mind simply can't take that much. In the end, I was writing code that all ended up being rewritten and reworked several months later when I realized I hadn't seen the big picture.

    Even more important than learning the lesson yourself, use it to teach your boss(es) the same lesson. We all know a lot of managers don't understand the process, and think that pushing their programmers to work insane hours is somehow more productive. Make sure you document any setbacks or roadblocks you encounter because of programming under such conditions, and make sure you explain each and every one of them. It might take a bit, but they do get the point, and soon you'll be on your way to a good programming schedule, and doing things the productive way.

    Of course, if you're one of those guys who *can* program for 100 hours a week and put in all this extra time without making mistakes, you're probably doomed. ;) I sure can't do it, but I really have to hand it to the people who can.
    • >>>Of course, if you're one of those guys who *can* program for 100 hours a week and put in all this extra time without making mistakes, you're probably doomed. ;) I sure can't do it, but I really have to hand it to the people who can

      It not out of the ordinary for me to spend 16-18 hours a day through the week working on a project. We're not allowed to sleep at work so that adds 1.5 hrs for the commute. I do REQUIRE that the weekends be mine though. After that kind of brain frying, I NEED a break. I want to go out on friday and Saturday nights. If I don't get those nights off, be wary of me come monday morning. :)

  • From 10h to 21h of the next day, with just an one-hour break for lunch. That's 32h.
    But the interesting part is: after that many hours, I was on an altered state, just like I was on drugs, I just didn't want to stop coding! and when I finnaly went home I was still very awake for some hours, I just couldn't sleep.
    I think there it's like when you're doing phisical exercise for hours, and your body starts producing endorphin, and you feel like superman.. something like that, for the brain.
  • ...beer. It just makes you drowsy, and you'll need to visit the restroom more often. Apparently 2 monitors can help though. ...vodka. Just drink the redbull neat. Tastes disgusting, but think of it as pennance for leaving your final CS-project to the last two days.
  • I have to take serious issue with the numerous comments here about how long hours spent coding leads to kludges and hacks and inelegant code that is bound to fail. On the contrary, my best work has always been done in marathon sessions. While I have to agree that waiting until the last moment to get a project completed is assinine, there is nothing wrong with long marathon sessions.

    In my experience, the worst code is written in small chunks, writing a bit of code, researching some more or going home, then writing another small chunk; the larger picture of the synthesis of the entire project never seems to come together this way. Unfortunately, this is the way most of us are encouraged to code... with lots of breaks and sleep in between. I have found that when I am in "the zone" coding, the best thing I can do is stay there as long as possible, going for as much as 72 hours at a time, and sometimes falling asleep on the keyboard, only to wake a few hours later and keep going. The code written this way in 1 week is more productivity than 6 months of my work normally. The code I write is elegant, and mostly bug free. At these times, the entire structure of the code all comes together in my brain, and I am just typing it out as fast as my fingers will go. Sleep is a waste of time when your brain is in overdrive. If you are looking for ways to "get through" these sessions, however, then you are not in the session and your best bet is to just go home. When you don't want the session to end and you are willing to forego sleep, food, restroom, nicotene, sex, just to keep going, THEN you are going to write some damn nice code, so don't you dare go home ;)

    But don't confuse long hours staring at the code and poking in a few lines with a marathon coding session.
  • Yeah... sleep.

    I once spent from 6:00AM Friday morning till 7PM Monday in my office. The office was tiny, bad light, etc... with a pungent view of an alley in Pioneer Square (Seattle). Around midnight each night I would set the alarm on my cellphone to go off at 3:00AM and try to sleep on the floor. I found that I didn't actually sleep that much, but did feel somewhat refreshed.

    My wife, of course, did not understand... she became suspicious at about 9PM of the first day. She became even more suspicious when I told her she couldn't come to the office to visit. The end? I finally got home and showed her the end result of the marathon. Her response: "You spent 3 days working on that!???".

    Sometimes it's very refreshing and eye-opening to be married to a non-techie.

  • One Expresso Machine, Used, From Goodwill.... $10
    One Coffee Machine, Used from Goodwill....... $7
    One Dual Burner Portable Stove, Goodwilled... $20
    One Box of Tetly and One box of Red Rose Tea. $6
    One Box of Hot Coco packets, Swiss Miss...... $3
    One Pot for Boiling the Water from Sink...... $10
    One Brand new Tea Kettle From K-Mart......... $8
    One Big tin of Water Sanitation Tabs......... $20
    Three pounds of good ground coffee........... $20
    Five Nights in an decent Mexican Hotel....... $90
    Ten cans of Wizard Air Freshener............. $15
    Ten Gallon Barrel for holding clean water.... $20

    Enough Ritalin too keep Little Jimmy Straight and on course for a month from a man named Jesus in a bar
    $50 and my Watch

    One 72 Hour, ballz out, five man, If we pull this off we are gonna be rich as fuck, forget this Vacation in the Sun shit coding spree, and subsequent 36 phisical crash and burn
    Priceless

    There are some things Money can't buy, Like 6 days of your life back that you wasted in some mexican hotel, in which none of you or your friends used the lovely "companion services" that surounded it, doing what was almost could be concidered a get rich quick scheme that in the end was just another sad bomb out like we have seen so many of before in the tech industry

    For Everything Else, there is Ritalin
  • Herpies. Every time I've done a several day burnout project, I've ended up with a painful patch of herpies. Stress reaction or something.
  • The best advice I can give is to work with somebody else, and talk everythring through. When you're sleep deprived, the msot important thing is to retain focus. As soon as you lose it, you'll drift off. You can knock off specific tasks from a to-do list with only half your brain working, but creative thinking, problem solving, and the like will derail really fast under sleep-dep. To alleviate this, talk things through until you have a concrete to-do list. This forces you to focus, and your partner will bring you back in line if you start to drift. Once you have a to-do list, work on it alone until you get stuck. Ask for help. Talk it through. Repeat. Just remember, if your mind starts to wander, you lose.
  • Way #8 from Eleven proven ways to make your group project harder [cornell.edu]:
    Don't start until three days before the assignment is due. Then pull three all-nighters in a row. Lack of sleep will ensure you write broken code. With luck, you will get sick and blow some other classes too!
  • True Story (Score:1, Funny)

    by Anonymous Coward
    In short, don't do it. If it doesn't get done, don't do this.

    Posting Anonymously...

    In school, I was working on LISP assignment for like 24 hours straight. I couldn't figure the damn thing out (HUGE LISP program, like 9 or 10 pages) I don't remember what the assignment was, now I could do it no problem. Anyways, about 11am the day it was due, I said fuck it. I'm going to get drunk. About 3 pitchers of beer later, it was class time. I decided I was way too drunk to go, so of course I strolled by the classroom window and mooned it. Hopped in my car, drove down to the local sports pub, where I met a nice lady in her 50's and proceded to go down on her in a booth at the bar. I then passed out in a puddle of my own vomit near the front gate of my apartment complex. Woke up with a massive hangover, a bloodied chin, and no wallet.

    So, lots of people are giving good advice and bad advice. This is my advice:

    No matter how enticing it seems, don't do what I did.

    (P.S. I know a few folks from my old school read slashdot and if this story sounds familiar please refer to me by my handle or first name.)

    Cheers
  • by Anonymous Coward on Tuesday October 29, 2002 @10:53PM (#4561220)
    You want to know the number-one tip for surviving a coding death-march? Don't start. Number two? Make sure you have competent coworkers who won't get you into a mess requiring a marathon session.
    Story times, boys and girls, posted anonymously to protect the guilty. I work for a smallish company that, until March of 2000, employed the most self-conceited programmer I have ever met. He bragged about his skills to anyone and everyone--worse yet, he had a way of convincing other non-programmers that he was the god of code. Unfortunately, among the people he snowed was the boss, which would play itself out in a rather dramatic way. There were five others in the department, including myself, and while we couldn't stand him, we put up with him because he managed to produce reasonably good work on time. So when he bragged to the boss how good he was, we sighed and said nothing.
    Our little company hit the jackpot when we got a juicy contract from another company in the aerospace business. They wanted what basically amounted to a sophisticated tracking system--in other words, given in-bound object X, calculate speed and trajectory, and extrapolate from a stinkin' huge database its probable identity and (from an even huger database) its probable targets. In other words, it was important to be able to distinguish say, between a passanger jet and a SCUD missle. The boss immediately assigns the code god to what he considers the toughest part: the extrapolation of identity and targets.
    A couple of months go by, and we start noticing a disturbing trend. The god of code has submitted less and less code to the versioning system, until it drops to zero. He insists that he is hard at work, and just doesn't want to commit anything because, in his words, "It's too delicate at this point--I need to toughen it up before I'll feel comfortable commiting it." This is code, and not some greenhouse flower we are talking about. Nevertheless, he convinces the boss everything is fine. Time passes. We only have three days before our first demo date, and even the boss is beginning to have doubts. Finally, he approaches the code god and demands that he commit the code that he has written so that we can all start debugging the system for the demo. Nothin' doing. The boss calls him into his office. We hear their voices gradually rise, until suddenly things get very quiet.
    I get called to the boss's office. Mr. code god is staring at the floor and doesn't look up. The boss tells me to take his computer out of the cubicle, along with any notes, papers, and files, and put it in the spare cubicle, where I am to review his code.
    In five month, the guy had managed to produce a beautiful GUI for NT, something that wasn't even speced for, a complete API for querying the system (which was the last thing he submitted) and managed to write not one line of code for identification and extrapolation. Turns out that he couldn't figure out how to do it, and was too embarrassed to ask for help. Three days left to go before the first product demo, and the very heart of the project had not even been started.
    We quickly decided that we would have to fake the demo. The sales guy, who was a really cool guy, explained how he thought we could salvage the demo. Basically, it was nothing more than a script. The system would correctly identify each object and spit out a list of possible targets because it was told, along with the telemetry data, what to say. To prevent the guys from snooping around too much, we took the GUI that Code God has made and "configured" it so that whenever anything was done outside of the scripted parameters, it would freeze up NT, requiring a reboot. I'm ashamed to say it, but it worked. The reviewers were very impressed with the GUI, and with how well the system responded to random data, but were disappointed to hear that there were still bugs in the frontend that needed resolving.
    Then came the death march--one month filled with 120 hour weeks. During the final week, I got three hours of sleep. None of the other guys fared much better. But we delivered a working system that had a fantastic frontend.
    As for Mr. Code God, we never heard from him again. But if you happen to suspect that you are using our program, you can easily find a little Easter Egg we put in at the last minute: create a new object, entitled "Code God" (Caps necessary) and with a range factor of 666. Leave all the other fields blank, and submit it. You'll see his image (I wish we could have photoshopped it) and some choice words. Don't worry about deleting the entry--it will delete itself once you click on the "Kill me now" button...

  • If you stay up for 3 days straight writing code (you get on a hot streak, in a way)

    When you wake up after you crash and burn, you'll look back at the code and wonder "I wrote this?"
  • by Dr. Bent ( 533421 ) <<ben> <at> <int.com>> on Tuesday October 29, 2002 @11:14PM (#4561340) Homepage
    I know everyone likes to brag about how many dozens of hours they worked in a row to finish some critical project. I know that most programmers think they can live on coffee and pizza and Mountian Dew (and no sleep) for days and days and still stay razor sharp...but unfortunatly reality disagrees with you. [cnn.com] My experience has shown that almost all programmers start to lose effiency after the 10 hour mark, and by the time you hit 18 hours or so, you're better off just getting some sleep and picking it back up in the morning.
    Now I'm sure I'm going to get barraged with anecdotes of projects saved from disaster by marathon coding sessions, but ask yourself this important question...Why was it necessary to do this in the first place? When it comes to software development, it's not like it sneaks up on you. Yeah, sure, deadlines get pushed up and requirements gets changed, but the software industry is not the only one that has to deal with the slings and arrows of trying to get shit done in the real world. Which begs the question, why does it happen?
    The reason it happens is because we let it happen. Some of us almost WANT it to happen so we can get our marathon coding merit badge and show it off as some trophy of programming prowess. Whenever a manager makes some comment like "Well, I don't think we can make the schedule, but hopefully we'll pull it together at the end" my resume starts shooting out of the office printer. Don't tolerate it. It's simply not professional. If shit happens...adjust the schedule or trim functionality. As demonstrated by Brooks in "The Mythical Man Month", those are pretty much your only two reasonable options. Turning your development staff into a bunch of zombies is just Bad Form. DON'T put up with it.
    • Speaking for myself, yes, my code production rate (in lines/hour) goes way down after 8-10 hours. However, I know that if I leave and go to do something else, all the stuff cached in my brain will get flushed. The next time I sit down to work on the project I'll spend the first few hours mentally getting caught up to the point I was at when I quit last time.

      And other things that help: Being hungry, or being in a room full of people. It sounds weird, but the more potentially distracting things around that I actively try to ignore or put out of my mind, the more I can concentrate on programming.

      These are some of the things that drive me to do long sessions despite the physiological drawbacks.

  • I started at 6 am and I am still at work. 16:15 hours and counting.
  • by renehollan ( 138013 ) <rhollan@@@clearwire...net> on Tuesday October 29, 2002 @11:33PM (#4561449) Homepage Journal
    Oh sure, I've done the 120 hour weeks, usually because of a few of 24 to 32 hour sessions in there.

    My advice: this is not something you want to do.

    However, there are times when you know you aren't going to get your work done in the time allotted, no matter how hard you work. So, you have to work smarter, with better tools. Problem is, you don't have the tools. So, you get the insane idea to build them.

    Let me rephrase this another way: You can't do what you have to in, say eight weeks, much less the two that you have, so, you figure out what you need to be able to do it in one week, and spend the other week building that. As crazy as this sounds sometimes it is a viable plan.

    Sometimes the meta problem is easier to visualize, specify, and code than the problem itself.

    Of course this requires a clear mind, focused on the task at hand, and more than a little courage: after all instead of 25% productivity for the time available, you expect to be at 0% real productivity for half of it and 200% for the other half. There ain't no guarantee that you're gonna be right. These kind of risks are best not mentioned to management weenies and those without the stomach for technical roller-coasters.

    Others have mentioned that such hurculean efforts result in shitty code. Sure, you throw all the software engineering processes away, because they are just too heavyweight for that sort of thing. This is extreme programming at it's finest -- pipelined design, development, and test. Still, it will lack a certain, er, polish, and possibly robustness. But, you have an ace up your sleave.

    See, you don't have to solve the meta problem of providing the tools to solve any real problem of a particular class on time -- you just have to solve it so it provides the tools for the particular problem you've got. Just make sure that whatever bugs there are don't manifest themselves on the particular data you have to deal with now.

    Of course, anything that improves productivity is a good thing, right? Why not always take this approach?

    Because solving meta problems instead of "getting one's job done" is not "getting one's job done" except in the kind of impossible deadline situations I mentioned. It's a pity, but that's probably not the business you're in -- while a particular C++ preprocessor to instrument memory allocation/deallocation and pointer dereferences might be a great product in it's own right, you just need to find the memory leaks in the code for which you have a customer.

    Of course, with good project management, you won't find yourself in such situations, but such ideal circumstances rarely arise.

  • by raygundan ( 16760 ) on Wednesday October 30, 2002 @12:01AM (#4561569) Homepage
    A few years back at Purdue, I was in EE365, the microprocessor design course for EE and CmpE undergrads. Through a terrible mishap involving rm and a misplaced whitespace character, our project directory (finished, and working with a few minor bugs) got wiped while trying to clean out some Mentor Graphics temp files. All the schematics, all the VHDL, all the whatever. *poof* One week to go.

    Now, there were plenty of workstations available-- many more than there were teams working in the class. Unfortunately, most of them were old 50MHz machines. Not quite enough to do the simulations in a timely fashion. As in, not quite enough to get *any* of them done in a week.

    There were, however, 6 or 8 HP VISE workstations that just screamed. Obviously, in high demand. So, my partner and I waited until one opened at 3 in the morning, and proceeded to camp it out for an entire week. We took shifts, brought eachother food, and covered eachothers' classes. The last two days we were there straight through.

    I have never been more tired in my life, but we got it done.

    My advice? Don't do it. Make backups. If, like us, making a backup would be bigger than your disk quota and took too long to send home via a modem-- MAKE THEM RAISE YOUR QUOTA.

  • My longest marathon was 40 hours at work. I arrived at 8am on Wed and left at 11:30pm on Thursday. However, it wasn't 40 hours straight in front of the screen; our build and test process (that we run frequently) took 15 mins at the time so I and my teammate would take foosball breaks every so often. And then when I fell asleep while waiting for JBuilder to reach a breakpoint, I decided it was time for a nap. Slept for two hours (this was Thurs afternoon, after I'd already worked for 30 hours) and then went back at it.

    We got the code checked in, working and unit tested by the midnight Thursday deadline. All in all, that week was over 80 hours long, in 5 days.

    As for the quality of the code, it wasn't GREAT, but it wasn't too crappy either. All in all, not too bad an experience. I was even able to go down to the gym in the morning and take a shower, to help refresh the ol' brain cells.

    And during my 4th year in University, I pulled probably 30 all-nighters, which typically involved a full day of class, then a one hour commute home, then work all night, then commute back to school, then class all day. I was glad to leave the stressful school world and return to the easy 80 hour weeks of the working world :)
  • Don't forget the REM (Score:4, Interesting)

    by cornice ( 9801 ) on Wednesday October 30, 2002 @12:28AM (#4561705)
    I started my procrastinating career and thus all nighter practice way back in high school. But it wasn't until I saw coverage of the 1986 Race Across America that I saw what is truely required for a multi day push. The RAAM is a bike race starting on the West Coast of America and finishing on the East Coast. Unlike most other races this one isn't broken into stages. It's simply a matter of who can get there first. In 1986 a man named Pete Penseyres set the average speed record [ultracycling.com] which appears to stand today. His secret was sleep management. He had someone observe him while he slept for some time before the race to determine when he would typically experience REM sleep. Then during the race, his support team would pull him off his bike, lay him down in the support van, and let him sleep until his eyes stopped moving. Then they put him on his bike and sent him off for another day of riding. The net result was obviously favorable. He had competition that was actually faster but nobody was as consistent. Those who would have beat him almost always crashed while hallucinating from lack of REM sleep. So those here who are preaching the "3 hour break", I think are on to something.
  • Once in 1999, when I took six months off, I started around 8 am and stopped coding at 8 am next day.

    When I was 24 I used to do a lot of 100 hr weeks; once after my third 16 hour workday I had a "panic attack"; it felt like a stroke; left side numb; couldn't move left arm; felt like I couldn't breath. I basically learned at that point working craploads of hours doesn't mean you're a hero; it actually means you're an inefficient person who cannot complete their job in a normal 40 hour week.

    If you want to earn some REAL geek cred, learn how to do what you do in a normal 8 hour day. Trust me, it's far more rewarding to be efficient. Plus it's just so cool to be done with your shit by 5pm while everybody else is there all night :-)

    BTW I recommend taking six months off if you ever can. I just paid my rent in advanced, coded, fished, and went to bars. I was broke as hell by the end of it, but I wouldn't trade that experience for nothing.
  • My longest stretch is 81 hours. However, I'm kind of cheating here. I went to classes on Friday, didn't hit the lab until about 2 pm after waking up at around 9:00 am. I then coded straight until 5 pm on Monday afternoon. I took bathroom breaks, of course, and occasionally ate but I ate while programming. The assignment was due at 11:59 pm on Monday so I submitted it with lots of time. Still, only about 75 hours of that was spent in front of a computer.

    I didn't get the best grade ever on that assignment but still, got a 9 in the course [ualberta.ca] (9 being the top grade you can get). Later, I went back and TA'ed the course, spending a while as head TA while still an undergrad.

    There's no way I could do that now. And even back then, I would have been more productive with some sleep. These days, I figure 12 - 14 hours of coding in a day is my limit and I'm not going to be able to keep up that level all that long. Hey, I'm pushing thirty years old now. Heh.
  • Since I read this horror story [666.com] about how [666.com] a nice guy got Carpal Tunnel Syndrome, I stopped doing all-night coding sessions.
  • by __aafkqj3628 ( 596165 ) on Wednesday October 30, 2002 @03:58AM (#4562517)
    Here are some tips that I find especially useful for a session like this -

    -There more concentrated the caffine solution, the longer you can remain awake without having to pee.
    -Prepare all food and string in a mushy liquid-like substance, it will save on precious coding time.
    -Remember all of the corner-cutters that you were told never to take? They are now your best friends.
    -Do not bring any firearms into the room.
    -If you wish, bring music, but be sure it doesn't have words to it or give you an urge to dance.
    -If nature calls, wait until it's SCREAMING!
    -If another person(s) will come within 100m of you during the coding time (and are not on the team), be sure to have restraining orders in effect.
    -And most of all - have fun (well, maybe not).

  • For the same professor who taught both classes. I remember her leaving for the day and coming back in the next morning when I pointed at her and said "YOU!".

    She started laughing.... It was a challenge but I got A's on both assignments.

    Don't have these sessions unless you have to ... they aren't good for the human body but if you must I suggest Dunkin Donut's "Box of Joe". Its a giant coffee drinkbox. I don't even know if they still make it since I don't live near a Dunkin Donuts anymore.
  • 61 hours, long weekend, "simple" multitasker in x86 assembler.

    V8 tomato juice works well, about 1 every 3 hours.

    Don't forget to break for food once in a while, too -- not so much for physical reasons, but the 5-10 minute distraction is good for the brain, plus it might help you get out of a "bad track of thought", and into a good one.

    Lastly -- Guinness Stout helped me through my Discrete Systems and Signals class .....

    Good luck!
  • This is why older programmers are having trouble getting work.

    The bosses know that all-nighters are part of the job, and only younger geeks can do it.

  • Sounds easy...

    while (distance 26.2mi)
    {
    self.place_one_foot_in_front_of_the_other();
    }

    self.collapse();

    Simple!
  • If you haven't heard of Provigil [provigil.com] yet, check it out. It is a revolutionary new drug that allows one to stay focused, alert, and with all of your faculties, all without making one jittery, and no annoying requirement of sleeping in once you stop taking it.

    There are reputedly no known side effects. You just have to convince your doctor that you have narcolepsy, which shouldn't be difficult if you are halfway into a marathon session at the time!

  • If my programming Zen is in full swing, I won't tire of coding and am usually pumped after I'm finished with the project, like a rush of congraduatory adrenaline. In fact, I usally forget to eat and get mad if I have to make a restroom pitstop. Usually, I only need a break if I'm stuck on a piece of the project; will just need to step away, let my pulse slow down, take some Excedrin, eat something warm, power-nap, etc. I usually only drink coffee (actually, usually hot cocoa w/ coffee poured in) or green tea if I'm cold. There is nothing worse than trying to type away with cold-numb hands. I always have my water bottle near my workstation; a lot healthier than soda or iced tea; juice gets nasty if it's no longer cold; and cola usually leaves that film in your mouth that seems particularly annoying with on the computer.

    I think the most important thing is to keep what you need at your workstation and always replenish. Just don't eat over the keyboard, cause that just gets nasty over time! Here's what I keep handy at my desk: water bottle; Kleenex; Excedrin; Lip Medex; Listerine mouth strips; music; spare sweatshirt. Getting up to eat or just splash the face with water is always a quick but healthy break.

Top Ten Things Overheard At The ANSI C Draft Committee Meetings: (5) All right, who's the wiseguy who stuck this trigraph stuff in here?

Working...