Ask HN:Where and when do you code?

8 points by vynch ↗ HN
lol no I dont mean where in the virtual address space...I mean where in the real world do you actually sit down and write code.?..What kind of lighting conditions are there? it is open air?..Is there music playing in the background...What time of the day seems to be ideal?

I have been trying to solve this problem for a while and it seems like some places and times are better than others to the programming mind.Please let me know what your thoughts are and also point me in the right direction if any of you have thought about this problem before.

Thanks vynch

11 comments

[ 2.6 ms ] story [ 34.1 ms ] thread
I like to program whenever I'm not tired. I usually listen to music with headphones on. This helps to block out other people in the office or the tv/other people at home. Programming when tired leads to errors and forgetting where you left off when you have to stop or take a break. I rarely program outside. The glare on the screen is too much to deal with.
agreed...programming when tired is very unproductive...headphones is a good idea too!!...to not forget where you left off I try to write down a small note to my future self in the last git commit!!

>The glare on the screen is too much to deal with. Now tht can be solved with a laptop with a good display and and some shade!Remember the quote from Office Space "Human beings were not supposed to sit in their cubicles all day looking at computer screens"

I like to sit in cafes and code. It's not as socially isolating and the distractions are easy to block out because they are random and unimportant to me. Distractions at home or the office are much more difficult to ignore.
well it seems like social isolation works sometimes and sometimes you need people around you...i am going to try cafes from next week....although the problem is not many places are open all night....thanks for the response..:)
I'm most productive in a silent, mostly empty room at 2:00am. I'm pretty much worthless as a programmer if I'm in the presence of other people.
hahah...yeah tht holds true for me too!!...especially in presence of people i know!!
I find being in the right frame of mind is more important than location. I code at my desk, I code on the sofa, I code on public transport, I code at the pub if I get there before my friends, I code in bed in the middle of the night if I cannot sleep.

Sometimes I need to listen to music to block out distractions. Sometimes I don't.

You say that "it seems like some places and times are better than others to the programming mind." That's true, but it's also dependent on the programming mind in question, both in terms of different people having different optima, and individual people having different optima over time.

Yes it is dependent on the programming mind in question..my asusmption is that programming minds are similar and would react similarly to the same stimuli!!

I agree that getting into the right frame of find is important..what I am trying to do is trying to find ways to get my brain into the right frame

If its a technology I'm not great with (most things these days), I usually need to learn as I code. And since I do my best learning in silence, thats what I go for. But programming with a familiar framework, I'm fine with whenever and whatever except silence; need some background white noise. I usually DON'T use music for white noise (I get distracted because I know the songs), preferring instead a lounge, cafe or a 7/10 movie playing in the background.

I've been working on an iOS contract job for the past two weeks. I wrote at home in silence as I knew very little of the features they asked me to implement (using vDSP, MapKit, GameKit, Remote I/O Audio in conjunction). I went to client location only to put finishing touches/last minute addons/testing. (Client Location wasn't exactly geared for a productive developer environment - too much noise, too many distractions)

Turned out to be great app - they loved it and it taught me a lot about iOS, DSP, and my working preferences.

thanks for the response....what kind of places do you go to .....starbucks?....i agree that most corporate offices are not very good for programming at all!!
At a marker board, in a notebook, in the shower, on the bus...the typing part is largely just data entry and debugging.