Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: What helps you produce code faster?
9 points by stevenameyer on Dec 2, 2012 | hide | past | favorite | 19 comments
For me it is completely shutting out every around me. Headphones on, music loud, and food and drinks on my desk so I don't need to get up which normally ends up with me getting distracted.


Having a suite of unit tests I can rely on. It helps me avoid the paralysis that occurs when I wonder "what else might have been touched by this code I changed?" I can give that ? a couple minutes thought, write whatever changes I need, and then run the suite to see whether I missed anything. That factor more than almost anything else helps me write code quickly.


- Chrome alarm extension to alert me when 1 hour of work has passed after which I get away from the computer for a few minutes.

- StayFocusd Chrome extension to prevent me from going into social networking sites while I'm working

- "...knowing that all the \"other stuff\" I have to do is done. Inbox clear, no meetings about to happen, etc."

- Knowing when I'm too tired to keep working efficiently

- Being away on IM/IRC except for work

- Keeping work conversations to IM/IRC as much as possible

- "...shutting out every around me. Headphones on, music loud." I prefer music without vocals, e.g., electro

- Using http://www.gunnars.com/ to minimize eye fatigue

- Knowing Emacs well to improve code editing speed

- Having unittests to validate my changes quickly

- Using screen or tmux to quickly switch between shells while maintaining a full screen for each...code, shell, unittests, Python shell, database shell

- Using Xmonad to quickly switch between Desktop workspaces while maintaining a full screen for each

- Avoiding the mouse as much as possible, even on the browser (Vimium extension)

- Using the ThinkPad nipple when I do have to use the mouse

- I don't use an external monitor at all. I find the constant neck motion to switch between them tiring and distracting. The combination of screen, Xmonad and Gnome notifications allows me the same application throughput with less distraction and without sacrificing screen space.

That's just off the top of my head. There's probably a lot more. Maybe I should write a blog post about it.


Have you set up custom notifications?


Only for my USB sound card when it is connected and disconnected. But, that's more of a nice-to-have. Everything else is built into the programs I use and into Gnome.


Motivation. If I'm motivated to get the work done, I will have razor focus. If the task is something someone else wants me to do (but I don't particularly want to do), then I won't be as motivated and it won't get done as fast.

Additionally, I don't like doing tedious things, so I always try to make whatever I'm doing as less tedious as possible. For instance, I'm supposed to get some feature working. The underlying code is very complex. Getting the feature working wil be very painful and tedious. If I can refactor the underlying codebase first, implementing the feature will be less tedious and more enjoyable. The problem is that sometimes my team mates don't want me refactoring code, so I'm forced to trudge through the complex code and it takes me a lot longer to do it that way.


- no email - no im - no texting or phone calls

- knowing _exactly_ what I want to achieve, no exceptions (this doesn't include the how part but only the what part) - repeatedly playing the same music for hours, closing out every noise that makes me think about anything else but the task - not engaging in any other activities on the computer I'm working on before I start working because I find myself going back to those activities from time to time which is a huge distraction - last but not least a bottle of water or a cup of tea


One hack that has really, really helped me is putting what I'm doing next into my git commit logs.

For example: git commit -a -m "Finished writing tests for Car model. Now implementing car.drive, car.park, and car.accelerate."


1) Focus and concentration, without distractions.

2) Think a little bit before writing on what you will write. Thus I have better program with less need to rewrite.

3) Using a 13inch laptop. The small screen estate forces me to concentrate on what I am doing right now. No place for other editor windows or browsers or anything else, just my code and my work.

What does NOT make you faster:

1) Having a special mechanical/ergonomic/whatever keyboard.

2) Having multiple large screens with tons of windows open. This is most of the time distraction and not helpful. Avoid it.


I use 5 monitors. I can't overstate the productivity edge this gives me, particularly for web and web/backend dev.


How big are said monitors. I think 2, maybe 3 is my limit (although the screens are pretty big). Can't imagine being productive on 5.


I have 6 24" FHD monitors. Although not all are in constant use, I find it useful to not have to drag windows around to check different thing (mail, skype, IDEs, etc..).


What's your configuration on that? 3x2, 2x2 with 1 to either side of that, or 6 in a row?


3x2

Like:

[] [] []

[] [] []


On the contrary, for me complete silence, dead-minimal desk and a piece of paper and a pen seem to work much better. I take programming as a serious task, I need to be 100% focused.


Old repeats of stuff like Friends or Scrubs on the TV and quiet everywhere else in the house helps me most.

If I have Spotify playing I end up always searching for the next song.


its old Simpsons episodes for me. Ones I have seen so many times I could quote every scene, if I have something on in the background that I don't know as well I'll be very distracted


For me, it's knowing that all the "other stuff" I have to do is done. Inbox clear, no meetings about to happen, etc.


Uninterrupted time. Good luck coding if you have a girlfriend.


focusing on what needs to be get done! And breaking the things in small bits that can be achieved easily.

And well I mostly code in nights, so there arent much disturbances.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: