Learn Docker With My Newest Course

Dive into Docker takes you from "What is Docker?" to confidently applying Docker to your own projects. It's packed with best practices and examples. Start Learning Docker →

How to Quickly Learn a New Programming Language or Framework

blog/cards/how-to-quickly-learn-a-new-programming-language-or-framework.jpg

There's many different ways to learn a language, and in this article you'll learn what I think is the best way to learn something new.

Quick Jump: How Do You Learn Best? | What Do You Want to Build? | Here's How I Learned Every Language I Know | Takeaways for Applying This to Your Life

Programming is tough, and like just about anything in this world, you can go about learning how to do it in a number of different ways.

This article expects you to have at least some programming knowledge already, because the strategy I’m going to share with you expects you to know the basics.

For example, if you have no idea what an “if statement” or “for loop” is, then please bookmark this page and come back once you’ve gotten some experience because this advice might do you more harm than good.

How Do You Learn Best?

It’s not surprising that people learn in different ways, so the first thing you should do is identify how you learn best.

I don’t know about you, but I can’t just open up an 800 page book and read it cover to cover and then be like “I know kung fu!”. As much as I wish I could do that, I just can’t.

If you want to talk about general statements, it’s a known fact that most people learn best by doing. That’s why all of my teaching material is heavily loaded with examples.

Personally, I learn best by example. I’m very much a “monkey see, monkey do” type of person. Show me how to do it, and then let me practice it, and I will eventually learn it.

The “doing” part is critical. You can’t just read examples and expect great results. The more you practice something, the better you’ll be at doing it.

As I teach myself other non-programming tasks such as copywriting, I find myself hand writing sales letters from famous copywriters. I haven’t done that exercise in a while but I can recall bits and pieces from all of the ads I wrote out on paper. I can’t explain why, but the act of writing them out really helped me retain the information.

So, go ahead and try a few different ways to learn something. I recommend starting by getting your hands dirty and writing (typing :)) code as soon as possible, and that leads us to a very important topic.

What Do You Want to Build?

Let me ask you a simple question: what do you want to build? If you can’t decisively answer that question then you might want to step back and ask yourself why you’re looking to learn a new programming language or web framework.

You may think it’s a stupid question, but it’s really the most important question you can ask yourself because if you have nothing that you want to build then you might be learning a new programming language or framework for the wrong reasons and down the line this is going to greatly hinder your progress.

Learning a language because “it’s faster than XYZ” or “my boss wants me to” are death traps for learning because there’s no real deep down desire to learn it. At the end of the day, you need to genuinely love what you’re doing and also have a purpose for why you’re doing it.

Your Subconscious Is Smarter Than You

If you don’t really believe in what you’re doing then you will find ways to avoid doing it. That’s pretty much how all forms of procrastination come out and stop you dead in your tracks – Medusa style.

I remember talking to a friend once about splitting my day up for certain activities, and I remember saying I would spend 1 hour a day reading about a specific topic that I was really interested in learning about.

He replied to me with “if you found your soul mate, would you arbitrarily limit your time with her?”. Chances are you would laugh and say “of course not”.

Think about it. If you really enjoyed doing something, then why on earth would you avoid doing it? It doesn’t make a lick of sense.

I understand that most of us have to do things we don’t like and make time sacrifices all the time, and that’s exactly why it’s so important to train yourself to learn quickly.

Here’s How I Learned Every Language I Know

Let me share how I learned pretty much everything I know about programming. In case you don’t know, I’m a self taught developer and would consider myself to have an unquenchable thirst for general knowledge.

2600 / AOL / Visual Basic 6

It all started in the late 1990s. Here I was, a punk teenager, listening to Slayer at volume 11 while going to 2600 meetups in NYC. Roaming the streets with various print outs and the Anarchists Cookbook. I thought it was fascinating, and even created a redbox once (which worked at my old high school). I still remember running into an AT&T technician who was upgrading the pay phones and talking to him about it.

Anyways, back then I used to go on AOL sometimes and at the time people were creating tools like AOHell which was a malicious program that let you do things like knock people offline (a punter), flood a chat room and do other questionable things.

