Slashdot Mirror


Where's Your Coding Happy Place?

jammag writes "Cranking out code — your very best code — requires being in the optimal environment, muses developer Eric Spiegel. He explores the pitfalls and joys of the usual locales, cubicle, home, the beach. He claims he's done his best coding on an airplane. In the end, though, he suggests that the best environment is a matter of the environment inside yourself, your internal mood — and to hell with the cubicle or wherever. You have to be focused on quality, regardless of the idiot clients. It's all inside your mind. Where's your coding happy place?"

49 of 508 comments (clear)

  1. A matter of the environment? by James+Skarzinskas · · Score: 5, Insightful

    Lightly sweetened breakfast tea, rainy weather outside, window cracked with a brisk morning breeze.

    Oh, yeah, and vim. Emacs can suck it.

    1. Re:A matter of the environment? by DahGhostfacedFiddlah · · Score: 5, Funny

      WRONG.

      Black-as-hell coffee, bright moonlit night outside, but I'm stuffed in a windowless basement with no ventilation, using Emacs.

      On Windows.

      ME.

      Yes, that's how far I'll go to counter one of you VI-loving lunatics.

    2. Re:A matter of the environment? by RemoWilliams84 · · Score: 5, Funny

      WRONG.

      Getting a blowjob with a gun to my head.

      --
      "I don't have to think. I only have to do it. The results are always perfect, but that's old news." - Meat Puppets
    3. Re:A matter of the environment? by Evanisincontrol · · Score: 5, Funny

      Lightly sweetened breakfast tea, rainy weather outside, window cracked with a brisk morning breeze...

      ...John Travolta singing to me, wearing nothing but a thong and a bottle of baby oil...

      What? Oh, sorry, I got lost in your poetry and thought we were describing a romantic evening in San Francisco.

    4. Re:A matter of the environment? by zarthrag · · Score: 4, Funny

      WRONG

      *Giving* a blowjob with a gun to my head.

      --
      Why can't all fpga/microcontroller manufacturers just release free optimizing compilers???
    5. Re:A matter of the environment? by Anonymous Coward · · Score: 5, Funny

      *Giving* a blowjob with a gun to my head.

      Sounds like my last blind date

    6. Re:A matter of the environment? by Chris+Burke · · Score: 4, Funny

      ...John Travolta singing to me, wearing nothing but a thong and a bottle of baby oil...

      What, like, as a hat?

      --

      The enemies of Democracy are
    7. Re:A matter of the environment? by Lillesvin · · Score: 4, Funny

      Make that:
      coding_performance_level = (vi + smokes + (coffee | mountain_dew)) * (100 / hours_to_deadline);
      and you got a deal. ;-) And yes, the inverted division is on purpose. (Btw, you've got one too many opening brackets - or one too few closing brackets depending on how you look at it.)

      --
      "Live free or don't."
    8. Re:A matter of the environment? by cjfs · · Score: 5, Funny

      WRONG

      *Giving* a blowjob with a gun to my head.

      RemoWilliams84, meet zarthrag. zarthrag, RemoWilliams84.

      I'll expect the new kernel by Friday.

    9. Re:A matter of the environment? by pyite · · Score: 4, Funny

      And yes, the inverted division is on purpose.

      One serious problem with this. Your performance level is something like: constant/hours_to_deadline. Assuming you work to the deadline (logical), you will perform an infinite amount of work as the integral(1/x) on the interval 0 to t diverges.

      If you can sell your boss on this, though, bravo.

      --

      "Nature doesn't care how smart you are. You can still be wrong." - Richard Feynman

    10. Re:A matter of the environment? by Tubal-Cain · · Score: 4, Funny

      Cold? Yes.

      If cold is a possibility, you don't have nearly enough servers.

  2. In My Opinion, a Truly Horrid List by eldavojohn · · Score: 5, Interesting

    Nearly every location on this list is full of distractions. True, I can multitask while the TV is showing something I've seen or do not care about. Unfortunately, if it's a movie out of my Netflix queue, it greatly hampers my progress.

    Some of these places are just plain uncomfortable like public transportation or an airplane.

    Your bed?! The place where you sleep? Seriously? Granted there aren't a lot of places to suggest, this list blows. I'd be swimming if I were near a pool.

    For me the biggest factor is nice studio quality headphones covering my ears producing low volume music. Maybe it's my favorite non-talk radio station (The Current or Radio K) or maybe it's some classical/jazz/rock album I just picked up. My hands and eyes are busy only with the task at hand. An internet connection will help break the monotony for short periods of time and keep me at full operating power. After that, I like to have hot tea, coffee or water at hand to drink and maybe some raw almonds to munch on. A relaxed position and a bathroom within short distance makes for the optimum coding environment.

    Assuming I have no questions about requirements or technology, this is the state I usually like to be in.

    --
    My work here is dung.
    1. Re:In My Opinion, a Truly Horrid List by AuMatar · · Score: 5, Funny

      Perl. That's enough lines per day to rewrite every application in existence. Unfortunately, being perl none of them can be debugged, so he has to redo it again the next day.

      --
      I still have more fans than freaks. WTF is wrong with you people?
  3. Oddly enough... by yorgo · · Score: 5, Interesting

    ...it was while waiting (and waiting, and waiting) to be called to sit on Jury Duty. I sat outside on the smoking patio (middle of summer) near an outlet with my laptop and generated some of the best code of my life. Perhaps I should start volunteering for Jury Duty...

    1. Re:Oddly enough... by bigredradio · · Score: 3, Funny

      Thanks for the tip. I just got a jury duty letter and was avoiding it. I'll give it a shot.

    2. Re:Oddly enough... by Archangel+Michael · · Score: 5, Funny

      I'd Love to serve on a jury. However, I'm afraid I don't qualify to sit on a jury. You see, I'm a A-Hole with a brain.

      So I get the summons, and show up ...

      Judge: "Does anyone here know any of the parties involved in this matter?"

      Me: "Why does it matter?"

      Judge: "Dismissed"

      Me: "I didn't say one way or the other"

      Judge: "I said dismissed"

      Me: "Yes, I heard, I'm just wondering why"

      Judge: "I don't have to tell you"

      Me: "No, but I'm sure all these people here want to know, especially now that I'm bringing their attention to it"

      Judge: "Another word from you and I'll hold you in contempt"

      Me: "How does being on FOX NEWS sound to you?"

      Judge: "Bailiff, remove him please"

      Me: "Don't Taze me bro"

      Bailiff: .... ZAP

      --
      Agent K: A *person* is smart. People are dumb, stupid, panicky animals, and you know it.
    3. Re:Oddly enough... by LaskoVortex · · Score: 4, Informative

      Depends on your jurisdiction, I'm guessing, but at least when I served they left me, another programmer, and a chemist on the jury.

      You got tapped because you don't know what you are doing. The trick is, when they get to you and ask you about your job and spouse and such, is to proclaim clearly and in your best and most assertive and confident Obama voice, that you are "able to be 100% impartial and will consider only the evidence presented" and, because of your training as a scientist/engineer, are "never swayed by emotional appeal". If you do this, you are the next juror excused no matter whose turn it is to excuse jurors. It works every time for me.

      --
      Just callin' it like I see it.
  4. Best place != Most pleasant by mcrbids · · Score: 4, Insightful

    Sad to say, but the "best place" to code in depends on what your goal is.

    After the best quality code? The best place is a quiet place, free of distractions, where the problem can be easily and clearly understood.

    Want the best mood while coding? That's when you consider the balcony of a beach-front apartment, or a nice table with comfy chairs at a restaurant with a view for the afternoon.

    Pick your goals, then come up with what you are after.

    The trick is to find a place with a good combination of comfort for long-term developer happiness and contentment and actual good results. So a nice office with full snacks, comfortable chairs, nice lounge, music, being treated with courtesy and respect, decent pay, decent benefits, and having the freedom to develop in a non-restrictive manner, while still being held accountable for the result is a good mix, and that's where most businesses tend.

    Including my own.

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
    1. Re:Best place != Most pleasant by Red+Flayer · · Score: 4, Interesting

      After the best quality code? The best place is a quiet place, free of distractions, where the problem can be easily and clearly understood.

      I'm not sure that's a universal truth. I concentrate best, for example, where there is a constant murmur (or even din) of background noise. It doesn't matter if it's quiet or loud, but both silence, and variations in the volume of noise, are bad.

      I've produced some of my best code next to a loud brook, birds chirping, etc -- but I've also produced some of my best code in a noisy bar at happy hour and in Grand Central Station at rush hour.

      Silence is anathema to good quality code for me -- constant subtle distractions are a great way of grabbing my focus when necessary so that my subconscious can work out a problem.

      --
      "Trolls they were, but filled with the evil will of their master: a fell race..." -- J.R.R. Tolkien on Olog-hai
  5. In my head while driving. by bigredradio · · Score: 5, Insightful

    Sadly, by the time I get to a computer I often lose some great coding ideas.

  6. For me, it's music, not place. by Dr.+Manhattan · · Score: 5, Insightful

    I need music with no vocals - mostly classical and techno. I have a special playlist called "coding" for those times when I really need to be focused.

    --
    PHEM - party like it's 1997-2003!
    1. Re:For me, it's music, not place. by kevingolding2001 · · Score: 5, Interesting

      And Eno! Lots of Eno.

  7. Not a matter of where, but when by Swizec · · Score: 4, Interesting

    It would seem that no matter where I am, the best coding I do is at about two to four in the morning. It's that time of the day when the internet is somewhat at rest because aussies are going home from work and having dinner, americans are just starting to actually work, or are getting to work and europe is mostly at sleep.

    Then just put a movie or some tv show on the second screen and code away. Nirvana.

    However about writing fiction or any sort of prose, I'm very picky as to the locale. It has to be a busy coffee shop or better yet, a club event. No idea why, just has to.

    1. Re:Not a matter of where, but when by try_anything · · Score: 4, Funny

      If you don't like waiting for the internet to settle down at night, I find it helps to wrap some old towels around the tubes. That muffles the sound of the bits flowing through. American bits are pretty loud no matter what you do, unfortunately.

  8. I thrive on stress by eln · · Score: 5, Funny

    I'm at my most productive at 2am the night before the project is scheduled to go live.

    I'm at my second most productive at 9am the following day while I'm patching the running code on the live system to fix what I didn't have time to test the night before.

  9. Re:On my floor in the family room... by Anonymous Coward · · Score: 5, Funny

    Dang, dad, I am 35. Can't you write your COBOL some other way?

  10. If any friskiness starts up... by Zakabog · · Score: 4, Funny

    Perhaps the serenity of being next to your significant other results in perfect code. If any friskiness starts up, then maybe itâ(TM)s time to go back out to the couch.

    I'm sure it was only intended as a joke, but if any friskiness starts up while you're coding in bed, and you choose to move to the couch, then maybe it's time to rethink your priorities.

  11. Silence by tritonman · · Score: 5, Insightful

    Anywhere there is silence. I hate trying to think while listening to people blabbing on the phone or BSing with each other across their cubes.

    1. Re:Silence by networkBoy · · Score: 4, Interesting

      I like coding in my lab, after hours when nearly everyone has gone home.
      Janitor comes by around 7:30/8:00 and I thank him, listening to techno or classical, depending, I'll get more done in that span between 5:30 and 9:30 then many others in my department will get done in an entire week. Alas, the powers that be have banned overtime, so now I don't pump out as much code. To witt, here I am, as always in the afternoon...

      -nB

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    2. Re:Silence by Like2Byte · · Score: 4, Interesting

      listening to techno or classical, depending, I'll get more done in that span between 5:30 and 9:30 then many others in my department will get done in an entire week.

      I totally agree. When I was able to listen to my iPod (before I lost my tunes - doom on me) I listened to Classical, techno and trance. Wow! Depending on my mood, I'd get more code written than at any other time. It didn't matter what idiot-fest was going on around me, either. Plug me in and BAM! I'm gone. I feel I got more work done in a year at one of my coveted jobs than at 4 years at others.

      Music is where it's at. And, no - I wasn't in band in high school.

    3. Re:Silence by Alexandra+Erenhart · · Score: 4, Interesting

      Agree. When I'm in silence, I have so much stuff inside my head that I end up being in my own way when it comes to thinking. Music puts my ideas in order and it lets them flow, like the spice, oh yeah. Also it has to be music with no lyrics, cause I end up singing and I can't sing and code. Must be something in my brain :P.

    4. Re:Silence by seek31337 · · Score: 3, Funny

      I think he's offering, dude!

      --
      No SIG for you!
  12. The Zone by clinko · · Score: 4, Insightful

    I don't have a place, I have music and caffeine. If I hear old Crystal Method or Orbital, I immediately think of late nights in the zone with Mountain Dew and Code.

    The only enemy of "The Zone" were morning birds.

    If I heard birds chirping, I knew I didn't have much time left before my mind would go.

  13. The basement?!? by mcrbids · · Score: 4, Funny

    While the basement is quite good for me, I always get interrupted by my partner as this is her favorite place too. What we do while there is just not relevant to Slashdot's audience at the moment. But I will say I hardly get anything done on the coding front when she drops by.

    What... does your mother make you pick up your dirty socks?

    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  14. Best Place to Code by Anonymous Coward · · Score: 5, Funny

    Best productivity is in India. Not sure if it's the food or what... but I am 4x as productive as in the US.

  15. Fire alarm? What fire alarm? by PolygamousRanchKid+ · · Score: 5, Interesting

    For me, when I am really seriously coding, I could just about be anywhere; nothing would disturb me. As a matter of fact, a couple a weeks ago a colleague grabbed me on the shoulder at work, while I was hacking away, and said, "We have to get out of here. There's a fire alarm. Didn't you hear the alarm?"

    Um, no, and I wasn't wearing any headgear.

    --
    Schroedinger's Brexit: The UK is both in and out of the EU at the same time!
  16. with my boss... by cbuosi · · Score: 5, Funny

    i love coding with my boss in my shoulder pseudo-auditing my code and constantly reminding me the project schedule...

    1. Re:with my boss... by monkeySauce · · Score: 4, Funny

      I would totally code with my boss. If she was leaning over my shoulder and inviting me to her bedH^H^H reminding me about the project schedule, I could code like all of Windows 7 before lunch.

      So I guess my coding happy place is where the women are hot and the project milestones involve sex.

    2. Re:with my boss... by monkeySauce · · Score: 3, Funny

      What kind of crappy code can you deliver while being distracted by hot women?

      Didn't I say Windows 7? I thought I said Windows 7.

  17. Not really coding... by immakiku · · Score: 5, Interesting

    I was once designing an algorithm to do something at a lower running time, combining a mixture of data structures and graph theory. I had stayed up almost 22 hours in front of a computer to get it done because I thought I was "almost there".

    Then I fell asleep, jerked awake 4 hours later because I had actually solved it in my dream. When I woke up I realized that the solution in my dream was not complete and that there was a flaw with it. With another hour of modification I finished it up.

  18. Cube, late, quiet, music by dazedNconfuzed · · Score: 4, Insightful

    Best? Coding in my cubicle, from 4-11PM, trance/techno playing at moderate volume, and absolutely no interruptions. Productivity is amazing.

    Unfortunately, for no articulable reason I'm required to work 8AM-5PM, interruptions are constant (walk-in/stand-up meetings happening constantly, PA system calling people, factory running across the hall, doors never stay closed. Productivity is ... well ... go figure.

    --
    Can we get a "-1 Wrong" moderation option?
  19. In a good team by decipher_saint · · Score: 4, Interesting

    A tight team of bright progressive individuals has always brought out the best in my work.

    Crappy co-workers, moronic "hands in" managers, noise and meetings that don't produce anything are utter poison. Obviously interruptions of any kind are deadly to productivity, but sometimes that's part of the job and is usually profitable.

    I guess what I'm saying is my productivity is directly related to who and not where.

    --
    crazy dynamite monkey
  20. In all seriousness anywhere with a fresh pint. by zbend · · Score: 3, Insightful

    It sounds like a joke, but I seriously code best with a gentle beer buzz, my boss will never believe me, but its true.

  21. Stevie Ballmer's lounge by bluefoxlucid · · Score: 4, Funny

    Because it's totally geared towards developers, developers, developers, developers!

  22. Anywhere, really by Tyr_7BE · · Score: 4, Interesting

    Back when I was in my undergrad I bought into the whole idea that "I need conditions to be pristine in order to create". Now, a few years spent working in industry, looking back on this view makes me feel like I was a bit of a diva. My brother is a musician and he claims something similar - when he was first starting off, he subscribed to the view that he needed his environment to get into a "creative zone". But the more he wrote music, the easier it got, to the point where he can do it just about anywhere without being affected too much.

    I mean really, if you're focusing that much on loop constructs and variable names that you can't do it anywhere except places where conditions are ideal, then I guess that's you. But for me, the really important parts like architecture strike me when they strike me. Usually when I'm going about my business doing the groceries, or in the shower, or on a bus, or something like that - whatever's been tumbling around in the back of my mind takes on some semblance of form, and pops to the forefront when it's damn well ready, not when the ambient light is at a certain strength and the atmospheric pressure is just so. I don't subscribe to the view that I need a "creative zone" in order to produce properly. Once I get hit with an idea, getting it out into code is just drudgery. That can be done anywhere.

  23. You'd love google by Wee · · Score: 4, Interesting

    They pack 4-5 developers inside these glass-walled cubes. So there's no end to the visual distractions. And then you have overcrowding in conference rooms, so people routinely host meetings in the offices. Or they merely dial in using their speakerphone. Lunch is always a good time because they make it super easy to grab a tray and take it to your office to eat. So if you get an office mate who likes to work through her lunch by slurping incredibly stinky Indian food, you're a very lucky guy.

    Most unproductive place in the world to try and think about coding, expect maybe a steel foundry or a slaughterhouse or a circus big tent.

    The only bright spot is that if you ask about places that might be a little quieter, they give you these really nice Sennheiser headphones. Not so good if you dislike having something on your head 10 hours a day, though.

    Toward the end there it got to where you'd instinctively know which interview rooms or whatever weren't take. If you dim your screen all the way down and shut off the light, you can get maybe four hours straight work in before it's back to the sights, sounds and smells of the cubicle zoo.

    Sounds like you'd fit right in. You should apply.

    -B

    --

    Ash and Hickory, straight-grained and true, make excellent bludgeons, dandy for the cudgeling of vegetarians.

  24. My coding? by CompMD · · Score: 4, Insightful

    My office, from 8am-5pm, with soft music playing on the speakers, overhead lights off, desk lights on, door open half way (I'm in a somewhat quiet hallway).

    Why 8-5? Because its my job, not my life.

  25. In the shower by MtlDty · · Score: 3, Insightful

    No seriously. I've had some real moments of epiphany whilst mulling over problems from the day before. Sometimes its only when you're away from your keyboard that you start looking at the bigger picture rather than the minutiae of individual classes/methods

  26. Not on topic, but... by Weaselmancer · · Score: 5, Insightful

    at work I'm not allowed to listen to music at all.

    Your employers are douchebags.

    What the crap could it possibly matter if you have an MP3 player stuck in your ears? I'd love to hear somebody actually make a good case for it. If you're a doctor and you have to listen for pages, or a jet pilot who needs to hear audio alarms - fine. But a coder? Give me a break.

    This sort of micro managing "you're still in kindergarten" crap always pisses me right off. It insures an unhappy workplace, and that insures poor results. Who wants to do their very best for someone who treats them like a freaking toddler?

    --
    Weaselmancer
    rediculous.