CodeMusings

Kick back and get started at your own pace.

Skip to Content

There are no magic shortcuts to mastery, but it's a fun journey.

How to Become a Programmer

Written by Curtis Dyer

Learning the Art

Everywhere you look, there will be promises to teach you Language [X] in [Y] Hours/Days. Personally, I have yet to witness any real shortcuts to proficiency. Computer programming is an art, a way of thinking. It combines careful, analytical thinking with more creative lateral thinking to find solutions. However, like any specialized skill, it requires time to attain mastery. I've never felt comfortable considering myself a "true expert," but I just happened to realize, one day, I was trying to help answer people's questions more often than ask my own. While it's always important to keep learning and experimenting, it's good to appreciate just how far you've been able to progress.

Not everyone has the same approach to learning, but I genuinely feel if you have a strong desire to understand how things work, you have a good state of mind with which to approach programming. Even if you're still not sure, you might be amazed at how much even the basics of programming can change how you look at the seemingly magic box that empowers all the software you use each day.

When it comes to learning, some might prefer starting with basic programming concepts, while others might wish to just dive right into learning a programming language by tinkering at a program's source code. One of my favorite stories about learning how to program was written by a talented programmer and comp.lang.c newsgroup contributor named Peter Seebach. He describes how he got introduced to computer programming by tinkering with the source code of a Unix game called Hack. Sometimes, the spark that starts it all is just reading or tinkering with the bits of code that look like plain English.

It can be easy to get a bad taste in your mouth with regard to computer programming if your first book assumes you will be running on a certain platform, patronizes you, or perhaps inundates you with too much at once. The key is to know the audience at whom the book is targeted. Good books will provide the fundamental framework of important ideas by challenging you and not attempting to lie when something either takes time or lies out of the scope of the book. It's not beneficial to you if the author attempts to shoehorn in more concepts or techniques than can possibly be fully explored in a single beginner's text.

Try not to forgo the challenge process, it is essential. Even if you opt out of exercises, you will inevitably need to experience the growing pains when building your own programs. I don't mean to make the task seem too daunting, but it's very important to not be put off by slow progress. It's going to take quite some time before you produce your first serious piece of software. However, you might find that as you slowly grow, bits and pieces start to slowly illuminate and come together in sometimes surprising ways.

Choosing your Tools

The programming language is the tool you use to communicate with the computer. When you set out to learn your first language, it's the underlying concepts that comprise the fundamentals of computer science; they transcend any one language. However, you need to start somewhere, and the question still remains, "Where?"

Although there is no standard answer, there are some languages that can be easier to pick up than others. Eric S. Raymond, a notable programmer and author in the open source initiative, wrote a document entitled How to Become a Hacker (not a cracker), in which he covers, among other things, the challenge of choosing a first language. He recommends learning Python as a first language. It can be a good beginner language, as it enforces some good coding habits right from the start. Current versions of PHP (most commonly used for Web development) are also quite nice. These scripting languages will allow you to create some interesting and useful things without needing a lot of prerequisite knowledge.

In general, the Web is a very popular platform on which to develop (as of this writing). If you think you might be interested in developing on the Web, you may be pleasantly surprised at the quick pace when starting out of the gate. However, due to this, people can easily pick up bad habits and practices, due to the prevalence of poorly written, yet ubiquitous code snippet repositories, which provide some functionality that's often sought after by beginners.

If you intend to target Web development, consider learning the following technologies before studying a scripting language, like PHP or Python:

  1. HTML: this isn't a programming language, but it's the fundamental markup language that structures Web documents. If a pencil is the programming language, the sheet of paper is the HTML document. In my experience, HTML is very easy to learn, but can take some time to master.
  2. CSS: also not a programming language, but is the method by which HTML documents are styled. You can essentially create a series of style properties within a single text file, which will be interpreted by the browser to display various things like font styles, size, and other aspects of a document's appearance. This is useful for easily styling a whole set of HTML documents without the need for copy-and-paste.

Learning General-purpose languages like C, C++, or ECMAScript, depending upon your approach, can sometimes seem difficult. General-purpose programming languages are designed to be able to run in a wide variety of environments. An environment can mean anything from Windows, Unix, Mac, to the small, custom kernel for a CPU that runs in a fancy smoke alarm. The cost of this flexibility comes with the price of being relatively minimalistic, so that it can fit anywhere people need it to. For that reason, you often need to learn at least some of the specifics of the environments on top of learning the language itself. This is because the language needs to work in tandem with its environment to produce useful programs. Although sticking to the basic, standard portion of a general-purpose programming language is generally simpler, you will still need to learn the basic usage of a compiler, which is responsible for building the program from the human-readable source code that you write. Furthermore, you will most likely be limited to the command line on the common desktop OSes like Windows, Mac, and Linux.

To aid in building complicated software, such as application software, integrated development environments (IDEs) are offered to streamline the process. IDEs are programs that provide a more convenient interface that abstracts some of the complexities of system tools responsible for building desktop applications. It's a good place to tinker and learn some high-level concepts. In computer science, high-level refers to concepts that are abstract, and distanced from the 1s and 0s that are read at the machine level. Its inverse, low-level, refers to concepts that are closer to the machine.

The drawbacks of using IDEs as a beginner means that it's easier to forgo understanding the basic tools that all run in tandem to build programs. If you ever change to a platform that doesn't have your IDE of choice, and you don't understand the basics that happen behind the curtain, you will have a hard time adapting.

Google is your Friend

The best skill I have taken from learning Web development and programming is how to make the best use out of Google and generally finding solutions self-sufficiently. The next best skill is to develop a tough skin when dealing with others on the web. A lot of experts are curt and concise. Don't fawn, but don't posture; be efficient with your and others' time. Self-sufficient Google searching is a priceless tool, which is useful in many situations even outside of programming. The path to actually growing is identifying problems or puzzles that interest you, and which you can approach in logical, structured steps. You can then turn them into pieces of a program. This is the essence of programming: mapping real world problems to logical steps, which make up a program. The art of visualizing and implementing these steps transcends any one language, but learning many languages is what refines and perfects your abilities.

Let's expand on real world problems relating to code. Once you've studied the basic components that make up programs, find something in your everyday life that you think could be made easier if you had a tool doing it for you—maybe it's checking certain things in news feeds, maybe it's automatically generating a shopping list—it should be something that you'd actually like to use. Try and think how those basic program components could be combined to reach the desired outcome. You would use Google or your textbook to fill in the blanks. For example, if you need to know what day of the week it is in your program, you'd simply search for information on date handling in your language of choice. This goal-driven nature of learning about a language can make all the difference in retaining information and gaining a more intuitive understanding of concepts.

When you are forced to apply new concepts in the context of your own meaningful projects, it has a far greater impact than simply passively reading about the general concept in a tutorial or textbook. The experience of crafting your first useful program is very rewarding; it is beautiful in all its hideousness.

References

  1. ^ Seebach, Peter. "Growing Up in C". http://www.seebs.net/c/growup.html. Accessed 4 April 2014.