How to Learn a New Programming Language Fast! [Video]
Are you looking to learn another language to help grow your career? See what one DZone MVB has to say on the subject in this video.
Join the DZone community and get the full member experience.Join For Free
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. In 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.
As you're learning the new programming language, ask yourself the two vital tradeoff questions:
- Do I really want to learn this language bad enough to actually learn this language?
- Can I afford the time and energy needed to get good at sucking in this programming language?
In this video, I'll share my strategies for learning a new programming language fast!
Transcript Of The Video
Hey, what's up? John Sonmez here from simpleprogrammer.com.
I got a question; real simple question. A lot of people have asked this though, which is how to learn a new programming language fast. How do I learn a new programming language fast? This is definitely something that a lot of developers struggle with. I got some advice in this. I've learned a lot of programming languages quickly, so I'm going to give you some—sort of base resources, first of all. Just for my own background, I am a Pluralsight author. I did 55 courses on Pluralsight. You can check them out. In that time, that was about two-and-a-half years, I learned a lot of programming languages. I learned and taught courses on Go, on Lua, on—gosh, what else was there in there? Objective-C. There's a bunch of them. Dart. There was a bunch of them in there. I had to learn—basically, sometimes I had to learn programming languages in a week and then teach a course on that programming language the next week. I just want to give you that background so that you know that I know what I'm talking about here because I've done this a lot of times and I've probably learned maybe 15 programming languages over the course of my career. I can definitely help you here.
One of the best ways that I found to learn a programming language as quickly as possible, if you already know a programming language—again, if you just want to learn a new programming language, I'll tell you about how to do that towards the end of the video. I've got a resource for you, a book that I've written that has some information on that. If you want to learn a new programming language and you already understand at least one programming language, the best thing that you could possibly do is that you take something that you've written in one language that you already know and you port that over to the new language, right?
If you wrote an application in one language, can you write that same exact application in another language? It doesn’t have to be an application that you wrote. It could be an application that someone else wrote. It's going to be better if it's something that you know intimately. It could be an example. It could be some homework. It could be problems that you've solved in another programming language. Essentially, what we're trying to do here is we're trying to isolate the—from programming because learning programming or doing programming has two components of it. The first component is creating the thing, the design, the structuring, and then the second component of it is the implementation. There's actually a really good book on this that makes the distinction between those that actually talk about the implementation, called Code Complete, one of my favorite books. You can check that out. If you haven’t read that book, you should definitely read that book.
Let's talk about specifically how this relates to learning a programming language. If we isolate those things, right—because what you want to do is you don’t want to spend a whole bunch of time working on the thing that's not related specifically to the new programming language. If you're learning a new programming language, what you want to learn is how to do things in that language. Syntax, the idiosyncrasies, the idiomatic way to do things in that programming language. You don’t want to waste your time learning how to design a new program. I think a lot of people that want to learn a new programming language, the mistake that they make as they say, “Oh, I should create this brand new project, this new project that I'm working on, this new web application. Let me create it in this new programming language and I'll learn this new programming language while I'm creating this new thing.” Now, they're trying to learn two things. They're trying to focus on the structural side and the design side of a new application and they're trying to learn the syntax and idiosyncrasies of this new programming language and that just makes things harder.
Instead, if you take something that you've already built and you now port that over and you say, “Okay. I'm going to take something I already know how to do,” the reason why I gave you the reference of my Pluralsight courses is that if you watch some of my Pluralsight courses, you'll notice something really common in a lot of the Pluralsight courses. I created this simple app called Protein Tracker that tracks how much protein you eat in a day. Just a simple thing when I was tracking my protein. It's a really simple application but it has a user interface. It has buttons. It has some basic functionality that is very, very simple, but I use that same example in all of the—in a lot of the courses, not all of the courses. But it makes it easier for you to understand because if you've seen one of my courses and you've seen me teach a programming language and how to implement things and then you see me do it in another programming language—what's the same between the two is the protein tracker application. You already know how that thing works, then also your brain makes these connections.
There's a book by Douglas Hofstadter called—I can't remember the exact name, but it's like analogies something of life. It's a really complicated book, but, anyway, in this analogies book, he basically talks about this idea that the only way that we can learn new information is that it's an analogy to something else. This is very, very true. The only way that I'm able to teach you anything, the only way you're able to learn from these videos is because I'm making analogies to something you are already familiar with. If it's totally not familiar to you, it's going to be very, very difficult for you to learn anything. That's the whole strategy. You want to learn a new programming language quickly. Make an analogy from something else. Another programming language you already understand, another application that you've built in that programming language that you understand and now you're going to take it and you're going to reframe it into this new programming language, and you're going to have all these analogies. You're going to say, “Oh, yeah. You know, in C++, this is how we create a new object or this is how we created a button. Oh, in Objective-C, it's like this.” It's just like that. We have this analogy that is going to compare those two things together.
I'll give you one quick example of me doing this myself. When I first started learning iOS development, the way that I did it was I ported my Android application over. I learned iOS development and Objective-C. Essentially, two things: A framework and a language at the same time very, very quickly within, I think, probably three weeks because what I was doing was I took an Android application that had already written and I ported that over bit by bit. By figuring out bit by bit how to do that, I was able to make these connections in my head and say, “Oh, oh. That's just like in Objective-C. I do this just like I did in Java when I try to implement this or this is how I created that class and I had all of those pieces together.” That really, really accelerated the process of learning.
Just remember that. You implement something that you've already implemented in the new programming language. That's barn on the best way to learn a new programming language quickly. Then for those of you that don't know a programming language, if you're just trying to learn a programming language, what I said isn't going to make any sense because you don't have an analogy.
All right. If you have learned a new programming language, doing what I've recommended, basically porting a program over, I would love to hear from you. Leave a comment below just so you can encourage people that are trying to do that. I'll talk to you next time. Take care.
Published at DZone with permission of John Sonmez. See the original article here.
Opinions expressed by DZone contributors are their own.