Skip to main content Accessibility Feedback

Learn JavaScript like Lil Wayne

One of my favorite rappers, Lil Wayne, dropped his first new album in five years on Friday.

Today, I wanted to talk briefly about what Lil Wayne can you teach you about how to learn JavaScript. Yea, seriously.

The best way to learn JavaScript is to write a lot of JavaScript

Lil Wayne has released 38 solo albums in the last 19 years. That’s an average of two a year!

That includes 12 official studio albums, and 26 mixtapes. It doesn’t include the numerous cameos and features he’s done on other people’s songs.

The dude makes a lot of music. And honestly, a lot of it is garbage.

But a lot of it is also amazing, witty, emotional, great music.

A lot of people consider him one of the greatest rappers of all time, and he got there by practicing his craft over and over and over again.

Learning JavaScript is a lot like that.

You need to practice it over and over again. You need to produce a lot of garbage code to write good code, and eventually great code.

When I was learning, I released half a dozen small JS modules in the first month or two. I now have a collection of a few dozen open source projects that I often tweak and update.

You don’t need to open source all of your work, but if you want to learn code, you should be writing a lot of it, even though much of it will be terrible at first.

Iterating is a natural part of the process

Lil Wayne doesn’t write down lyrics.

He steps into the booth and freestyles. He often stops, rewinds the track, and revises parts in real time as he goes.

If you’re into hip-hop (or music in general), it’s kind of a fascinating thing to watch. Here’s a short clip from his documentary (the good stuff starts at the 3:08 mark—warning, it contains explicit lyrics).

Notice how he stops, makes some updates, and goes at it again?

Your first pass at a script will never be perfect. It’s ok to get something sloppy and functional out of your head first, and then go back and fix it.

Many of my students get stuck because they try to write a script perfectly on their first try and never actually get any code down in their text editor.