Whether you’re currently pursuing a degree in computer science, an aspiring self-taught developer, or a coding boot camp student, mastering the craft of programming is a perpetual struggle.
Technology is changing faster and faster every day and us, as software developers, need to be able to cope up with all of this if we want to stay relevant.
This is definitely bad news if you don't know how to learn. Learning how to learn anything is one of the most powerful techniques you can develop if you want to succeed in life.
In my early career, I was able to learn different programming languages and TEACH THEM, making millions out of it.
Truth be told: people who know how to learn things will definitely be ahead of others. And it applies to all areas of your life.
Learning a new programming language can seem like a challenging task. However, as it is with all types of learning, there are certain techniques and practices that will help you learn the programming language faster and more efficiently.
During my entire programmer career, I've been confronted with situations that made me develop some practices that would help me learn new programming languages faster. At the beginning of my career, I thought that reading books from cover to cover was the best way to learn a new language. Damn, how I was wrong. As I started to develop and create Pluralsight courses, I had to find a way to learn new programming languages fast, since this was exactly what I was doing.
In today's video, I'll share my techniques to learn ANY NEW programming language you want and how to skyrocket your programming career.
Transcript Of The Video:
John Sonmez: In this video, I'm going to tell you how to learn any programming language you want, okay, no kidding, and how to do it as fast as possible. I'm an expert in doing this. I have learned over probably 15 different programming languages in my career.
Guys, if you're just joining me for the first time, I'm John from simpleprogrammer.com, and welcome to the place where you can learn to be a better developer, where you can learn the soft skills, not just the technical skills that you need to succeed in your career and in life. Click that subscribe button if you really want to have a better career and you know that it's more than just technical skills that is what counts.
So it doesn't matter if you're a beginner or if you're already a programmer, if you're trying to learn a new programming language, I've got one step-by-step process that is going to work for you pretty much guaranteed.
So we're going to start with step one. The very first thing that you need to do is you need to look at some existing code in that programming language. Okay, just scan it, and try to understand it, all right? Now, if you've never programmed before or you have very little programming knowledge, this is going to be very hard. If you have some experience with another programming language, you might find it easier. It's still going to be difficult if it's a new language, especially if the syntax is a lot different than what you're used to.
But there's a critical reason why we're going to do this. Even though it's hard, I want you to sit down for at least half an hour, maybe an hour, and I want you to look at some piece of code. You can find an open source project on GitHub, whatever programming language that you're working in, and pick a popular one so you can see what is going to be some idiomatic code for that language, but I want you to look at the source code and I want you to try and interpret it and understand what it's doing. Just pick some piece out of it and try to understand that piece.
The reason why this is so critical, this is a big learning hack, okay, and you can use this for more than just learning programming languages, is because one of the best ways to learn anything and to retain knowledge is through curiosity and questions. So if you think back in school, there's a lot of stuff maybe in high school that you were taught, and do you remember any of that shit? Probably not, but there might be some things that you did learn really well and that you still retain to this day, and I'm going to guess that most of those things were things that you were curious about and that you had questions about, and that you sought answers for.
So what we're trying to do here is by looking at the source code, we're trying to develop questions. We're trying to get a feel for something and then to get some questions in our head of how does this work or what is this operator or what is this thing, because what happens is that when you have questions and then later you fill in those questions with knowledge, you get answers to them, you retain that. That becomes valuable information, and it makes sense from a biological evolutionary perspective that your adaptation would be things that actually are advantageous to you and that you're not just going to retain all information.
If I just start giving you information and start telling you about a programming language, you don't know what's important, okay, and you're not going to retain that because it's not associated to your goal. You don't have a question. You don't have some objective you're trying to achieve, and that information doesn't help you achieve that objective. But when you have a question because you don't know something, and then you go and you find the answer to that question, now it helps you achieve an objective and now that gets locked into your memory because it's something that you needed to survive. That's why this mechanism works.
The next thing you're going to do is you're going to take some easy programming problems and you're going to solve them in this new programming language without even really reading a book on it, without really understanding the syntax much. You're going to have a reference book or a reference site or whatever it is. There's a lot of things that you can use for a reference. What you're going to do is you're going to just make some simple, simple problems, but you can just search for simple programming problems, the basic kind of questions that you would find in a very beginner book. You might even be able to find it in the book that you have for that programming language, but you want to create a Hello world. You want to create a basic program that spits out to the screen, Hello world. You want to create one that maybe takes some kind of an input, and then says, “How old are you?” and then you put in your date of birth and it says, “You are X years old.” Some very basic simple stuff like that.
When you're doing that, you're going to look up stuff that you don't know, so if you don't know how you do this, you're going to go to your reference manual and you're going to look it up, and you're just going to get some basic, basic stuff. That's it. This is going to force you to have questions and it's going to cause you to go back and look up the answers to those questions, and you're going to get a feel for the language. You have to really do something before you can get a benefit of knowledge about that.
Let's say that you wanted to learn how to golf. If you were to get lessons from an expert golfer… let's say Tiger Woods was going to coach you on golfing. If you've never swung a club before, if you've never tried to putt, if you've never decided which iron you're going to use or accounted for wind or been in a sand trap before, whatever Tiger says to you is just not going to make… it might even make sense, but it's not going to stick. It's not going to be meaningful. If he says, “Oh, you know, let me give you my best advice here, okay? When you swing the club, you need to do it this way, and, oh, when you're this far, you need to use this kind of a pitch or this kind of a wedge, or this is the best way to putt, and let me tell you about that.” He could download you hours and hours of information, but it's not going to be very effective.
But I'll tell you what, if you go out and you don't know what the fuck you're doing, and you go out there and you golf, and you do some golfing, and you just really… you don't know how to swing the fucking club, you don't know how to hit the ball, you don't know any of that stuff. You try it, and you're miserable and you're sucky at it, you're horrible at it, you're just having a horrible day, just struggling, and then at the end of the day, you go to the 19th hole, and Tiger Woods is there.
He's like, “Look, man. All right, tell me what was the things that you're having problems with,” and you're like, “Oh, I don't know. Do you do the Happy Gilmore swing? I was like taking a step and doing that.” He's like, “No, no, no. No, no, no. You've got to do this thing. You've got to put your…” and by the way, I don't play golf. I've never played golf in my life. Well, I played golf once in my life, okay? You interlock these fingers and this is how you hold the club, and you've got to make sure that swing and turn your leg and whatever, and he gives you that information. Now that you've actually experienced it and have done something, all that information is going to be helpful.
Now, you're not going to absorb all of it. What you're going to do is you're going to go back out to the golf course and you're going to be like, “Okay, I know what Tiger Woods said. I've got this shit. I'm doing it, no more Happy Gilmore swing,” and you're going to do your little thing and… you're going to hit the ball, and it's still going to fly off and you're going to slice it or whatever it is, and you're going to have a lot more trouble. But then you're going to go back and you're going to talk to him again, and that's how you're going to learn. Or maybe he's going to watch you or maybe he's going to help you… actually implement small programming problems, very small ones, just so that you can get a feel for the language and get some questions.
Number three, now, now we're going to go back and we're going to start reading the book, but we're not going to read the whole book. We're going to skim it, and what we're going to look for is we're going to look for the 20% that is going to solve 80% of the problems that you have with the programming language. We're going to look through the book and we're going to look and we're going to understand the syntax of the basic stuff. How do we structure a program? What about conditionals like if statements? What about loops? The basic stuff that exists in every single programming language, we're going to look through that stuff, and we're just going to skim it. We're just going to read through the book very quickly and just skimming that stuff. We're not going to go into the detailed stuff. We're not going to go into the complicated stuff. We're going to skip any of those chapters.
Next, we're going to try and create a small program based on that. Now, we're not doing a trivial problem like give me your date of birth and I'll give you the age, but some actual functioning program. Maybe it's a small app. I used to use for a lot of my [inaudible 00:08:10] courses, I used to use a protein tracking application to count how many grams of protein you ate in a day. It was just a simple thing, because I had to use an interface, and you could put in data and the data needed to be saved, and we could save it to a database or you could save it to a file system, whatever it is. Then you needed to recall that data, you needed to do some calculation, and then you needed to put the output to the user, so that was kind of exercising all of the kind of basic functionality.
That's how I learned a lot of programming languages is I would say, “Okay, how do I implement protein tracker in this programming language?” In fact, if you're learning more than one, you can have some basic simple application that you convert, you port over to that new programming language, so just come up with something really small. It could be a game. It could be whatever it is, and you want to implement that, actually create that project in that programming language.
Here's where things get interesting. Once you've done that step, now you go back and you read the book or the reference or the video series that you're training, and you go through it all. You go through it in detail. If you go through it in detail at this point, now it's going to make a lot more sense. Now it's going to fill in a lot of gaps. Now as you're reading it too, you're going to go back and you're going to try some shit. So you read something, and it's like, oh, you can use this to format things this way, so you're like, “Okay, let me go back to that program I made, all right, and let me go ahead and try this.” The whole time, you should be reading and as you read something interesting, you should go and you should try it out and code it, and implement some new features in your application using that. Okay, so now at this point, it's not going to take you very long. You're going to be really good at the programming language.
There's an optional fifth step which is this, which is now you can go to an expert. You can have them review your code, and have them tell you what you're doing wrong and explain to you why that this was the wrong way to write this or why that you could do this in a better way. If you walk through that and you understand the expert's explanation, you're going to up your skill level very rapidly in that.
You're going to go ahead and teach this to someone else. So write a blog post, create a YouTube video, whatever it is, even if you just make a PowerPoint presentation and you give it to your dog, you teach Fido how to program in C++. It's cool. Fido will appreciate that. But whatever you're learning, you want to capture that and teach that because the process of synthesizing the information that you have in your head and putting it out will actually transfer it from the area of knowledge to understanding, because in order to do something, you have to have a certain level of ability or knowledge or a very low level of understanding. You can do something without understanding it, but to teach something, you have to have an in-depth knowledge and understanding of a thing, and so that's why you're going to do that.
Then the final thing is you go through back to that source code you started off at the very beginning, and you read through it line by line, and this time, you make sure that you understand every single line in that code. So you pick some section of a program, maybe it's 100 lines of code or so, and you go through every single line and you make sure you understand. Anything that you don't understand, you go and you look up in the book.
So that's it. That's the fastest way to learn any kind of programming language you want. I hope that's helpful to you guys. Let me know what you think. Let me know if you've applied this technique and if it worked for you. Click the thumbs up if you liked the video. Leave a comment below. Make sure you subscribe, and I will talk to you next time. Take care.