Productivity Tips for Programmers
blog.interviewstreet.com
blog.interviewstreet.com
I haven't been programming a lot but here are some ideas that I've found, in similar vein to the parent article.
1. Watch Bram Moolenaar's talk or read his notes - http://www.moolenaar.net/habits.html . Essentially learn how to use your text editor, as that's the thing you're going to be spending a good deal of your time in. In three steps, his suggestion is - Find what you're doing repeatedly, automate it and bind it to a key, make it a habit.
2. use a good version control system. Use a DVCS like git/mercurial/bzr and make lightweight branches for even the tiniest little features. That'll allow you to multitask like crazy! If you start properly using branching, you can write more code quickly and safely and switch between contexts.
3. Make sure your build system is optimal. If you spend too long waiting for builds to take place, maybe you can explore options to make it better.
4. The most important productivity secret imo - ACTUALLY WRITE CODE. Don't think about writing code, don't read blogs about writing code, don't follow twitterers who write code. Most importantly, don't get distracted and idle away when you're trying to write code.
I have some amount of mastery over my text editor, my language, my OS, etc. But none of that compares to the mastery and discipline of sitting down, concentrating and not letting your mind wander too much - something that I am trying to attain, but it's harder than I would like it to be.
Totally agree with your 4th point. Unless you actually write code, nothing will help you..
More important than unit test and all that trivial stuff, what matters a lot in my experience is the ability to write for changes. That's really what's difficult about most programming tasks: how to deal with changing specs, change of deployment environments, etc...
Don't agree on Unit test being trivial. Infact, it is one of the things that aid you with changing specs and code. It helps you change your code with confidence. That really matters.
I appreciate your overall point, had just one correction. thanks.
In a time constraint environment, you often need to make a choice between more tests and more features, etc... I have seen a lot of people who said their code was great because it was well tested, but then the tests depend so much on the implementation that it actually goes against better code (since refactoring may mean breaking a lot of unit tests). So the more interesting question is: what to test, how, and how far. For example, my own rule for testing is that in general, I don't test something if testing it takes more code than the feature itself (except for regression testing, and things which really play well with testing, like parsers and the likes, and code which needs to run on many different platforms).
It is also useful to recognize when testing has value, and to avoid overestimating its actual benefits. Too often, people don't really think about failures when testing, or how the API it exercices can be used in a straightforward manner or not. For example, I don't get so much the value of TDD - I find it much more useful to think in terms of API usecases, for which small tests are often not well suited. Sure, designing for easy testing can help, but you can get the same benefit without TDD in my opinion.
Finally, too often, I see "this library is well tested" sold as a feature in open source projects - but test coverage is not a feature. Sure, everything else being equal, I would prefer a well tested library to a not well tested library. But everything else is not equal: there is a constant tradeoff between designing better API, getting a better documentation or installation process and testing.
http://www.youtube.com/watch?v=ZV-AFnCkRLY <-- There you got productivity by Notch (Minecraft creator for those who dont know). Its like three seconds of twitter, 30 minutes for food and some sleep, for a total of 48h. Actually that makes me take back the idea of the magical thing, since the magic seems to be complete dedication to the task you are supposed to do.
I often find that just the process of explaining a problem with spoken words forces me to think about it in a different way. Sometimes I even talk through a problem with my non-programmer girlfriend. She's nice enough to listen, but doesn't really understand what I am talking about. It just doesn't really matter though because often I don't need another persons perspective I just need to talk through the problem which allows me to come up with a different angle of attack.
https://chrome.google.com/extensions/detail/laankejkbhbdhmip...
Even when I'm in the zone and getting shit done, my actual editing ability and low-level coding skills are never the bottleneck - I spend most my time strategizing. Actually banging out the code is trivial, but that seems to be what most people on HN fetishize...
http://webcache.googleusercontent.com/search?sclient=psy&...