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?"
Lightly sweetened breakfast tea, rainy weather outside, window cracked with a brisk morning breeze.
Oh, yeah, and vim. Emacs can suck it.
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.
...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...
If you think this is a troll, you obviously don't work amongst people. Just shut up for a while and maybe I'll get that done, but with all your blabbing and meetings and documentation I just cannot do what you're paying me to do.
Now go away.
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.
Sadly, by the time I get to a computer I often lose some great coding ideas.
Flexible bare-metal recovery for Linux/UNIX
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!
Next to the fireplace, with my son sitting on my back. Doesn't get any better than that. I would have thought it distracting to work from home like this, and instead I think I've written more, and better code, than I have before. Just awesome. One thing I could improve, would be to have some music going... but that's just laziness on my part.
This is my sig.
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.
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.
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.
Those sound like mostly horrible conditions to work in! :)
Although place is important, time is probably MORE important. And this is where people will differ even more. I know people that will get up at 5am and get most of their "good" work done by 9am. That's not for me. :)
My personal best time is later at night. a) most people are sleeping, so not too many IM distractions. b) it's quiet, the neighbourhood is quiet, wife is most likely asleep, it's quiet. I can think.
In terms of place, most of the time, these night sessions are done in my home office.
AirSpeak - http://itunes.com/apps/AirSpeak
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.
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.
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.
Your basement intrigues me and I would like to subscribe to its newsletter.
My favourite coding place? Well, I code for a living, and I have to say work, without a doubt. I'm far too easily distracted -- work is the worst place to get stuff done, except for all the others.
That said, badly-designed workplaces can destroy productivity. If your workplace is anything like mine, where your employer doesn't give a rat's arse about their developers' productivity, everyone will be sat at packed-in "open plan" offices, where every stray, stupid remark, every loud phone call, every meeting and every joke (and resulting braying laughter) meld together to create a totally useless work environment.
Perhaps that question should be rephrased to "what time of day do you get most work done?". Given the City's workaholic culture, most folks leave the office at 7.30pm, so my productivity peaks some time after that.
Yeah, I'm a sad bastard with no life :-)
Best productivity is in India. Not sure if it's the food or what... but I am 4x as productive as in the US.
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!
i love coding with my boss in my shoulder pseudo-auditing my code and constantly reminding me the project schedule...
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.
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?
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
It sounds like a joke, but I seriously code best with a gentle beer buzz, my boss will never believe me, but its true.
Because it's totally geared towards developers, developers, developers, developers!
Support my political activism on Patreon.
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.
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.
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.
For starters: Don't make me feel like a criminal because I forgot my access card. Don't hire minimum wage jerks in uniforms to eyeball everyone suspiciously. Don't make me walk past 60 cubes just like mine so that by the time I sit down I feel like the worthless piece of interchangeable shit you obviously think we all are. Don't send me weekly emails reminding me that my every electronic move is logged. Get rid of those freaking eyeballs in the ceiling every 20 feet. Shove your 50 page human resource manual up your ass. Help me forget that working wasn't always like this and doesn't have to be now.
See? I am starting connect with my inner muse already...
Search the google for mindfuck pictures. When you see it, you'll shit brix.
Personally I've found that I get a lot more done at work, but late at night or on a weekend. If I'm on my home machine coding in my spare time, then I'm easily distracted. Something interesting comes on TV, I decide to log onto WoW for a bit, I get hungry and go for a snack, etc, etc. When I'm actually trying to work on a project I can wring MAYBE an hour to an hour and a half per night out of myself. And that's often done while tabbing back and forth between iTunes and other assorted apps.
At work, during standard business hours, I have more legitimate distractions, but still distractions. Seems like somebody is always calling, or I have meetings to attend, etc.
The times when I've noticed that I really tear through a to-do list is when I'm in my office late at night. The building is quiet, there is nobody to bug me, and my work machine has virtually no "fun" software installed on it. About all there is to compete with there is Slashdot and Penny Arcade :), which don't take up much time to check. I've literally had things that I figured would take me 2 weeks to complete that I've stayed an extra 4-5 hours one afternoon and completed in one swoop.
"People who think they know everything are very annoying to those of us who do."-Mark Twain
Not too original as it's already in the article but it's the coffee shop for me. The office is too quiet, home is too distracting. Coffee shop is just right. It takes some good code to make a profit though with all those overpriced treats around.
...is in my PANTS! Oh-YEAH! ;-)
"Klaatu, verada, necktie!" -Ash
Anywhere without other people distracting me. Microsoft's Project Manager book pointed out that developers work best if they're interrupted once an hour or less. And they're damn right.
My most productive coding environment is any one in which I don't have access to slashdot! But seriously, I need closed doors so I'm not subjecting to interruptions, and fast 'net access for googling for solutions to problems rather then figuring them out by myself.
I've abandoned my search for truth; now I'm just looking for some useful delusions.
My best code is produced when the pressure is on. Just last weekend I was participating in a robotics contest and coded a crude OS for a micro-controller in the 5 hours leading up to the competition. It was very simple, but worked well and I was even able to provide simulation outputs when run on a normal PC.
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
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.
I listen to the blues while coding. Interpret that as you will.
If my boss is reading this that was a joke.
The best piece of code I ever wrote was on a cross country flight. It was an integral piece of the project I was working on, and in a span of about 2 hours I had greater productivity than in most of the rest of the year put together. Of course, that was a long time ago before coach seats got so small that sitting comfortably let alone working became out of the question.