All I thought to myself was “how in the world are people doing this?”. Back then there was no Google or endless sea of tutorials. All I had were vague 1 liners like “VB6” which were uttered by people in questionable chat rooms.

Visual Basic 6

So I got a copy of Visual Basic 6 and taught myself how to make programs with it. I had no idea what an “if statement” was, or anything. At this point the only thing I knew I was good at when it came to using computers was video games.

I was average at best at math and I never enjoyed reading, so it’s not like I was designed to be a programmer. All I knew was I liked tinkering with things and I’m compulsively dedicated to learning about something once I show interest in it.

I spent many weeks just messing around with VB6. The key phrase there is “messing around”. I didn’t spend a month watching Youtube video tutorials or reading blog posts.

I just opened the program up and started dragging shit around until it made sense. Then I glanced through the documentation when I got stuck. It honestly didn’t take that long to get something basic working.

I think back to those days and it was a nice introduction to event driven programming. It’s not too dissimilar to native mobile app development today. I’m not a mobile app developer but I did once download Android Studio because I was bored one day. It gave me a very nostalgic feeling towards VB6. You just drag UI elements onto a “form” and then attach event handlers to those elements.

Long story short, I wrote a few AOL bots and other “hey look at me, I’m an asshole” programs. But I also wrote some legit programs too, like an MP3 player and even my own text editor to name a few.

Do you notice the trend here? These are all programs that I directly wanted to build. They guided the learning process. I didn’t go into VB6 thinking “I’m dying to learn how to logically create a nested for loop!”.

HTML

At this point the internet started to boom. Websites were becoming a real thing so naturally I wanted to create my own website.

My platform of choice back then was Geocities. My first page had everything. Animated GIFs, under construction signs, a stickman taking a piss on an Internet Explorer button and a MIDI soundtrack of the Exorcist theme. It was the coolest site on the internet (in my mind at least).

I listed all of my favorite bands, programs, 2600 adventures and I even had a guestbook.

The trend continues. I wanted a place of my own on the world wide web, so I learned HTML. Never in a million years did I think “hot damn, creating an HTML table sounds like a glorious way to spend an evening”. Nope, it was more like “I want to list out my AOL tools in a grid, better figure that out”.

ASP Classic

Eventually I got really involved in a video game called Quake 2 (and later 3). I was pretty good at it and joined a “clan”. Basically, it was a group of us who played together on a regular basis.

Back then there weren’t too many places you could go to schedule games to play against other clans. The only place that existed was OGL but their platform sucked.

One of my Quake buddies was learning this thing called ASP and we decided to build an online gaming ladder of our own. He did all of the programming, and I did all of the design. This is where I really honed my HTML and design skills.

It was a pretty sophisticated platform for its time. It was a persistent ladder where teams can automatically schedule and report their games, upload demos (a recording of the match), and it ranked teams based on wins / losses.

I believe at its peak we had something like 14,000 members and it was considered “the” place to go if you wanted to compete. As time went on, I slowly started to pick up ASP because I wanted to help my friend build up the platform.

I started off small by making scripts that were add-ons to the site. I still remember making some Quake server config generator that had like 30,000 uses.

I also spent some time making clan web pages for other teams, which was my first taste of doing freelance work. Sometimes I got paid with money, and other times I did it for the sake of it being fun.

Again, my point here is, I had a very strong desire to build something in this case. This project spanned for a few years until Quake 3 died out. I guess you could say this was my first experience with a SAAS application except we didn’t charge or make any money.

.NET / CSharp

Later on, I found myself playing another game. It was a highly precise arcade style golf game called PangYa. To excel at that game you had to take very precise measurements of various game mechanics (the wind, how your ball is sloped on the ground, how the green is sloped and so on).

I found myself furiously typing numbers into a calculator after coming up with a couple of rough formulas, but it was so stressful because the game had a time limit for how long you can spend to take your shot (it was a multiplayer game).

So I was like “maybe I can build my own program to automate this a bit”. At that time .NET was new and it looked like a really good native app platform for Windows.

