- PPF Points
- 5,709
If you are working mainly on your own, then I'd suggest some of the following:
If you are working as part of a larger team, keep in mind that while your productivity is important, so is the productivity of the overall team. Therefore, it is important that when you adopt practices that improve your own efficiency or productivity, they do not undermine the efficiency or productivity of others.
- Figure out what times in the day you are most alert and most able to focus on coding. Avoid working at other times if you can. In my youth I sometimes would work late into the night, only to discover the next day that what I had coded was gggggggggggggggggggarbage. (Those extra g's are me falling asleep at the keyboard while working

- Get in the habit of building unit tests as you go along. The practice of Test Driven Development even advocates building them before you code the routine. Try it. Find a pattern that works best for you.
- Use a source control system, if you aren't already doing so. It will allow you to work in small increments, revert changes that are found to cause problems, and compare versions of code. Add good comments for your checkins, taking special note when you are fixing something you just broke on a recent checkin. You may then find it useful to look back over the history log to see if any patterns emerge about your practives that you can take steps to avoid in future.
- Use a good IDE to help you write code faster by reducing keystrokes and providing tools that will help you document your code and analyze its qualities.
- Adopt a good set of coding standards and embellish them with your own. Like putting your car keys in the same place all the time, you'll spend less time figuring out your own code (as it grows) and debugging your code if you do things in a consistent fashion, like naming variables.
- Avoid distractions while coding. Some people can code when listening to music. Others can't, or can't with certain kinds of music. Conversations are even more distracting, so some people shut them out with headphones and music. TV is a distraction. Find a quiet place to code and stay focused while coding.
- If possible, have a window you can look out of, preferably with a natural view, and look up from time to time. It'll help reduce eyestrain and help unfurrow your brow.
- Read books about good programming practices. These can be specific to the programming language you are using or more general. Learn about what other people have discovered, and then try these things for yourself. Keep what works.
If you are working as part of a larger team, keep in mind that while your productivity is important, so is the productivity of the overall team. Therefore, it is important that when you adopt practices that improve your own efficiency or productivity, they do not undermine the efficiency or productivity of others.

