|
|
|
Ask HN: Programming More Efficiently?
|
|
5 points
by patrickocoffeyo
4798 days ago
|
|
I've been programming for a few years now, and I've written a lot of code, but there are times that I want to write quality code 2 or 3 times faster. I do my best to keep my workflow straightforward, eliminate distractions, and stay focused on my tasks, and I get quite a bit done each day but the more I can do, the better, right? I'm wondering if any more seasoned developers have good advice for me, as far as improving my workflow, and coding more efficiently? I use Vim, and am trying to improve my muscle memory for operating on code. Any vim user tips? At what intervals should I take breaks from coding? Should I stay away from developing on the weekends to let my mind rest? Should I keep working on weekends to keep my brain active? At times I have to switch projects and work on something completely different, sometimes even in a different language, and that seems to throw my mind of for a few minutes. Is there anything I can do to make the process of switching projects easier? Is it normal to be thrown off by an abrupt project-switch? Sometimes I have to do 2 or 3 projects concurrently, and I end up having 2 or 3 bash windows open with different projects in each one. Should I try to just work on one thing at a time? Thanks for any advice, I'm just trying to improve my developing habits and consolidate my workflow into something that's as efficient as possible. Any advice from seasoned developers would be awesome! |
|
Aside from that, the only thing left to do is to minimise your unproductive working habits. The whole 'Vim is faster' thing is just a distraction - people can be 'fast' in a million and one different setups - the point is that if you pick a particular setup, you should learn how to use it. Learn the shortcuts and the tools available. This is just common sense. You don't learn to drive through trial and error - you know what each action you make is going to do before you do it. Read the manual.
Personally, I find that the best all-round way to improve my code quality and efficiency is to read for pleasure. Whether it's books or blogs, it doesn't really matter much to me. I find that when I have been reading, I can think more clearly about problems. I can spot ways to abstract problems far more easily, and I can express my ideas more coherently. Additionally, talking through a problem helps me a lot. Even if I am just explaining the problem to somebody who is not contributing anything to the solution - the mere act of being forced to provide an explanation can often highlight the solution far more quickly than if I had just sat in silence trying to figure it out.
For me, the workflow is about minimising unproductive habits rather than improving efficiency. The real test is how quickly you can identify the solution to a problem - the task of actually writing the code is something that is left to individual tastes and preferences. In all things - think first, act later :)