Learning Programming

Over the years, I’ve seen many people struggle with learning how to program. I’ve never really understood what the big deal is. When I first learned programming, I did it on my own, with a bunch of internet tutorials, the language documentation, and some time. I kept being surprised by how easy it was to do the things I had seen on the computer. I understand we all are different, but I believe the real reason why many people struggle to learn programming is because of the way it is taught.

My initial take on programming was Javascript. I didn’t think I was learning programming. All thought was that I was learning how to make websites. I kept thinking that programming must be something different, because people always say programming is hard, and what I was doing was really easy. I learned Javscript along with HTML, and CSS, and honestly, I used to think real programmers did things differently. It was surprising that calling alert would pop up an alert window, just like that. It could not be that easy at the professional level, right?

Learning programming, and learning a programming language a two different things -quite different, actually- that are usually thought of as being the same thing. Because of this, we tend to want to teach people both things at the same time, and that is confusing. Learning a programming language means learning all the details of it, the syntax, the grammar, the definitions, the different components, data types, and operators, among many other things. Learning programming, means learning how to do things. Doing things is more fun, and most people learn by doing. Back when I was calling alerts, or prompts, I had no idea that those things were functions, and that I was passing strings to them as parameters. I had no idea what the signature of a function was, or what the difference between arguments and parameters was. All I knew was that a hello world program in Javascript was easy to write.

Many years have passed since my first programming adventures. I’ve learned so much in those years, but I feel like I didn’t learn enough. I am a lazy programmer; I waste time on this and that, I read, and then forget what I read. I’ve learned a few more programming languages, but I didn’t really learn how to program in those languages. For example, I learned python, I read the entire python documentation, and I built some python programs a couple of years ago. Today, I’m learning python again. This time I’m not worried about the documentation, I just want to learn to program in python, because one can easily forget all the details that are in the docs, but it is harder to forget how to do things once you learn them.

I could easily criticize the way programming is taught in school, but I won’t. I’m more interested on talking about how programming is learned outside of the classroom. One thing you must learn, if you want to become a programmer is that you need to read. Reading a book or two is fine to get your feet wet, but after that, most books become monotonous, more of the same. What you really need to do is read code.

If you wanted to learn how to write novels, it would be OK to read one or two books on grammar, and such, but that will teach you the rules, and rules are boring. If you want to become a great author, you need to read novels. One of my favorite quotes from the film industry is “I didn’t go to film school, I went to films” There is so much one can learn from just looking at how others do things.

I’m learning python once again. This is the last time I learn python. My new strategy is simple. Read through the book Learn Python the Hard Way, and that’s it. The book, plus the knowledge I keep from that Sunday morning I read the entire documentation should be all I need to go out to github and start ready code. Reading code will make me a better programmer, not just in python. Once we learn something, we tend to think of ways to apply that knowledge elsewhere.

Wish me luck.