Stepping into C++

When I started programming a few years ago, my first language was Javascript. Javascript has grown over the years, and it is now one of the most popular languages both, in the server, and in the client. I think the fact that it runs on both ends is part of what makes it powerful, since you can develop entire applications with it. When adobe release air, Javascript developers got the opportunity to build desktop applications, and we saw some popular ones, like earlier version of the twitter desktop client. Now we have even more frameworks such as CEF, and node-webkit, that allow us to continue developing native applications with Javascript. One thing that really got me interested in node-webkit is the fact that the framework can be embedded with the application, which makes it easier for users to install them since they don’t need to bother with the annoyance of having to install the framework themselves. Interestingly enough, node-webkit comes with a full instance of node.js, which should give you an idea of what kind of applications you can build with them. Having the power of an event loop in the desktop is one of the greatest things we’ve seen recently. So, with all this options available, Is it still worth learning C++ or even C?

Every language you learn gives you a new perspective, and makes you a better programmer. It also opens the doors to new communities, new people, new ideas, and new ways of doing things. There are certain patters that are popular in some languages, but not in others, and you will never get to know and understand them if you don’t learn those other languages. For these, and many other reasons, I think it is worth learning any language. I learned python, not because I wanted to start building python applications, but because I wanted to see what I could bring from python to my current development stack. Most of what I can do in python, I would be able to do in PHP, or even in javascript, but the point was not to be able to do new things, but to be able to continue learning experimenting, and most of all, to be able to read python, because we all know that reading code is one of the best ways to really learn how to code.

But why C++? C++ is just the language that I have the opportunity to learn at college right now. There is really no other reason than that.

The Course of Action

I will be using a few resources, at least for my first steps into C++. One of them is a series of videos from the CSIT 139 class at LACC. I’m not really sure if I can share this list, so for now I won’t. The second resource I will be using is the C++ tutorial at cplusplus.com. I already started with this tutorial and it really seems to be a great introduction. Another great introduction to the language is the white paper Linux Programming and C++, by Mario Giannini. I will also be using another introduction to C++ tutorial written by Alex Allain, and finally, I will be attending a small study group organized by one of the professors from the CSIT department and Los Angeles City College. It should be assumed as well, that I will be reading other material and C++ articles as I progress, but my main resources will be the ones outlined here.

How I Will Be Reading them.

I will be following the tutorials closely together trying to stay in the same topics at the same time, or at least at the same level. This will help me avoid that problem of finishing one tutorial, and then having to start with the next one from the basics all over again. If you will be reading this materials as well, I recommend you read the Linux Programming and C++ white paper first or at least to finish reading it along with the first chapter of the other tutorials. There is a second part to that white paper located at http://www.codefighter.com/linux2.html that deals with sockets. You can leave that for latter when you’ve read the other tutorials at least past the middle point.

The Good the Bad and the Ugly

This is a completely different way for learning a language than how I’ve learned other languages in the past, mainly because there is a study group.

One of the good things of learning by your self is the opportunity to learn at your own pace. Whether you are a fast learner, or you have a hard time learning new things, when you learn on your own there is no pressure to keep up with the group, or to slow down for the sake of the group. However, if you are one of the fast learners, you can help, encourage, and have an impact on those who learn a bit slower, and help them learn faster, and understand concepts better. If you are on the slow end, you have motivation, and you have people who can help you get through the difficult parts. Something particularly good in this case, is that we have an actual professor, who not only organized this group, but who also approached us personally to invite us to be part of it. A professor who shows this kind of commitment may very well be the most important part for many in this group. Without him, many would not venture into learning C++.

One of the bad things is going to be the waiting. Most of the people who will be in this group have little knowledge of programming. In less than a night I can go from 0 to to being able to write functioning programs in C++ due to my background in programming, but they can’t. This can turn things boring at times.

My background helps me understand concepts easily, but without a good foundation in programming, some people can have a hard time understanding even basic concepts. Douglas Crockford says that it takes a certain kind of crazy person to program, and I think it is true. Unfortunately, not all of us are that crazy. The ones who are, go and become good programmers, then ones who aren’t get stock forever in the most basic things, unable to get into the mindset that is required for programming. In this group, however, I think there will be real talent, and that should help us move forward faster than in a regular class.

The ugly for many will be the fact that the programs we will learn to write are console programs. However, any good linux user knows the real beauty in that beast. I think some of the most powerful tools I use are command line based, but that is in the linux world. I’m sure the windows world is different.

The Platform

In the group, we will be using Visual Studio and Windows, but on my own, I will be using Linux, and the G++ compiler. As always, my editor of choice is Vim, and I may write a few shell scripts where I see fit, but for now I haven’t seen the need for that.

Wrapping Up

I’ve already written my first hello world program in C++, and a little program that handles input from the user. I think that for the other people in the group one of the things that will get them is the syntax since many of them only have a Visual Basic background. I still catch myself writing semicolons at the end of python statements sometimes. For them it may be the opposite –forgetting the semicolons at the end of C++ statements. I think it will be a nice experience to learn a new language along with other people, and to see how their learning process is, and how hard the learning curve is for people with little programming background. My role in the group, I think, will be mainly helping others, since I have deeper understanding of programming in general, and am very familiar with the C family of languages.