Slashdot Mirror


Why Programming Rituals Work

narramissic writes "Programmers may not think that their rituals are unusual, but if you swear that your code is less buggy if you recite it aloud or you prepare for coding by listening to certain music, don't be surprised if you get a couple sideways glances. In a recent ITworld article, Issac Kelly, Lead Developer at Servee.com, explains his routine and why it works: 'To me, programming is really the 'last mile' to getting something done. When I do the planning and specifications, I go on lots of walks, take lots of time with my wife, and really do as little work in front of the computer as possible. The more I plan (in my head, on paper, on a whiteboard) the less I program; and all of my rituals are to that end.' His ritual goes like this: 'Before sitting down to a coding session, he gets a big glass of water, takes everything off of his desk, and closes out all programs and e-mail, keeping open only his code editor. The office door is shut, and some sort of music is playing ('typically an instrumental only, like my 'Explosions in the Sky' pandora station,' says Kelly).'"

49 of 233 comments (clear)

  1. I can completely understand... by SerpentMage · · Score: 4, Insightful

    Before I undertake any task I do absolutely nothing. For about a day I will just idle around thinking about the problem. Kicking around one solution and another.... And I keep doing this until I am happy...

    --

    "You can't make a race horse of a pig"
    "No," said Samuel, "but you can make very fast pig"
    1. Re:I can completely understand... by microbee · · Score: 4, Funny

      Yes, sometimes I fall asleep on the toilet when I do this.

    2. Re:I can completely understand... by MyLongNickName · · Score: 5, Insightful

      You *think* before you code? WEIRDO!

      In all seriousness, when I worked for a bank, I would go outside with a legal pad and start drawing out the logic in terms of pictures. Away from the phone. Away from the co-workers.

      At lunch one time, a coworker half jokingly said I only work 3 hours a day. My manager was there and remarked "Yeah, but he gets more done in those three hours than you do all day".

      I tried to keep from smiling... however, in all seriousness, coding is 30% of programming. too many coders consider themselves programmers.

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    3. Re:I can completely understand... by LucidBeast · · Score: 2, Insightful

      I do the same with a twist... and then I drink my beer and code.

    4. Re:I can completely understand... by Mr2cents · · Score: 5, Insightful

      You should seriously consider giving your manager a raise.

      --
      "It's too bad that stupidity isn't painful." - Anton LaVey
    5. Re:I can completely understand... by MyLongNickName · · Score: 4, Funny

      Actually, considering his orientation, I might have.... but I really prefer not to think about it :)

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    6. Re:I can completely understand... by jgtg32a · · Score: 3, Funny

      How are you going to write that comment and not add the XKCD?

      http://xkcd.com/323/

    7. Re:I can completely understand... by Mr2cents · · Score: 3, Insightful

      Oh, well, not all signs of appreciation are monetary :).

      --
      "It's too bad that stupidity isn't painful." - Anton LaVey
    8. Re:I can completely understand... by Anonymous Coward · · Score: 5, Funny

      Actually, considering his orientation

      He's Asian?

    9. Re:I can completely understand... by moderatorrater · · Score: 5, Insightful

      I tried to keep from smiling... however, in all seriousness, coding is 30% of programming. too many coders consider themselves programmers.

      A lot depends on deadlines. If you have 3 things that needs to be done and committed by tomorrow, then there's going to be a tendency towards hackery. If you've got one thing that the company wants you to work on until it's finished, then you need to be more of a thinker. Programming's all about tradeoffs, and deciding which tradeoff happens isn't always the responsibility of the coder.

      Of course, most of the time management doesn't even realize that a tradeoff is being made. There's a breakdown in communication somewhere and most managers don't even realize that by pushing the deadline to be shorter they're asking for more work in the future and more bugs.

    10. Re:I can completely understand... by 16K+Ram+Pack · · Score: 4, Insightful

      It's one reason I prefer to charge clients for the job than the hour. Because like the author, by the time I sit down to code, I've worked out precisely what I want to do. When I'm writing code in the evening, I might be reading slashdot, twitter and all that, but I'm quite frequently also buzzing code around in my head. I can almost feel the things forming, juggling around 2 different approaches and letting the brain work out which way it likes better.

      It means that when I sit down, the code is more like typing.

    11. Re:I can completely understand... by luder · · Score: 3, Funny

      If you have 3 things that needs to be done and committed by tomorrow, then there's going to be a tendency towards hackery. If you've got one thing that the company wants you to work on until it's finished, then you need to be more of a thinker.

      I bet Duke Nukem Forever team members are all philosophers, by now...

    12. Re:I can completely understand... by Sanat · · Score: 3, Insightful

      A master does nothing, but leaves nothing undone. All of the work is done by not doing.

      Allowing your subconscious to design the modules instead of your conscious mind tends to lead towards more consistent results. Most individuals never reach this stage and probably can not relate to what you are describing.

      Others here know exactly what you are describing.

      --
      And in the end, the love you take is equal to the love you make
    13. Re:I can completely understand... by micromuncher · · Score: 4, Funny

      Well...

      All the amazing solutions that I've had while asleep or in delerium have always seemed really good for the 30 minutes of furious waking coding... before the "What the f**k is this garbage? It will never work..." gets shouted out.

      My subconscious thinks this is hilarious.

      --
      /\/\icro/\/\uncher
  2. AAAAAnd by Profane+MuthaFucka · · Score: 5, Funny

    There's Slashdot. Even when I do everything else, Slashdot is the final work-preventer.

    --
    Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
  3. My rituals (in order, of course): by Anonymous Coward · · Score: 5, Funny

          1. Make a cup of coffee: Community New Orleans blend, one sugar, hazelnut creamer.
          2. Read reddit.
          3. Check social status sites: facebook, twitter, etc.
          4. Read CNN.
          5. Read email.
          6. Catch up with coworkers.
          7. Juggle a bit.
          8. Put on headphones. Go to last.fm and hunt for a station that fits my current mood.
          9. Check reddit again.
        10. Go to lunch.
        11. Read email.
        12. Check reddit again.
        13. Update to-do list.
        14. Check icanhazcheezburger, etc.
        15. Pick different last.fm station.

    1. Re:My rituals (in order, of course): by Cornflake917 · · Score: 4, Funny

      I'm willing to bet that you make at least 6 figures with a job description like that.

    2. Re:My rituals (in order, of course): by RichardJenkins · · Score: 4, Funny

      And after all this, then - ONLY THEN - are you finally ready to post on Slashdot.

  4. My code works better by russotto · · Score: 4, Funny

    ...when I make sure to release it when most of the testing group is on vacation. Vastly cuts down on the initial bug list, let me tell you.

    1. Re:My code works better by digitallystoned · · Score: 2, Insightful

      I think the biggest problem with programming is the number of programmers involved and the size of the project. It's really the testing group/QA departments job to catch the bugs. I listen to music while i work, granted I install network hardware, but it makes the day go by faster and seems to be more productive than listening to the phone ring or staring at the wall for hours on end. I think that programmers are given too much crap. They may make coding errors, but they are human. Another set of eyes on any project makes things a bit easier. As much as I hate OpenBSD, they have a descent system. They take code, review it, and then post it to their distro. It may take them forever to get to that point, but at least its reviewed. Programs would be so much better if there was a better source. I'm sure this is offtopic so yeah....I forgot where i was going with this, its quiet in the office.

  5. Programming happens in the mind by Mr2cents · · Score: 4, Insightful

    The key to good software is contemplation. You can feel the social pressure at the workplace to be typing all the time, but it's wrong to give in. If they want someone who's banging on his keyboard all the time, let them hire a typist.

    --
    "It's too bad that stupidity isn't painful." - Anton LaVey
    1. Re:Programming happens in the mind by m50d · · Score: 2, Funny
      If they want someone who's banging on his keyboard all the time, let them hire a typist.

      Or a group of exhibitionists.

      --
      I am trolling
  6. How is this a ritual? by Fantom42 · · Score: 5, Insightful

    Sure, some of what the article talks about is a ritual, but the planning process isn't a ritual at all. Its a process. One that usually works pretty well, I must add. The less time you spend coding, the better your product is usually going to be. That said, knowing when to put down the whiteboard is sometimes important too.

    1. Re:How is this a ritual? by Chabo · · Score: 2, Funny

      Duke Nukem Forever had this problem. They spent so much time saying "THIS GAME IS GOING TO BE SO AWESOME" that they never wrote any code!

      --
      Convert FLACs to a portable format with FlacSquisher
    2. Re:How is this a ritual? by Mr2cents · · Score: 4, Funny

      There's even a simple proof of that: all bugs come from coding. Therefore, the less time you spend coding, the less bugs you'll produce :-).

      --
      "It's too bad that stupidity isn't painful." - Anton LaVey
  7. Rituals help focus the mind by Black+Art · · Score: 3, Insightful

    I can fully understand using such rituals. It helps you get in the right head space for writing code. It gets you focused on the task and flush out all the other crap trying to get your attention.

    I have found that if I am not in the right frame of mind before starting, the code takes much longer or is just plain wrong. If I am in the right head space, the task is quick and done before you know it.

    --
    "Trademarks are the heraldry of the new feudalism."
  8. Iteration vs planning... by blahplusplus · · Score: 4, Insightful

    I think the problem with planning everything too much is that you can't hold all the details in your mind at once, and sometimes your planned approach is not as good as one you come up with later given some time to stew on it (doing nothing).

    I think programming is a very iterative process because it is symbolic and non-visual (i.e. not like building something with structures that are easily and intuitively able to grasp their structural and interconnected relationsihps)

    1. Re:Iteration vs planning... by DragonWriter · · Score: 4, Funny

      I think the problem with planning everything too much is that you can't hold all the details in your mind at once

      Yeah, if only there was some way of tracking information without keeping at all in your head at once.

  9. Not a ritual! by eggfoolr · · Score: 5, Funny

    Crikey! That's just sensible work organisation. I guess if you find something that works and always do it that way you might call it a ritual. My ritual is to get in the car and go to work every morning... that way I can do, well you know... WORK!

  10. "Doing nothing" is not nothing... by jeko · · Score: 5, Interesting

    Here's a couple of long out-of-fashion words; contemplation and reflection.

    There is no "process" -- not change requests, not planning documents, not maintenance windows, not design documents, and for damn sure no flavor-of-the-month buzzword -- that can replace someone with a brain thinking the problem through.

    The problem with this is that it exposes the MBAs for the empty suits they are. Our "business team" -- salesmen with glorified titles -- sit through every meeting bloviating while the engineers get it done. The PMP certs are the worst about it. Me and a customer engineer will put our heads together about something, and decide on a course of action. The PMPs will jump all over it and send out emails about "deliverable actions items."

    One of the other engineers will mention something, and we'll realize we should take a different approach. While we're getting real work done, the PMPs will barge in demanding to know if that action items has been deliverabled yet, and if not we need to reprioritize our skill sets.

    I used to try to explain it to them. We were going to do that, but then we found out this, so were doing something different. I kept getting haughty responses about how they didn't need to know the little tech stuff, they were just managing the project.

    One of them went on at huge length about how you didn't have to be a doctor to be a chief of staff at a hospital.

    At that point I just began to feel sorry for him. Can you imagine living your life hoping and praying that no one will ever realize that you don't have the first clue about what you're talking about?

    --
    He put his boots up on the table and made a face. "The sig," he smirked. "You can waste your life in search of the sig."
    1. Re:"Doing nothing" is not nothing... by Chabo · · Score: 5, Funny

      Posting this for the second time in the past week, because it's apt:

      Could you grimace so I know you're working?

      --
      Convert FLACs to a portable format with FlacSquisher
  11. Close door by ichthus · · Score: 4, Insightful

    I write firmware for a living, and I WISH I had a door to close. Nothing is more annoying or infuriating on my job than when coworkers are loudly shooting the bull while I'm trying to read a datasheet and figure out register settings.

    "S.. TF.. U!"

    I can code with some noise in the room, but I need QUIET when I'm reading a tech spec. I wish I had the ability to mask external stimuli.

    --
    sig: sauer
    1. Re:Close door by Rick+Richardson · · Score: 2, Informative

      Wear Gun Muffs...

    2. Re:Close door by ajlitt · · Score: 2, Informative

      I bought a pair of Etymotic ER6i IEM earphones four years ago and I still consider it one of the best purchases I've ever made. I got them originally so I could listen to my own music at the gym without having the stuff they play there bleed in. They worked so well that I now use them in my cube or occasionally in noisy environments like our lab.

  12. WTF by Godji · · Score: 5, Funny

    he gets a big glass of water, takes everything off

    I stopped reading right there.

    1. Re:WTF by Anonymous Coward · · Score: 2, Funny

      I put on my robe and wizard hat...

  13. I am a C# programmer by Anonymous Coward · · Score: 2, Funny

    My ritual consists of watching this and then killing a goat

  14. Strategy vs tactics by Colin+Smith · · Score: 2, Insightful

    You can run just as hard and fast as you like. Doesn't do you much good if it's in the wrong direction.

     

    --
    Deleted
  15. When I find a bug by lhoguin · · Score: 2, Interesting

    My only ritual is that if I find a bug or a problem that I can't resolve in less than 5 minutes I take a few hours off. After a while I get back to it and am usually able to resolve it without much trouble.

  16. Re:Kids and their Crystals and Wheatgrass Juice by DrLang21 · · Score: 2, Interesting

    I would like to know how complex of a system you are designing with this methodology. No flow planning? No predefined input/output? No figuring out how your design will efficiently fulfill software requirements? Planning isn't all about rituals, though it's well known that doing something to focus your thoughts helps get the juices flowing. Planning is about figuring out how to not waste your time or money, and being able to effectively divide out work if deadlines are pressing in.

    --
    I see the glass as full with a FoS of 2.
  17. Programming is religious because... by kiwisteve · · Score: 5, Insightful

    Hell is other peoples code.

  18. Aha! by kiwisteve · · Score: 2, Funny

    This explains why Australians cannot write decent Java code, they can't find a virgin.

  19. Why programming rituals work ... short answer. by hey! · · Score: 4, Funny

    It's magic.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  20. Good material for this new Programming Course by Jonathan+Walther · · Score: 2, Interesting

    I'm developing a course for aspiring computer programmers. I've been at it on and off for the past year. The reading list is done, the course outline and coverage isn't entirely done but is shaping up. This sounds like material that should be covered. Does anyone have a good writeup or recommended book for inclusion in the course? The Programmers Stone guys sort of cover this material.

    You can see the course here:

    From Beginner to Master A Computer Programmer's Reading Course So, you want to be a computer programmer?

    --
    It isn't true unless it makes you laugh, but you don't understand it until it makes you weep.
  21. The key is really preventing useless distractions by ThousandStars · · Score: 2, Insightful
    What he's really describing is how he gets away from distractions and puts himself in an environment conducive to working. Regarding the former, I wrote about and linked to many of the essays and some of the research dealing with distraction problems in this post and talk about some of my environmental cues, including equipment, in this one.

    When you can prevent useless distractions, then you're really ready to go. Of course, I'm posting this on /., which shows me to be something of a hypocrite, but I think the point still a useful one.

  22. Take a shower by notthepainter · · Score: 3, Interesting

    I'm serious. I find that I solve many of my hardest problems in the shower. Now that I telecommute 100% of the time I'll often just take one, say in the middle of the afternoon, to jump start the solution!

    Obviously the shower has nothing to do with the situation, it is the "stepping back" that is important, so find something that works for you, and do it.

  23. Re:Kids and their Crystals and Wheatgrass Juice by khakipuce · · Score: 2, Insightful

    I agree, my first though when I read this was "what a ponce". We would all like more time, more flexibility and more peace and quiet, but transfer this guy's approach to say a Paramedic. There you are lying at the side of the road bleeding to death and the paramedic can't decide whay to do with out a whole heap of rituals. Planning, to a point, is obviously a good thing, but if you are a professional coder, cutting code is something you have done so often that you know the patterns, like the paramedic, you should be able to quickly assess the situation and apply the right techniques in the right way.

    --
    Art is the mathematics of emotion
  24. Thinking, and moreso drawing is overrated by Eudial · · Score: 2, Interesting

    I prefer to work with intuitive models. My "ritual" is as follows:

    1. Ponder the problem. Not too hard. Just get a feel for how to solve it.
    2. Prototype a solution in some readable language (python?).
    3a. If the prototype is horribly broken, scrap it and go back to step 2.
    3b. Otherwise, create final solution from lessons learned from prototyping.

    A lot of people draw diagrams and flow charts and stuff. But that is stupid and too abstracted from the computer to be all that useful. By making a prototype, you're effectively making an interactive diagram/flowchart. It takes about the same time, and any problems will be immediately obvious.

    --
    GAAH! MY PRINTER IS ON FIRE!!! PUT IT OUT! PUT IT OUT!
  25. He obviously doesn't work in the real world by Kintar1900 · · Score: 2, Insightful

    The office door is shut,...

    I've worked in software development for going on 15 years. I've never found an employer who realized giving developers rooms to themselves and a door would improve productivity. :P