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

7 of 84 comments (clear)

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

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

    Lots and lots of methamphetamine.

    'nuf said.

  3. 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!
  4. 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
  5. 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.
  6. 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
  7. 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.