Slashdot Mirror


Programming Marathons?

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?"

4 of 109 comments (clear)

  1. coding marathons by cpeterso · · Score: 5, Funny


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

    10-15 minutes tops. phew..

  2. Rule #1 by cornice · · Score: 5, Funny

    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...

  3. Re:It's projects like that... by WolfWithoutAClause · · Score: 5, Funny
    ... that put hair on your chest.

    Yeah. Grey ones.

    --

    -WolfWithoutAClause

    "Gravity is only a theory, not a fact!"
  4. Re:Ack, I've been there... by Permission+Denied · · Score: 4, Funny
    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 :)