Write Comments For Code To Learn Programming

Somehow, in college, word got out that I’m a ‘computer hacker.’ Most people at that time didn’t understand what it meant to be a hacker. They mistook me for somebody that knows everything about programming.

As much as I’d like to be that person, this isn’t true. I don’t compete with most people out there that are real programmers. I try, however, to get my work done via programming and technology. And as far as that goes, I’m not too bad.

I was just working on a blockchain project when one of my juniors from college pinged me to ask how they could get better at programming? What book they’d have to read. Or if I knew a MOOC they could take.

First off, David runs an excellent course at Harvard for undergrads - CS50. Due to the popularity and disruption by MOOCs, the whole world now has access to this wonderful course (link).

But I prefer a different approach to learning programming. Whenever I start learning a new programming language, I find some of the best programmers in that area (via StackOverflow, Medium, Github etc) and then look for any of their code that I can find online. Unsurprisingly, good programmers keep their code on VCS’s like Github for people like me to admire what they’ve done.

I find these pieces of code, and start documenting them. I don’t go through a tutorial or course first. And frankly, I feel that’s a waste of time without real hands-on work. I keep the documentation on the side, and start reading the code.

It is comparable to how we read a book. We don’t first memorize a dictionary of words or expressions with their respective interpretations from the book, and THEN proceed to read a book. That’s ridiculous. We start reading the book using what we know about language and the world. And whenever we get stuck with a word or phrase, we break it up and look it up either in a dictionary or on the web.

This is the approach you should follow for programming. You’re welcome. Good luck!