Monday, May 30, 2011

My Favorite Programming Language

Having spent some time on technical message boards, I've seen this topic pop up a lot. “What programming language should I learn?” “What language is the best for beginners?” “What’s better C#, C++, or Java?”

When I was in high school, I was taught a stripped down version of C++ that avoided a lot of the Object Oriented concepts. When I went on to college, Java was emphasized in the intro courses and then C in high level courses. There were those courses that would force you to learn some eclectic language (x86 assembly, Scheme, Prolog). Outside of the mainstays, I’ve also run into C#, SQL, PHP, and HTML (which are not programming languages and, rather, scripting languages).
As far as what language you should learn first, in my opinion it really doesn't matter. As long as you go on and learn more about programming, your first language is going to affect you all that much. All programming languages have their pros and cons and one may solve a specific problem better than the other, but at the end of the day, it really won't matter which one you choose.
C is much simpler than a higher level language like Java or C#, however it can be less forgiving than them as well. Java gives you nicer errors whereas C relies on the programmer to catch a lot of those dumber mistakes like running over the bounds of an array. Some of that can be solved using the right IDE (Visual Studio is very good in my opinion).  C# and Java introduces Object Oriented concepts, which can be too complex for first time programmers and can add unnecessary bulk to smaller projects. I’ve also heard that Java’s garbage collection can be extremely cumbersome, as a CPU heavy task that pops up at random intervals.
Nothing beats being taught in a formal course, but here are some learning resources I would recommend:

The first is A Guide to Programming in C++. This is basically baby’s first programming book. It will hold your hand the entire way. We’ve all got to start somewhere and if you’ve never taken a formal class in programming this is the book I would recommend. The book is a little old, so, you’ll need to do a few tricks to get code to run on current versions of visual studio.

Java Concepts is a great Java introductory book. It will introduce you nicely to object oriented concepts. If you read some of the later chapters,  it will also touch on some of the higher level concepts in computer science.

Next is Computer Systems: A Programmer's Perspective. This is a very advanced book. I would almost say the material in “separates the boys from the men” in the programming world. After you’ve finished with intro books, consider picking this one up.

For C#, I recommend Learn Visual Studio’s Absolute Beginner's Series for Visual C# 2005 Express Edition. The entire series used to be available for free on MSDN, and you can still find some of it in existence on that site.

No comments:

Post a Comment