How to Learn a Programming Language: 5 Tips from a Professional Trainer

I’ve spent the last ten years teaching people to program. From groups of students just out of school to developers who’ve been programming since before I was born. In doing so, I’ve noticed there is a right and a wrong way to learn a programming language.

**Check out the master trainer Mark Lassoff’s FREE Adobe Flash course here! If you have never tried programming before and are looking for a fun way to begin, this course is for you.**

Here are five tips I wanted to pass along to you:

1. Understand the “Philosophy” Behind the Language

When I was first learning the earliest versions of Java, the language seemed verbose and unnecessarily complex. I was an inexperienced programmer at the time and was used to a procedural world coded in C. Java was the furthest thing from procedural but I couldn’t appreciate its genius– or even it’s utility– because I didn’t understand the Object Oriented Philosophy behind it.

Then came Dr. James C. Browne. In Dr. Browne’s class at the University of Texas at Austin, I first started to understand the Object Oriented Approach to solving computer science programs.Learning the Object Oriented Philosophy really helped me appreciate and understand Java at its core as an Object Oriented Approach.

There is a reason we have a plethora of programming languages. Different languages are optimized to solve different types of problems or designed to work at different levels of abstraction within a computer system.  Understanding what the language you are learning is used for– and at what level of the “food chain” it works best at– is critical to understanding how to apply that language to solving actual problems.

2. Type in All the Code Examples Yourself

This tip is less philosophical and more practical. You have to be a maniac about typing in all the code examples presented while you learn.  Typing them in, instead of glancing at them in a book or in a video, is a more active process that stimulates memory and retention.  Typing in the examples and making them work is perhaps the most important part of the learning process. Even if the language is totally foreign to you, you will start to notice patterns in the code syntax that will unlock the meaning of what you’re keying in.

Perhaps most importantly, when typing in code examples, you will make mistakes.  Finding those mistakes and correcting them is also an invaluable part of the learning process. THe more mistakes you make the more opportunity you will have to examine the code carefully and in time understand it.

3. Always Go One Step Further

I am a big fan of taking each lesson, lab or exercise and trying to take it one step further. Often, to do this, you have to consult the documentation for the language you are using. Doing this has two advantages.  First, you learn how the language documentation is structured and become familiar with it. Secondly, you reinforce the concepts in the lesson and get used to solving small problems on your own in the language.

For example, if you are working on a lesson that teaches you to play audio with HTML5 and Javascript, you might wonder to yourself: “How would I control the volume?” Solve that problem and you are on your way to mastering the code!

4. Learn with Many Short Examples — Not a Large Project

I spent many years as a classroom technical trainer. I focused on client-side web languages, Java, and later mobile development. In the classroom, the type of ‘courseware’ that you used was often dictated to you. Some courseware would, in each individual lesson, build towards completing a larger project.  The problem with this style of course was that early mistakes affected later progress, and that individual skills were not learned in isolation of each other.

I feel it’s very important to learn each individual language skill in isolation of others. Integration of skills is a more complex process than learning and mastering individual skill sets. Integration is best learned once you have a solid foundation in the language– otherwise the chance of confusing concepts is too great.

5. Make It Run!

Always, always, always make your program run. Debug it until the result is correct. Don’t move on until you do. You’ve got to close the door behind you before opening a new one. When you’re learning a programming skill, you are likely to need that skill to learn a higher level skill later.  Sometimes it’s easy just to skip over a bump or leave an error unresolved — but you do so at your peril.

Besides, nothing is more exhilarating than seeing the code you wrote run for the first time!

About the Author

Mark Lassoff is a top technical trainer, traveling the country providing training for software and web developers. Mark’s training clients include the Department of Defense, Lockheed Martin, Discover Card Services, and Kaiser Permanente. In addition to traditional classroom training and consulting, Mark releases video tutorial training for aspiring programmers. Check out his popular online courses: Become a Certified Web Developer, iOS Development Code Camp.