Wednesday, August 10, 2011

What Programming Language to Learn First?

Some of you will remember that last year I made a resolution: to learn programming. I have not written about it, but I have been sticking to this resolution ever since.

In fact I have put most of my websites on auto-pilot, so that I just need to spend one or two hours working every day (i.e., 30 minutes answering emails, 30 minutes doing general maintenance tasks, and 30 to 60 minutes researching and writing a post for DBT). The rest of the time I am either coding, reading programming/math books, or attending lessons on a local university (I’ll talk about this on a future post).

I know there are many readers who would like to learn programming as well, so occasionally I’ll write a post about what I am doing, what worked for me, what didn’t work and so on. I had plans to start a new blog completely dedicated to this topic, but I figured this would take away time from coding, so I dropped the idea.

Today I want to talk about the first decision I had to make when learning to code, which is what programming language to learn first.

If you are going to college then you don’t need to worry too much about this question. The college will pretty much pick a language for you (e.g., some start with C, some with Python, some with Java and so on).

If you are going to learn programming by yourself, at least initially, then you need to think twice before making your decision, because the language choice will certainly affect your progress, and if you pick the wrong one you might lose motivation along the way.

I spent a great deal of time researching on the Internet, and if you do the same you’ll find that the discussions about the best first programming language are quite heated! After some days researching I decided that Python was the right choice for me. The reasons for going with Python as a first language were:

  • Python is a very high level language, which means it comes with a lot of functions and abstractions out of the box. This means you can spend more time thinking about programming logic and algorithms, and less time thinking about correct syntax.
  • Python is a general-purpose language, which means you can use it to create virtually any type of program or software, from web scripts to games. This means you should be able to use it to code projects you are actually interested in.
  • Python is an interpreted language, which means you won’t need to waste time learning how to compile code. You simply downloaded an integrated development environment (IDE), write your code and press “Run.”
  • There is a huge amount of programming books, videos and courses online that use Python as their language choice.
  • Python is used in the real world as well. Some very large companies like Google and Facebook use it on my parts of their platforms and products.

I have already moved to a new language (C), but looking back I still think that starting with Python was a smart choice. It’s like learning to drive first (i.e., coding in Python) and only then taking a look at the engine under the hood to understand how the machine actually works (i.e., coding in C or even Assembly if you want to get close to the iron).

I don’t think Python is the absolute best language to learn first, though. It depends on your goals. If you are planning to make a living writing code (either for you or for someone else) then I believe starting with Python is a great idea. After you know the basics of programming logic and algorithms you can start using lower level languages like C, and after that you can start using Object Oriented ones like C++ or Java (technically Python also offers object orientation, but I wouldn’t play with that if you are just getting started).

If you have a narrower plan, you probably should start with a language more specific to the problems you want to solve. If you want to learn programming exclusively to tweak WordPress or to create WordPress plugins, then I think starting with PHP would be smarter, as it’s pretty much the only language you’ll need to use in the future.

Similarly, if you just want to develop iPhone apps, I would recommend getting a basic understand of the C language, and then move straight to Objective-C, which is the main language used to build iPhone apps.

Finally, Java is also considered to be a good option as a first programming language. It has the advantage of introducing you to object orientation right away, and it’s also one of the most popular languages around the world.

Next week I’ll talk about the resources I used to start learning programming logic and Python.

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...