Skip to Content
Personal Insights

Good Habits for Great Coding

The recent emphases on coding, automation and technology, in general, has led to a surge in interest among otherwise non-technical professionals in computer programming and its ancillary skills and experience types. As a result, a lot of people are trying to figure out the best way to incorporate their new skillsets into their daily work, and to find ways to do their jobs well at the same time.

Computer programming is unique among creative professions because it combines two fairly disparate disciplines. On the one hand, programming is very much like writing composition, where imagination and lyrical expression are employed to create imagery and a fictive dream. On the other hand, programming is applied mathematics, where logic, precision and trial and error are synthesized into a set of instructions that can be properly followed by a microprocessor.

Doing the job of programming well, therefore, has its share of challenges.


The bane of programming well is distraction. You simply cannot write good code, nor can you test or evaluate the systems you have already developed if you are being pulled out of the zone constantly. Nowhere is this more apparent than in your choice of tools.

Like a carpenter, you must use tools that are a natural extension of not only your physical needs but also your thinking process. If you are fighting your tools you will not produce good work no matter how skilled or how experienced you are.

Low-Level Access

Everyone has their preferences when it comes to the right tools. When working with a computer, even if you aren’t writing highly optimized drivers or some kind of firmware, you should be certain you have as low a level of access to the machine as possible. “Low” vs. “high” in this context means you are looking for direct access to the hardware. You don’t want to be building systems that require you to constantly unlock doors between where you are and where your system resources live.

For some kinds of projects, this may not turn out to be all that important. But for others, it is vital. You can’t write good code if you don’t have access to the machine.

The Right Language

Like cars, computer programming languages are suited for different kinds of tasks. You wouldn’t deliver lumber in a Ferarri, nor would you enter your paint truck at Le Mans. The same principles apply if you are choosing a language. For example, if your purpose is to process and filter a great deal of text such as that found in a system log, then Perl is the obvious choice. On the other hand, if you are writing a printer driver, Perl probably isn’t going to serve as well as C.

Your choice of language is going to depend quite a bit on your experience as a programmer, and the number of languages you’ve utilized. A good piece of advice is to experiment with as many languages as you can early in your career so if you do choose to specialize at some point you will know which languages suit which projects.

Best Practices

It might seem that programming depends heavily on planning ahead of time, and that is true to a certain extent. Choosing the right tools, getting complete access to your machine and choosing the right language are steps that will cut a huge amount of potential hindrance out of your project long before you ever start writing your first functions.

Aside from your choice of tools and languages, the key to writing good code is to write good comments and to keep a log of your activities. Nothing is more expensive than the second solution to the same problem, and if you don’t have a complete record of what you did, then you will never be able to draw on your own experiences efficiently. Computer programming is far too large a subject to manage by anecdote and vague memories of what worked before. From the moment you start writing actual code, you need to think like a scientist or a detective and document everything you do and every reference you consult.

Programming is a lot like flying. Once you know the basic principles, what language you choose and what platform you are on makes little difference. It is very similar to a pilot with a choice between a 737 and a Beechcraft. Flying is flying. Everything else is where to find the right controls.

Be the first to leave a comment
You must be Logged on to comment or reply to a post.