I spent some time learning C#, and after months of iterating on it, I had a program that let me write notes for various holes, calculate a shot in about 10 seconds and even zoom into a RECT of the game and display it within my own program so I can better judge the exact angle of the wind.

It even bypassed the game’s anti-cheat software, even though it was really just a glorified calculator with a couple of lines drawn on the screen.

Also, in case you’re wondering, it started off small and grew over time. I didn’t have all of those features from day 1. I started using it as soon as it was able to replace the Windows calculator, which didn’t take too long at all.

Hopefully you see the trend here. I genuinely had a direct need to make this program, and this was one of my first “real” programming applications. It was thousands of lines of code and went through multiple refactoring stages.

And I didn’t refactor things for the heck of it too. I did it because it started to get a little difficult to maintain since I was actively working on the project so often.

The original version had code in there that would make you throw up a little in your mouth, but in the end it worked! Being able to see that immediate feedback of something you want working is a huge deal and you only get this if you’re out in the trenches writing code.

PHP / LAMP

The internet was pretty big at this point and I found myself being jaded by opinions of others, and suddenly making web applications with ASP wasn’t the cool thing to do, so I hopped on board with PHP.

During this time I also started working with CSS, Javascript, MySQL and Apache. It was your typical LAMP stack.

Web hosting companies started to spring up left and right and instead of using Geocities I wanted my own server, so I got situated with that and created a new website that was driven by PHP.

Another friend and I had this marvelous plan to build a knowledge base for computer related problems. The platform never took off but man did I spend a lot of time making it.

It had everything under the sun. Users, comments, an elaborate admin, articles, rankings and more. This really taught me a lot about CSS and JS in addition to how to make a database driven application.

WordPress or anything like that wasn’t around yet. I had no idea what a framework was. All I did was code this thing up on my own, pure cowboy style without an ounce of planning or preparation.

I eventually went on to make websites for other people with this stack while doing freelance work. I spent a long time doing this (years upon years) and also learned WordPress along the way.

Ruby / Ruby on Rails

I was a very late bloomer with Rails. In fact, I didn’t even start until version 4.0 was released but I was blown away at how easy it made things after having watched a few Youtube videos.

Prior to getting started with Rails, I felt like I aged 100 years after having worked with PHP for so long. I still really only used my own cowboy style PHP code or WordPress.

This was a rare time where I picked up something new without having a new project to work on in mind. This was more of a “yo, I’m not spending the rest of my life working with PHP” moment.

So I dug in and consumed Rails for 3 months. I made my own blog, but I didn’t just “make a blog”. I went all out. It had everything you could think of, including full text search, autocomplete search and faceted navigation with ElasticSearch. It also had a real time time split preview markdown editor in the admin.

You know, all of the things you shouldn’t be doing before you even launch your site. Still, I was hardcore when it came to making this, so I kept at it.

This was the first time I ever paid for learning material too, because after I found railscasts, I really understood the value in having someone who knows what they are doing explain things to you.

I got past my ego and thinking “who is this clown, I can learn this myself”, and just embraced that Ryan Bates was a champion at Rails and I would be an idiot if I didn’t listen to him.

So I happily paid for a subscription and worked on various projects over the years. Mostly client work, but I wrote my own private tools too. I built many many things and each time I got stuck on how to do something, I simply researched it as it came up.

There was never a point where I spent a ton of time just reading without doing. Even while learning the basics of Ruby, I kind of just played with it as I went and when things got hard to maintain or it looked ugly, I looked for ways to improve it right then and there.

Python / Flask

I still happily use Rails to this day, but as I was using it, I found a need to develop a small service for a project. It just felt like Rails would have been overkill so I looked for alternatives.

All I wanted to do was relay information from 1 service to another. Almost like Zapier, but without it being generic. It ended up being a 250 line Flask app.

I’ll admit, I did get caught up in the whole “Rails doesn’t scale” and other micro-framework bullshit but eventually got past it. Biggest waste of time ever.

Never base your decisions on things that are irrelevant in the grand scheme of things.

