The question I get asked most is: How can I start programming? This is such a broad yet important question as there are so many ways to answer it. Before I answer it I want to explain what programming is and why it’s something you may want to consider learning. At the very core programming is the equivalent of any spoken language. It has syntax, grammar, and stylistic rules. The only difference is that programming languages are used to tell a computer what to do. Learning how to program can be thought of as learning how to speak or write another language. You may want to pick up a programming language if you are interested in pursuing a career in computing science, wanting to write some quick applications for your computer, or if you are just curious about how all the applications you use are made. So now that you know what programming is, you may want to learn how to program. The first step is to choose a language; there are many languages, and I hope to help narrow your choice down to a few depending on where you want to go. After you pick a language you must learn it. The best way to do this is by programming using books/websites as reference materials. I will provide you with a template that can be used for learning any language. Finally, after you’ve mastered a language I’ll give you some pointers about where you should head next.
Choosing a language is important, if you choose the wrong one you may get turned off programming. If you choose a language that has too many oddities, such as C, you will have a hard time learning. This would most likely happen since C is a low level language, meaning it has few utilities to make it easy to use. If you choose a language that doesn’t apply to what you want to do, say choose Javascript when you want to learn how to make desktop applications, you will be wasting your time. If you’re looking to get into web programming exclusively, you should probably be looking at PHP being your first language. PHP is the language used on many websites (this one included) and is extremely powerful. If you want to just learn concepts of programming for web or desktop use you may want to consider Python. Python is great since it can be used on both the web and desktop. It also provides an intro to object-oriented (OO) programming which I’ll touch on later. Finally, if you are looking to head into a computing science program and perhaps software engineering there’s no doubt that you should be looking into Java. Java is a high level language (meaning it provides convenience features that are easy to use) that introduces object-oriented (OO) concepts from the beginning, Java also ensures you are programming correctly by being vigilant with syntax, and finally closely mirrors the C/C++ syntax. For the rest of this article we’re going to focus on Java but first I want to outline the general template to learning a language.
Learning a language requires a lot of practice. Practice typically helps you nail down the syntax and learn the quirks of the language. I remember while learning C++ as my first language (the AP high school program still used it for their exams) that I had trouble remembering the syntax, this is why practice is key. Here is an outline of the general process of learning a language:
Here are some introductory programs that you could implement:
Now ideally you would head off to your editor and start implementing these basic projects. I am going to leave applying the template for Java until next month as that would greatly increase the length of this article. I believe that programming can be either difficult or easy and that ultimately practice makes perfect. With that being said if you don’t want to wait until next month, you can start implementing this template on your own. If you want to wait I will be back next month with a full implementation of this template with source code in Java.
29th April 2010, at 8:40pm
Thanks. I’ve been thinking about giving programming a go and this helped me organize my thoughts a bit. I don’t know if you’ll even see this to respond, but is Alice any good?
3rd May 2010, at 7:48pm
Thanks once again Shane, very useful 😀