Slashdot Mirror


Programming Warm Ups?

ResHippie asks: "No athlete or musician would think about just diving in to the day's activity without doing some series of warm ups first. Aside from starting most computing sessions with checking email and the like, I pretty much try to dive right in to the task at hand. It usually takes me a while to get going, though. Does anyone have any routines they go through before coding (or any other work-like activity) that helps?"

84 comments

  1. coffee by Hubert_Shrump · · Score: 4, Informative

    coffee, a little slashdot... poking at any outstanding errors, reading through error logs from the program in question... rereading the source, adding better comments to sections that you've forgotten /again/ how they work... write a little documentation, update the changelogs...

    THEN the new code.

    --
    Keep your packets off my GNU/Girlfriend!
    1. Re:coffee by camelrider · · Score: 1

      Funny? It looks like very good advice.

    2. Re:coffee by compwizrd · · Score: 4, Funny

      and by that time, it's time to go home!

    3. Re:coffee by jon787 · · Score: 2, Funny

      sssshhhhh

      I'd say in a given week I probably only do about fifteen minutes of real, actual, work.

      --
      X(7): A program for managing terminal windows. See also screen(1).
  2. The Obvious by cfreeze · · Score: 1

    Load Slashdot...

    1. Re:The Obvious by Glonoinha · · Score: 3, Insightful

      Actually, the obvious (if I want to get some serious work done) is to NOT load /.

      My routine when I really, really need to bust out some hardcore code is :
      Get caffeine in my system. A big glass of ice tea consumed while I am fixing myself the second, bigger glass that I will drink on at the keyboard.
      Fire up the computer.
      While that is firing up, rinse my face in the bathroom sink, hot water - really hot. As my face warms up, make it hotter. With the face oils on my hands, run them under water that is as hot as I can stand without pulling them out. Two or three minutes between face and hands.
      Log into my system.
      Put in my ear plugs.

      (Here is the important part) ... open some code, any code, in the editor and hit compile. Watch it compile while I sip some tea, and when it finishes compiling start looking through the code for something to document. I don't need to actually change any code, just get my brain in code reading mode and commenting some uncommented code does this for me, not to mention gets the code documented.

      Don't start a browser session.
      Don't open my email client.
      Don't sign in to instant messenger.
      Don't check voicemail.
      Don't start the Kazaa client.

      No slashdot, no hotmail, no work related emails, no fark.com, no cnn.com, no tom's hardware, no ebay, no techbargains ... no nothing. Just me, the compiler and editor IDE, and the task at hand.

      If you follow that formula, the inertia will be to get into the zone and stay in the zone (no distractions via phone, email, IM, whatever.) In fact if success isn't optional, I have been known to unplug my machine from the network, insuring that I couldn't fire up and of the distractions 'just for a second' even if so inclined. Get some serious work done, though.

      --
      Glonoinha the MebiByte Slayer
    2. Re:The Obvious by foog · · Score: 1

      In fact if success isn't optional, I have been known to unplug my machine from the network, insuring that I couldn't fire up and of the distractions 'just for a second' even if so inclined.

      success is never optional.

    3. Re:The Obvious by rowanxmas · · Score: 1

      I think that if you used vi instead of a full-blown distraction-incurring IDE it would be even better. I mean how many times have you read every help page?

  3. Check some web sites by SoCalChris · · Score: 2, Interesting

    I always scan through the new articles here on /. and Fark.com before starting the day. It sort of gets me thinking a little, and starts the day off interesting.

    1. Re:Check some web sites by dimator · · Score: 1

      Those are the two sites I check routinely too! :)

      --
      python -c "x='python -c %sx=%s; print x%%(chr(34),repr(x),chr(34))%s'; print x%(chr(34),repr(x),chr(34))"
    2. Re:Check some web sites by Anonymous Coward · · Score: 0

      One thing I hate is that Fark always seems to add Boobies posts early in the morning, so I don't see them until I get to work. Then I can't check them until I get home... Bastards. I tell you it's a conspiracy!

  4. The usual by adamy · · Score: 4, Insightful

    Drink Coffee
    Read Email
    Read Slashdot

    Actually, the best way I've found to get into the zone is to leave a compiltation error from the previous day. It is the mental equivalent of a stack pointer from which you can pop all of your registers, reinitialize the idle process, and start cranking.

    example //Working here, trying to get the right objects from iterator
    BadObject b = iterator.next();

    Yes, I work in Java. Compiler will shout about bad object types, and I'm off.

    --
    Open Source Identity Management: FreeIPA.org
    1. Re:The usual by Master+Rux · · Score: 3, Funny

      1. Drink Coffee
      2. Read Email
      3. Read Slashdot
      4. ...
      5. Profit!

      --
      IMO the best browser game ever http://wittyrpg.com
    2. Re:The usual by Mikey-San · · Score: 1

      I'm not a programmer, so please don't flame me if I'm off-base here.

      Isn't this a rather bad idea? What if you add something and somehow miss what you added, killing 30 minutes of your day tracking down the problem? What if something else goes wrong somehow? (Strange shit happens, says the Mikey-San, half-1337 IT worker.)

      --
      Mikey-San
      Karma: +Eleventy billion (mostly affected by watching Celebrity Jeopardy)
    3. Re:The usual by adamy · · Score: 1

      Well, Worst cas is it is something you can remove and continue the compile. My builds are minimal so it isn't a problem here.

      --
      Open Source Identity Management: FreeIPA.org
    4. Re:The usual by Anonymous Coward · · Score: 0

      The 987th variation of the same joke, and some nitwit still mods it funny.

    5. Re:The usual by kruntiform · · Score: 1

      Actually, the best way I've found to get into the zone is to leave a compiltation error from the previous day. It is the mental equivalent of a stack pointer from which you can pop all of your registers, reinitialize the idle process, and start cranking.

      I do that too; I put an XXX at any unfinished bits. It's visible, and you can search for it.

    6. Re:The usual by Anonymous Coward · · Score: 0
      1. Complain about mods
      2. ...
      3. Profit!!!!
    7. Re:The usual by SomeGuyFromCA · · Score: 1

      > I do that too; I put an XXX at any unfinished bits. It's visible, and you can search for it.

      You start your day by searching for XXX?

      --
      if the answer isn't violence, neither is your silence / freedom of expression doesn't make it alright
    8. Re:The usual by kruntiform · · Score: 1

      Yes. I try to make my code a little less pornographic.

  5. Warm-Ups? by chemstar · · Score: 5, Funny



    I don't know, five years at a University?

    1. Re:Warm-Ups? by Master+Rux · · Score: 3, Funny

      Yeah, but I don't think I'd want to do that every morning.

      --
      IMO the best browser game ever http://wittyrpg.com
  6. My routine by OiBoy · · Score: 3, Funny

    I work at home, and the work day starts at 0900, so this is my routine:

    0830: alarm goes off
    0840: actually get out of bed
    0842: start brewing coffee
    0844: pour cup of coffee before it's actually ready
    0845 (optional): small scream as I pour hot coffee on my hands since I haven't opened my eyes yet
    0846: go out on deck with copy of whatever magazine is closest to hand (generally some ancient copy of Linux Journal). Smoke cigarette, drink coffee
    0859: come back in
    0900: log onto computer and check for emails from co-workers
    0901: quick scan through various mailing lists for security alerts and the like
    0903: try to remember what I was working on yesterday when I called it a day and get back onto it

    --
    `fortune -o`
    1. Re:my routine by n9hmg · · Score: 1

      Since you're the only one to mention brain lube, you get the follow-up.
      NOTE: This is acceptable only when working away from supervision
      Keep the beer handy and get started. Think about it, try to do it. If it just comes crapping out, finish it and turn it in. If it doesn't come, keep working, but start drinking. Keep trying to be logical. It may get frustrating, but keep thinking about the whole problem and trying to write solutions. At some point, you'll start making progress or be forced to temporarily give up (to go sleep it off). If you're moving ahead, or at least think you are, keep going as long as you can, then go sleep it off.
      After the drunk, go back into either what you've done, or the problem you haven't yet touched. If you did nothing, you're likely to have the problem deeply ingrained in you mind, and either can start an iterative process through it, or go do something else for a while. There's nothing like heavy concentration all the way to incoherence to expand your perspective on a problem, and if you are capable of solving it, you will probably have the solution in a day or so. If you are in the much more likely situation of having written a bunch of incoherent crap the night before, go back through it and correct it. Some things will be on the right track but need fixing, and you'll see what's wrong and fix it. Some things will be completely wrong, and you'll see why they are wrong, and what the right solution is.
      I certainly don't suggest this approach for the "coder". If you're just implementing somebody elses pseudocode, it's no different from digging a ditch. Keep at it, take breaks when you're too tired to go on, do whatever you need to to get into the frame of mind.
      Oh, and if you're forced to work under supervision, just go ahead and beat yourself over the head with the problem, get yelled at for not doing anything, go home, and go to sleep. If the problem is deeply-enough engrained in your mind, you'll probably dream the solution. I was once surprised to awaken with 85 lines of code ready to type and a few modifications to apply, all verbatim and correct. I walked in, did the changes, it compiled, and the job was done. That told me I was taking that job way too seriously.

    2. Re:My routine by pla · · Score: 1

      0844: pour cup of coffee before it's actually ready

      Depending on your coffee maker, I discovered a trick to saving time with this...

      Have your cup ready, with milk and sugar (or whatever you use in your coffee, personally I like a single ice-cube so I don't need to wait for it to cool) already in it.

      Fill the pot with water, and place the coffee in the brewing basket.

      Place your cup under the brewing basket, and dump the water into the appropriate spot on your machine.

      Poof, instant cup of coffee. Just make sure to stick the pot under the stream of hot coffee as you remove your cup, or you'll have a bit of a mess.

  7. Start the coffee maker... by Satan's+Librarian · · Score: 1

    Kick on the mp3 player, stretch out the hands (RMI), check the mail, update the source, check for user posts, drink the coffee, kill the lights, crank the music, and let the code begin.....

  8. Gradual warm ups by GuyMannDude · · Score: 5, Funny

    I usually start the day's coding session with a slow progression of vocal cord exercises that simulate what will be done later in the day.

    Start with simple cursing. "Dammit. I can't believe I left that variable uninitialized." Then gradually build your way up to more intense grumbling, being careful not to overstrain your vocal cords. "Holy crap that goddamn idiot Jack still didn't fix that bug? That was a week ago! What does that fat sack of shit do all day long?" From loud complaining you work your way into loud yelling and screaming. "Fuck you, MSVC++! Don't tell me 'internal compiler error'! What the fuck kind of shit is this! You goddamn cocksucker! Fuck you Gates! Yeah, fuck you!" Now that your blood temperature has raised a few degrees, you can begin doing whole-body exercises. Jump up and down and scream "Fuck! Fuck! Fuck! There's no error there you shithead compiler! That's perfectly legal C++! Just compile it you fuck!" Then pick up your monitor and pretend to throw it against the wall. Start gradually at first, eventually working into really whipping your torso around. This will make sure you down strain any ligaments in your lower back when you finally do snap and start trashing your computer.

    Remember people, safety first!

    GMD

    1. Re:Gradual warm ups by Anonymous Coward · · Score: 0

      (Score: 17, Funny)

      ROTFLMAO. I think we must do the same thing all day. I'm really a very nice person, but people in neighboring offices must surely wonder who the hell I'm screaming at all day.

    2. Re:Gradual warm ups by vuud · · Score: 1

      I can relate... * Award for funniest thing I saw on Slashdot today *

    3. Re:Gradual warm ups by Anonymous Coward · · Score: 0

      definitely, i do this kind of thing myself sometimes :) ...this another guy at work, drives everybody else nuts with his throat clearing exercices every 30 seconds...it almost sounds like he is trying to start a rusted dusted cars engine... anyways, this one day, another guy who was going nuts started to do the same thing, and plus, coughed every time the throat-clearing guy did his thing. then this gone-nuts guy started asking everybody if they had halls...the throat-clearing guy had no idea what was going on.....it was hilarious...

  9. Speed by spoonist · · Score: 1, Interesting

    Lots and lots of methamphetamine.

    'nuf said.

  10. Informative?? by Anonymous Coward · · Score: 0

    what the hell moderator on crack modded this as informative? man, that's all i need: my coworkers start doing this warmup routine every day! i'm going to blame it all on slashdot!

  11. Space out by fredrikj · · Score: 5, Funny

    Obligatory Office Space quote:

    Bob Slydell: If you would, would you walk us through a typical day, for you?

    Peter Gibbons: Yeah.

    Bob Slydell: Great.

    Peter Gibbons: Well, I generally come in at least fifteen minutes late, ah, I use the side door--that way Lumbergh can't see me, heh--after that I sorta space out for an hour.

    Bob Porter: Da-uh? Space out?

    Peter Gibbons: Yeah, I just stare at my desk, but it looks like I'm working. I do that for probably another hour after lunch too, I'd say in a given week I probably only do about fifteen minutes of real, actual, work.

  12. Is it April 1st already? by Anonymous Coward · · Score: 0

    Well?

    (It took me 8 seconds to type this...)

  13. Warm ups for the entire body by GuyMannDude · · Score: 4, Funny

    Make sure to do exercises for each part of your body:

    • Fingers: They do a lot of work during the day so you need to make sure they can handle the stress. Start typing gibberish at a gradually faster pace until you drive the guys in the nearby cubicles nuts with your key-clacking.
    • Eyes: You will be staring at code for long hours. Start by visiting your favorite pornography site. Stare at a hot picture, unblinking, for several minutes. Repeat with a new picture over and over again until your eyes begin to get tired.
    • Mouth: Your jaws will get fatigued during an entire day of sitting and snacking. Warm up by chewing on a sock for 30 seconds. Rest. Then try for 60 seconds. Remember to use a brand new sock for each day -- resist the temptation to use the same chew-sock for each morning's warmups.
    • Lungs: Breathing is very important. Sigh louder and louder over and over again until your coworkers tell you to knock that shit off and get to work.
    • Butt: It will get tired of supporting your ponderous bulk in your chair for hours on end. Stand up and plop yourself down in your chair repeatedly. Stop when you get bored or if your chair breaks, whichever comes first.

    Hope that helps,
    GMD

    1. Re:Warm ups for the entire body by Anonymous Coward · · Score: 0

      And thus, Windows XP was born.

  14. make test by Phillup · · Score: 1

    I like to leave the day off with a test that fails...

    Then, the next morning... I run a "make test"

    Fixing the failed test usually gets me back into the flow. If not, I write more tests.

    If that doesn't get the juices flowing... I write docs and refactor code.

    --

    --Phillip

    Can you say BIRTH TAX
  15. Python by Apreche · · Score: 4, Interesting

    I usually open up the interactive python session and try a couple things out. It's not really a warm up, I'm trying to learn python. I guess it could be though. Try a few lines of code out, then get down to business.

    --
    The GeekNights podcast is going strong. Listen!
    1. Re:Python by Anonymous Coward · · Score: 0


      sure, the parent post was 'Informative' but who really cares?

  16. A lot of Coffee and Cigarettes. by sideshow · · Score: 1

    I figure when my pulse reaches 140 BPM at rest my brain is getting enough blood to acheive it's full potential.

    --

    Hollow words will burn and hollow men will burn.

  17. Use the product by brejc8 · · Score: 1

    When I am writing code I like to use the product for a while and get the feel of what is going on and visualise all the functions that get called while it is executing. Its imprtant to get a vey basic version of the system going to get the idea of how its executimg. Thesame goes for hardware design. When I was designing a cpu it really helped to see the schematic view of the system executing instructions and the values flying around. Much easier to understand than looking through the design.
    When writing a language or an input method try it out before writing any code. When I wrote a language called chump I wrote whole pages of code in it and only then started writing the compiler. I had to change many things in order to make it usable which I wouldnt have guesses if I didnt use it for a substantial ammount of time.

  18. go through the undo stack by Anonymous Coward · · Score: 0

    generally, if i haven't reloaded the file or quit vim, i'll do a 20u and playback changes with ctrl-r. with screen and vim's split windows i can generally keep nearly every file open that i was working on before i went home.

    one screen window for model, one for view, one for controller, one for unit tests, one for templates, etc... then another putty multitailing logs, set transparent and on top with vitrite.

    then i hope and pray that i don't get laid off.

  19. Advice for writers by DrCode · · Score: 4, Informative

    This is similar to some advice I heard for writers:

    When you're being really productive towards the end of the day, stop before you're finished. Then you'll have something easy to start with at the beginning of the next day.

    1. Re:Advice for writers by alonsoac · · Score: 1

      I'm not sure this is a good idea. Since finishing it at the end would be faster than doing it first thing in the morning. Plus if you finish it wou'll be able to think about the next task overnight and maybe come in the morning ready for it. I don't know, I just don't see how that could make one more productive. I will try it sometime.

    2. Re:Advice for writers by mr3038 · · Score: 2, Interesting
      When you're being really productive towards the end of the day, stop before you're finished. Then you'll have something easy to start with at the beginning of the next day.

      I think it's usually easier to code one block (a complex method, a class or something else) to finish if I have time. If you've trouble getting on the right track the next morning, I'd suggest code reviewing previous day's changes. Do a diff -u and think why you did write that code yesterday. If you cannot figure out, then there must be something wrong with the code. If it looks good, then by the time you get to the end of the diff your thoughts should be on the right track again. Of course, the project quality as a whole might benefit more if you reviewed code written by somebody else, but that somebody else probably has pretty different way to think about the problems to solve so it probably wouldn't help your thinking. If that somebody else is much better coder than you're, then by all means, read his code instead of yours - perhaps you learn something new during the process.

      On the other hand, when my thoughts are lost, I usually read email, check /. and end up spending half a day looking through all linked the stuff from the discussions, so take my advice with a grain of salt.

      --
      _________________________
      Spelling and grammar mistakes left as an exercise for the reader.
  20. funny? by Hubert_Shrump · · Score: 2, Funny

    I am staring at my hands thinking: but that's what I actually do... Maybe I should have gone to college where they teach proper technique...

    Then again, taking a break from coding and reading the other replies: everyone else seems to be answering humorously, so maybe I can save my ego by saying:

    of course I don't really do any of that, heh heh... that would be silly... I mean, coding is hard and I... Hey - look over there - the Matrix!!

    --
    Keep your packets off my GNU/Girlfriend!
  21. my routine by Anonymous Coward · · Score: 0
    Well usually I roll into work, log in, and check some sports sights. During this time I eat breakfast. After that I start checking news sites, cnn.com, bbc, etc to get an "unbiased view"

    after that I read some online comics, write some emails, and start reading fark.

    Then I usually head out to lunch w/ co-workers. Around 2 pm or so, I get back and read slashdot for a while. that usually fires me up or pisses me off or something, and I then jump right into some REALLY intense hard core coding... for about 5 minutes, then I log off, go home, and drink some beer.

  22. error logs and a fresh compile by dasalvagg · · Score: 1

    First thing: always check out the error logs from the sun servers(emailed to me every morning). Get my coffee...read slashdot....there goes an hour. by the time i'm done reading...reload and there is a few new articles...another 20 minutes gone. then start with a new compile to see all the problems from the previous day.

  23. I recommend the opposite. by xagon7 · · Score: 1

    I find that opening the bug list and simply pick one and start then is MUCH more productive than reading any e-mail or web sites first thing in the morning. I still grab a coke first thing, but have found that if I read e-mail or any other tak first thing, when my head is somewhat clear, I am MUCH more efficient, and can usually get on a roll easier and have most of my work completed before lunch. It feels good to have a somewhat clear concience. In addition to this method I have found I can think much better. I feel distracted and n olonger want to "work" after I browse the web or read e-mail. It just works better for me. No warm-ups, just...code first thing ...maybe after you grap some caffiene.. I am usually doing a full get from the repository while I am grabbing the caffiene.

    1. Re:I recommend the opposite. by xagon7 · · Score: 1

      Damn.. I didn't make much sense... basically code first thing in the morning, no warm-ups, no distractions, just code. Then read the web or e-mail. It seems to work better for me.

    2. Re:I recommend the opposite. by demmegod · · Score: 1

      Coding? First thing in the morning? Well perhaps if by morning you mean black of night... then yeah. I rarely even both trying to program when the sun is up. I can do it, but not well.

    3. Re:I recommend the opposite. by Anonymous Coward · · Score: 0

      I agree completely. It's a lot easier to focus from a "clean slate" than after you've thought about a million other things.

      I quickly scan work e-mail before I start anything, though, since it might have an impact on my to-do list. Web surfing ("research") and reading personal email I postpone at least until lunch time.

  24. Typical mood by HuckleCom · · Score: 1

    Step 1: Locate Caffiene source. Step 2: Devour at least 24Oz of source to initiate step 3 Step 3: Get your jivin' tunes in order, crank-em up; Techno makes you feel smart and gooooood. Step 4: Drink while coding, keep a good supply of moozic on hand so you dont listen to the same stuff.. Step 5: collapse for the night and sleep Step 6: wake up and repeat!

    1. Re:Typical mood by CoolMoDee · · Score: 1

      the only problem I have with techno anymore, is that it is very hard for me to find a) something I havn't heard a million times befor or b) something that dosn't sing about sex0ring/other planets and general raver extasy feelings of the sort. I mean, I don't want to be blaring music about some bitch going off to another word sex0ring your best friend.

      --
      Jisho - A Japanese English German Russian French Dictionary for the rest of us.
    2. Re:Typical mood by HuckleCom · · Score: 1

      haha; http://www.modplug.com amateur techno, no crap; most is without words, there are some funky filetypes they use tho, but they have a fairshare of MP3's too. If you have WinAmp, that will read any file on that site.

  25. From the Good Dr.... by mbstone · · Score: 2, Funny

    One time Hunter S. Thompson was lecturing at my college campus (with John Belushi!) and I had the opportunity to ask him about his preferred method of preparation for a writing session.

    Thompson's complete answer: "Booze and speed."

    1. Re:From the Good Dr.... by AlanGreenSpandex · · Score: 1

      so Gonzo killed Belushi??! ...

      --
      Lower interest rates again? Vote!
  26. Start? by demmegod · · Score: 1

    Just don't stop... seriously... When I'm on a roll, I don't stop for anything. Just give me an IV and some caffine. I stop when the program is done- or my blood sugar level drops below 10.

  27. Start away from computer by rjethmal · · Score: 2, Interesting

    I find that starting with paper and ink is a good way to get the juices flowing. If you have a bug from a previous day write out a solution on paper, nothing serious, just jot down some notes on it, or ideas.

    If you don't have something specific then I generally do as someone else mentioned and test a few things; if I find there's something broken put it on paper.

    For me there's just something about flowing ink and flowing ideas. Overall I think finding small issues (if lucky) to work on at first is good because it allows one to see some progress, which is always a good motivator!

    --
    Push the envelope. Watch it bend. -Tool
  28. Warmup! by NanoGator · · Score: 0, Redundant

    "Does anyone have any routines they go through before coding (or any other work-like activity) that helps?""

    Not exactly. I usually go straight from my bed to the office. That's why I have a beard and an outfit that I don't want to be seen in public in, causing me to brown-bag lunch for today. (Incidentally, I pack a banana in there because they require no preperation, very efficient food I might add.) Then, I come in, and drink 3 cups of coffee, though the third cup is pretty bitter. By then, it's about 9:30, so I catch up on the news. I post a little bit on Slashdot, those stupid pro-MS ppl get on my nerves. Don't they see that they can download the source code to other people's apps, decipher their coding style, rummage through all of their code, and fix the problems that come up with it? Anyway so I gotta teach those Microsofties what a real OS is. God they're so stupid with their ease of use and their GUI, it's like they don't know how to operate a caps-lock anymore. Oh anyway uh around 10:30 I wrap up my news gathering and get straight to work. I fire up my email and read the joke of the day and carry on my conversations about last week's episode of Enterprise. Unfortunately, we won't see new eps of Enterprise until September so instead we discuss the good old days before Babylon 5 came along inexplicibly rose to popularity. But that's just an aside, I really check my email to see what new defects and updates I need to do to the code. Usually there's something I need to run past a coworker. So I'll go over to him and then we'll have a brief 20 minute discussion about it and how the war in Iraq is going. Oh! Crap! It's 11:30, we better go to lunch early so the lines are short and we can get back in time. At 1:30pm, I come back from lunch and sit down ready for work! Then, there's usually a meeting. So I attend that little hole in time for about 2 hours. At 3:30 I check up on my posts on Slashdot to make sure some dumbfuck moderator didn't mod me as redundant for my Simpsons quote that should have been a +5, Funny. Afterall, that same Comic Store Guy quote was +5, Funny quite a few times after that. Man, I swear the mods are against me. Anyway, at 4:30 I really sit down and work for the next 2 hours, then I go home.

    Hope this warmup exercise helps. :)

    --
    "Derp de derp."
  29. Exercise by LadyLucky · · Score: 4, Insightful
    OK, so maybe I'm lucky and I have a work subsidized gym membership at the gym which is on the otherside of the carpark, but I find there's nothing quite like a bit of exercise (swimming is my cardio of choice) to get the blood pumping, gives you some alone time in the zone to toss around those ideas for sexy code.

    That, or coffee.

    --
    dominionrd.blogspot.com - Restaurants on
  30. booting up by alf1024 · · Score: 1
    • arrive @ 8.30
    • delete spam
    • read emails and logs
    • check seti@home proxy status
    • check computer mags, blogs (William Gibson], Joel) and slashdot
    • 9.00 ready to code & debug
    --
    Any sufficiently advanced technology is indistinguishable from magic. (Arthur C. Clarke)
  31. Re:Ma maaaan by KingRamsis · · Score: 1

    how about some black coffee, and 1.2Gb of fayrouz?

  32. Re:Ma maaaan by floydman · · Score: 1

    what are you, my conscience?

    --
    The lunatic is in my head
  33. Kata by darkpurpleblob · · Score: 2, Informative

    Have a look at CodeKata, coding practice sessions. Doing one of these occasionally (start of each week?) may help you get into the right frame of mind/attitude.

  34. little annoyances first by pz · · Score: 4, Informative

    To start a serious coding stretch, I take care of outstanding things that will be a distraction. Like, as many others have suggested, reading email, Slashdot, checking whatever web pages your mind might drift to, chatting with co-workers and boss, using the bathroom, eating lunch, etc. Then, make a cup of coffee, turn off telephone, select appropriate music, put on headphones, and start cranking.

    If you can't leave your development tools in a specific state between coding sessions (ie, if you are required to or prefer to shut down compilers, editors, IDEs, and the like when not in use), then, as others have suggested, leave a syntactical error at a key location which will clue you in to where you were mentally (this is not so much warm up as a token to make the process faster next time around). Even if you don't shut your tools down, it's nice to have a quick description of what you were working on before to continue from. I often will write down a couple of key phrases on a piece of paper or yellow sticky (eg, "check interaction between reduncancy check and precomputation" or "examine compute_latency() output to be sure each event is valid") left on my keyboard.

    Now, to really answer the question, I don't think anyone does any mental exercises to warm up. I also don't think they're necessary -- most of the posted answers, including mine, deal with preparing your environment for work, not yourself. The most common exception to this is ingesting caffeine -- and this is well-known to initially have a sharpening effect on cognitive ability. The most difficult part of doing hard coding is recovering the mental state, and while not exactly preparation for coding, it's the biggest step when resuming an earlier coding session, and many other posters have given good tips.

    --

    Put my fist through my alarm clock with its ding-dong death inside my ear. - The Blackjacks.
    1. Re:little annoyances first by aridhol · · Score: 1

      Damn, it must be nice to be able to get "talking with the boss" out of the way. I have this problem that mine comes over every hour to ask "how's it going?". Usually when I can least afford the distraction.

      --
      I can't say that I don't give a fuck. I've just run out of fuck to give.
  35. Logic game by Lord+Grey · · Score: 3, Interesting
    My own programming "warm up" isn't much like most of the posts here (reading email, Slashdot, etc.). I do those things every morning, sure, but I don't consider them some kind of warm up for a coding session.

    Instead, I load up the project, create remote sessions, etc. -- whatever I need to do the job -- take a look at the specific thing I need to work on, then background the whole thing and bring up some kind of logic game. Lately, it's been Bejeweled Deluxe.

    I've discovered that a logic game puts me into the right frame of mind while simultaneously letting me "mull over" the work I'm about to do. I stay away from reflex-oriented games, or those involving words; they make me concentrate too closely on the game. By the time I've played a game or two I've already thought of several ways to attack the coding problem at hand, and I can get started.

    --
    // Beyond Here Lie Dragons
  36. typespeed by Ramses0 · · Score: 1

    apt-get install typespeed and I play a game or two. Gets my fingers going, and ready to type for the rest of the day. Nothing is more annoying than trying to type and solve the world's problems when you have fat fingers in the morning.

    --Robert

  37. My routine... by Anonymous Coward · · Score: 0
    • Kiss Catherine.
    • Hug the kittycat.
    • Shower, shave, brush teeth.
    • Piss and shit.
    • Make a dish of tabasco couscous topped with cheddar for breakfast and wolf it down with a glass of orange juice and a vitamin pill.
    • Pet the kittycat.
    • Kiss Catherine again.
    • Walk to the office.
    • Check mail.
    • Crack knuckles while loading tools.
    • Start hacking.
  38. I usually by Znonymous+Coward · · Score: 1

    jack off once or twice to get me going.

    --

    Karma: The shiznight, mostly because I am the Drizzle.

  39. easy going ... by Anonymous Coward · · Score: 0

    our small programming office looks like this:

    one computer
    one scanner
    one big-screen projektor
    ten typ writers
    one BIG chalk-board.

    two secretary (scanning)

    five programmer.

    we OCR the programms from the typ-writer.

    the big-screen projektor is visible to all.
    and we can see the progress.

    since we are communists we just show up
    when we have solved the problem.

    it's not like we FORCE anyone to work,
    we acctually like what we are doing.

    you get coffee after 3 PM with some
    cake ...

  40. Think. Read. Eat. by zedeler · · Score: 3, Interesting

    Before programming, thinking has a proven effect on the outcome of your endavour. I have programmed computers for about half my life (started at 15 and turned 31 last year), and thinking seems paramount when considering what to do before actually coding. It is amazing to see how many forget this basic rule of thumb.

    Next, read books and standards . Not knowing that your problem has been (partly) solved already or can be solved better is a sure path to theeth-grinding reinventions of the wheel.

    Then, when you're really set to start coding (after thinking for half a day, reading a book and three standards), eat. Real food.

  41. Coffee & Excercise by stonewolf · · Score: 1

    I do 1 hour of excercise before coding showering and getting down to code. It adjusts my attitude, focusses my mind, reduces my bug count. Wonderful.

    Oh, yeah, I keep a large cup of coffee and a larger bottle of water next to me while I excercise.

    I usually do my stretches first, then weapon practise in the backyard, then go through all my katas and sparring techniques....

    Kung fu does wonderful things for the mind and body. All the physical and mental value of Yoga but about 10 times more fun.

    Stonewolf

  42. Plan your day the day before by ZenFu · · Score: 1

    When I find myself slow in the morning, it is usually because I am not exactly sure what it is that I am supposed to be doing. My solution has been to plan the next day, particularly the first tasks, before leaving at the end of the previous day. The other approach is not to worry about being slow in the morning. If fact, you may want to skip the mornings altogether on the basis that productivity is particularly low at that time.

  43. Re:Yea... by sfled · · Score: 1



    LOL. The moderator is a 'tard.

    --
    I'm not really a web designer, I just play one on the Internet.
  44. Deep Hack Mode? by zonix · · Score: 1

    Perhaps, but if you're (finally) in Deep Hack Mode, you shouldn't stop - I reckon.

    z
    --
    What would an EWOULDBLOCK block, if an EWOULDBLOCK could block would? -- me
    1. Re:Deep Hack Mode? by DancingSword · · Score: 0, Redundant

      Of course not!

      If one's in HE-MAN 48-hour Programming-Blitz(tm), then stopping means losing some of that perfect code, right?

      -shudder-

      sorry, I couldn't resist that, but the concept is actually getting-at the difference between a good session and a good continuum, and the good continuum is more, long-term productive than are a couple of good sessions.

      Some can easily work that way, some can't, though, and some won't validly try that, so..

      Also, Deep Hack Mode doesn't stop being productive just because one's now 'sleeping on it': sometimes understandings happen only when one's hacking 'unconsciously'.

      --
      Messages to/for me ( in me journal )
  45. CS Project Warmup: For COllege Purposes by FluffyG · · Score: 1

    When a CS project is due this tends to be my warmup.

    When the project first comes out I look at it and determine how long it will take me. Then that night i drink precisly 2 Old English 40's (no more, no less) and determine how long it will take to do while drunk. Then i turn on some Techno and attempt to start coding. Once i forget the name of the file i close it and go play q3 or starcraft (starcraft has to be the best drunk game ever). This continues for a few more days while i have all of the files created but nothing is in them. The day it is due I wait till the last possible minute and turn on some techno and get it done 1 minute before its due.

    All of this hard work can guarantee a C in the class (i got a 105% on the final which helped) and i never have to take a p[rogramming class ever again.(my major is NOT CS, i would kill myself because i hate programming)

  46. GET TO WORK! by gmiller123456 · · Score: 1

    Just GET TO WORK! No wonder so many of our jobs get outsourced over seas.

  47. Online Comics by Pan+Solo · · Score: 1

    I always check Megatokyo, Penny Arcade, Userfriendly, Get Fuzzy, Dilbert, and NonSequiteur. After that, I'm ready for lunch! -PS

  48. Thanks for sharing by Anonymous Coward · · Score: 0

    Here's a tip: try pissing and shitting BEFORE you take your shower...your cubemates (and Catherine and the kittycat) will thank you for it.