In order to eventually get to Flask I spent months of time playing with Node and Golang but I just couldn’t get behind using them. For starters, I’m not a huge fan of Javascript, and Golang just felt too tedious to program with after having used Ruby. Python on the other hand, meshed pretty well with my brain.

So I drifted towards using Flask and I love it. It’s a great little framework for building not only small services but large ones as well. In fact, I even wrote a course on how to learn Flask and it has thousands of happy students.

Currently Rails and Flask are my goto tools for web app development but I keep my eyes open.

Takeaways for Applying This to Your Life

Here’s 4 main things you can use to speed up your learning process:

Don’t Be Afraid to “Waste” Time

I sometimes hear from students that they don’t take action because they feel like that will waste time. “Why do it if I can just read about it or watch it?”.

I definitely have those thoughts too, but then I look back on some of my better moments in life and it’s filled with taking action, not being a spectator. That quickly snaps me out of it.

Spending 3 hours screwing around with a new programming language is not wasting time. You are forming opinions based on real feedback from the person who matters most (you!).

That’s certainly better than spending 10x as long passively watching something on Youtube while wondering “what if” or constantly being in a state of doubt or indecision.

Just dive in and build things. If you’re looking for specific strategies on how to start learning / building, here’s another article I wrote on the topic of question driven development.

Build Things That Interest You

For me, video games was (and still is, to some extent) a big part of my life. It’s one of my hobbies.

I found writing applications and web pages around those games to be a very rewarding experience because it was something I believed in and it directly enhanced my gaming experience.

If you’re into games, try doing that too. Maybe you could create a skill tree builder web app, or some type of information organizing tool. Whatever makes sense for the games that you’re playing.

If you’re not into video games, that’s no problem. Just pick something that interests you. For example if you’re into bowling and are in a league, go ahead and build your own score tracking / ranking ladder.

Once you get it working well, maybe run it by the people in charge of the league, and the next thing you know you might have something that you can sell, or at the very least dozens or hundreds of other people will be using it. It’s great experience.

Fully Consume Yourself in Their World

You often hear that people who drop ship themselves into a different country pick up a foreign language the fastest. That’s because they are completely consumed by a new environment. You have to adjust, or you’re going to struggle / die.

It’s no different with programming languages or technologies. You should be writing code as much as you can, going to meetups at every opportunity and assimilating yourself into that technology’s ecosystem.

Give yourself permission to say “fu” to media entertainment. For example, do you really need to watch 3 hours of TV every night? Of course not. Instead, spend 1.5 hours coding and then go watch a movie or something on Netflix if you really need to unwind.

Keep Your Ego in Check, It’s Worth Paying for Knowledge (Sometimes)

The problems you and I have today are not unique. The same thoughts and uncertainties that haunt your dreams were happening to people thousands of years ago, just in a slightly different context.

You’re not the first person trying to learn whatever you’re trying to learn, so don’t be afraid to pay for information.

The great thing about paying for information is that often it’s like traveling in time. What might take you 6 months to figure out was fully solved and documented by someone else many moons before you.

Take advantage of those situations when they come your way because time is one thing that you can’t get back. There’s always going to be ways for you to make more income. Spending $10 or $100 on a course that saves you hours is totally worth it.

And I’m not just saying that because I happen to be selling online courses. This blog post was in my head years before I started creating courses (which is quite recently in the grand scheme of things) and I pay for learning material too (books, other courses, etc.).

Just be careful where you spend your hard earned money. Personally I only buy things from people who are out there really doing it. For example, University professors are smarter than me but I wouldn’t want to learn how to build a business from a professor who never ran a successful business.

I would much rather learn from a dude who ran multiple businesses and made millions of dollars, then dedicated years of his life traveling the world and speaking about how he did it.

The same can be said about programming (or anything really). Anyways, I don’t want to turn this article into a rant on the current education system, because that’s a story for another time.

Good luck, and let me know in the comments below if any of this makes sense to you. Even better, let me know your secrets for how to learn something new.

Never Miss a Tip, Trick or Tutorial

Like you, I'm super protective of my inbox, so don't worry about getting spammed. You can expect a few emails per month (at most), and you can 1-click unsubscribe at any time. See what else you'll get too.



Comments