In this quick post, I want to share my tricks to be a more productive coder. I know that everyone and their mother has a list of tips to be more productive… and here’s mine. Please keep in mind these are what work for me and may not be right for everyone, but it never hurts to see what works for others.
Set the Mood
For me, the setting of my work area is key to being able to focus and get things done. When my work space is well lit, I definitely feel more productive, especially a sunny day at my desk at home. Nothing beats natural light. Unfortunately, in most offices this isn’t always (or ever) possible, but bright florescent lights are still better than a dark room. A dark room and a bright computer screen leads to extra strain on your eyes and they get tired more quickly.
Background noise and/or music can be a good thing, but it can easily become a huge distraction. In my office we are lucky enough to be able to control our own music. Nothing kills productivity like being forced to listen to, for example terrible Politically Correct 80’s music. Yet it didn’t take long before I realized that a Pandora radio station with all my favorite bands playing for 8 hours a day, not only got old but also became a distraction as well.
As wonderful as an app as Pandora is, it still limits what you hear to what you’ve told it to play. It will give you some variety, even play something you haven’t ever heard from time to time, but overall, its pulling from the same playlist. I found myself getting frustrated about that song I’ve heard 3 times in the last few days or that band that I never really liked despite it being similar one of my favorite bands. Also when the best song of the best album by the best band comes on, you find yourself listening to it more than you are focusing on your code. That’s when it becomes a problem.
So what’s the solution? For me, it was music that I enjoyed but don’t necessarily know. Or better yet music without lyrics or lyrics that aren’t in English. My normal work day music has become less Ska and more Bebop, less Tool and more Salsa, very little Grunge and almost all DubStep. For me, these types of music are all fast paced enough to keep my mind chugging along, but because there’s little to no lyrics (or they’re in Spanish) I don’t get caught up in the music. Another tip that I find super helpful, don’t listen to the same genre of music everyday. Lyrics or no, you still are affected by the repetition and will get yourself into a rut.
Someone a while ago tweeted this and I’ve used it from time to time at home and found it is a nice change of pace. If you read the website, they talk about research done that supports the idea of an unobtrusive background noise actually boosting creativity. However, we all know that if background noise gets too loud it becomes a problem and once you’ve noticed it you can’t get yourself to focus on anything else. That’s when headphones become essential. I used to feel bad about shutting out everyone in my office when I put on headphones, but I quickly realized that I was making bigger strides in projects each day.
Sit at a Desk
Sounds extremely simple and maybe even stupid, but it works. For me, sitting at a desk puts my mind in work mode. On the other hand, sitting on a couch or chair with the laptop in my lap does the exact opposite, I get easily distracted, I think about putting something on the TV and sometimes I’m so much more comfortable that I get tired. Sitting at a desk forces you to have better posture and if you’re smart your desk is no where near a television or your XBox, keeping you clear of unwanted distractions.
Limiting your contact with the outside world while you work is one of the best suggestions I can give you and I haven’t been the only one to suggest it. I’ve read many articles toting the same advice. Your phone, email, social media are all wonderful things, but they will wreck your daily accomplishments. Each may only take a few seconds out of your day at a time; quick look to see if any emails came in, somebody posted something funny on Facebook you have to read or even your friend is texting you about upcoming weekend plans. All very harmless once in a while, but unfortunately we are saturated in all this technology and it sucks hours of our day away.
I know you can’t ignore your work email all day, but what about half the day? Or even 2 hours of the day in the morning? Keep your phone in your pocket, you don’t need to answer that text right away. That’s the whole point of text messages, its a message for when you have time to look at it.
There is absolutely no reason you should be looking at Facebook or Google+ while you’re at work. Some might even argue Twitter falls into that category and they, in a lot of cases, may be correct. My twitter is an exception to the rule and I know many others who could make that claim. My Twitter feed is 95% developers and designers, with a few exceptions and I’ve trained myself to block twitter out during the working hours.
Right Tools for the Job
This is a very general statement that is obvious for everyone, but it bares repeating. You can’t pound in a nail with a screw driver and you can’t code anything without a proper IDE, text editor or VIM, if you’re so inclined. I am not. I have a lot of respect for the purists that do all of their work in VIM, but I also think they’re crazy, maybe even unreasonable. What are you trying to prove?!
For me the right tools include Sublime Text 2, my MacBook Pro with magic mouse and if I’m at home an external monitor. Photoshop has become the last real adobe product I use, but I use it heavily. There are other alternatives, such as GIMP but I don’t feel it has all the tools I need.
Sublime Text 2
Sublime is the best non-IDE IDE I’ve found. Its super light-weight and for the most part only comes with what you install. It has an amazing Package Manager and crazy support with plugins and syntax highlighters and linters. With built in things like fuzzy file search/open, multiple cursors and a huge range of keyboard shortcuts (that can easily be customized) I spend far less time reaching for the mouse and more time coding. Sublime Text has probably increased my productivity more than anything else. I highly recommend you try it if you haven’t already.
If you don’t believe me or are still on the fence, this made my mind up for me and I believe it will for you too.
Github or Any Versioning Repo
If you’re not using a versioning system, you’re making your life 100x harder than it needs to be and also setting yourself up for disaster. Tools like Git and Subversion have become a crucial part of coding as a team. Allowing a group of coders to work on the same website, web application; or whatever really, at the same time without the risk of one over-writing or completely screwing up the code base.
Committing and Updating your project regularly makes it impossible to ever lose your progress. Also it keeps your code in a safe and easily accessible place for later projects that may need similar aspects.
Capistrano is a deployment method that has completely replaced the need for FTP-ing in my life. It’s great for rails projects, node.js projects and even those 3 to 4 page PHP sites you crank out on a weekly basis. Capistrano deploys your code to your desired destination via SSH and a repository like Git or Subversion. You can configure it to keep a number of releases making rolling back to a previous version of your app/website one line in the terminal- a must when managing many sites with multiple environments (development, staging and production).
These are just a few of the great tools that I use but they are probably the most important for me. Other great tools you may wish to look into:
The most important thing to take away from this post is to find what is best for you. Also… Share what you find.