How to Learn to Code

preview_player
Показать описание

There you go. Here’s the code that will get you past your first technical interview.

By the way, don’t ever write things like that.

So today, I got a question on Twitter, from Sabrina, widely known as the Nerdiest and Quirkiest person on YouTube

And I got really excited, because this is a question I should be qualified to answer! I’ve been coding since I was a little kid; I’ve been working as a developer for the past eight years. I completed a computer science major (though I didn’t wrap up the degree), and I’ve given talks, tech reviewed many books, read and written tutorials.

This is a question I should be qualified to answer.

Surprisingly though, this is a really difficult question. And it’s one that developers get asked a lot by people who are looking to break into the field. "How on earth do I get started?"

And there are two sort of stock replies, that I don’t think work very well. I want to talk quickly about both of them.

The first one is: get a degree! Study the fundamentals of computer science. If you want to develop game engines, you have to learn vector calculus. If you want to work on systems engineering, you have to learn boolean algebra. Study your algorithms!

The problem with this approach is that most developers are inherently lazy. That’s why they program computers to do things for them. It’s very hard to get invested in software when you’re not actually making something you’re excited about.

A lot of people will say "Learn C" or "Learn JavaScript", or learn some other language or toolset. And usually that’s because it’s a tool that they use, to solve problems that they are excited about.

Programming languages are a lot like human languages. Just because you can read and write in French doesn’t make you a French novelist. And in the same way, just because you know the syntax of a programming language does’t mean you can solve problems with it.

There are a lot of languages out there, and they’re all designed around solving particular problems. But unlike human languages, most of them are designed to be somewhat friendly to people who don’t already speak the language.

Let’s use "Hello, World!" as an example. "Hello, World!" is usually the first program you’re going to write when you look at a new language. All you want is for the program to output "Hello, World!", and that’s kindof the basic test to know you’ve got something that runs. So let’s pull up some examples.

What I want you to notice is that even if you don’t know anything about programming, you can tell that these are all pretty darned similar.

And what I think a lot of developers forget to tell you is that eighty to ninety percent of what you learn programming in one language, is going to be transferrable to another language.

We all tend to have our favorites — I tend to like Ruby, JavaScript, and Elixir — but don’t listen to people who say "You have to learn this or that", because those preferences are based on personal preference, and the problems those people are trying to solve.

So I’ve argued that it’s not a great idea to try and force people into studying a particular academic field, or prodding them toward our favorite languages. But then where do we start? There’s a lot of information out there, and it can be very overwhelming.

I’m here to tell you that you don’t actually want to learn to program. What you want to do is solve a problem. Maybe there’s an app on your phone that you don’t like, and you want to come up with a better solution. Maybe you’ve decided that you want to have a website. Or maybe you want to build a game.

Learning "programming" is like practicing scales. It’s going to make you a very strong musician, but if you do that for years without ever playing a song, you’re going to get very frustrated. It’s a lot easier to learn something when you have a reason to want to know it.

For me, the first problem was high school math tests. I’d be using my TI calculator; I’d show my work; I’d make a little tiny mistake, and I’d get the wrong answer. That was a problem I wanted to solve. So I learned TI-BASIC, and I wrote some programs that would factor and foil and all that stuff. That way, when I found my answer, I could go ahead and check that it was right.

It was so much easier to learn that language, because I was using these tools to solve an actual problem that I had. I was excited to figure out ways to make it better and faster.

So before you look at programming at all, figure out a problem that you’re excited about. Something that’s going to motivate you to learn about the languages and tools available. And once you’ve built that really cool thing, you’re going to discover that you accidentally picked up a lot of skills along the way.
Рекомендации по теме
Комментарии
Автор

I just wanna know what my computer is saying about me behind my back

briandawkins
Автор

I'd like to solve my unemployment problem lol

RaviKumar-jidr
Автор

I think you just taught me how to learn.

Автор

This video is awesome. I am 40 years old History professor who is enthusiast about coding and your video really made me excited. I know, I am lagging behind all the nerdy youngsters, but I am planning to start learning to code and catch them.

Edward-csjb
Автор

I've spent my whole life telling myself "I would really like to learn to code"; and this video is precisely why I never went ahead with it.
Nothing sparks my interest, even if there's a problem that I want to solve, I'll just abandon it and forget about it.

And now at 28, unemployed for years and with no intention of stepping outside the house and dealing with other people, I may need to fix that.

wolfy
Автор

This was brilliant! Thank you so much! August will be my first semester for computer science. What seemed to be so frustrating was the lack of "what do I want to do with this knowledge?" It's clear to me that I what I want to learn is game development. Thank you for this great video.

RipVanJester
Автор

As someone who's been trying to figure out how to make a career change into tech, I can't begin to tell you how this was exactly the advice I was looking for. I've started and stopped so many self-led coding courses out of boredom and frustration and this has put me on the right path. THANK YOU!!

iwebbeful
Автор

7 years later and you're still inspiring others! Thank you so much for this!

malanavu
Автор

I remember my first semester CS class. All of the assignments were fun, normally game related. Learn how to use recursive functions by making a simple grid based lighting algorithm, learn how to use keyboard inputs by making a top down pointless game, learn threads by adding enemies to the game. It was all super fun

_gamma.
Автор

As a musician, his comparison of Programming to Scales made me go that makes a lot of sense."

viridianloom
Автор

3:28 to 3:39 -- That explanation is why I never learned how to code. If I can't see an instant cool result in what I was interested in, I give up. If it's not engaging, it's no fun to learn. This guy told the absolute truth on that.

ebonygentleman
Автор

As someone with ADHD this is the exact mentality that got me to learn how to draw, learn how to sculpt, learn how to embroider, learn how to play the guitar, and learn how to write... in the end, I just wanted to make one (1) cool thing, and I learned the steps to do it! It's wild how I am just suddenly realising that coding is the only thing I wasn't trying to learn from that angle, but now I have a cool objective: I wanna make a website about my cats. Thanks, Kevin! ☺

elliotgarcia
Автор

4 years later and this is still a great video. You really should do some more like this!

jarrodvsinclair
Автор

I worked for the U during my CS degree, handling the technical library for sysadmins. I wrote a library management system as my first real thing, solving my own problem. So, _this_. If you want to learn to code, solve a problem.

DaveJacoby
Автор

probably the best advice I've heard in a long time. you'll get burnt out and want to quit if you just learn how to program first....tackle your desire head on while also learning the tools needed to do so along the way

pwoodson
Автор

Finally, YouTube is actually promoting something half way intellectual

Chrisander
Автор

"The problem is not the problem, the problem is your attitude about the problem"  
Capt'n Jack.

Get excited about the problem, and it's not a problem, well said and well presented Kevin.

AndreNonymous
Автор

I went to school to teach, graduated college, spent a year teaching 8th grade and feeling like it was definitely not what I was meant to be doing and recently decided to learn coding. I'm having so much fun with Python. I think it's love.

This video it's a great motivator. Thanks!


TriciaRose
Автор

You perfectly put into words the frustration of the basics of any skill. IT'S SO BORING but when you have a problem you're trying to solve you feel like every single thing you're learning is like putting a piece of the puzzle in place. Also, I'm stealing your scales analogy.

jefflolson
Автор

Excellent approach! I'm a software developer and if I'm not excited about building a function or solving a problem, I have zero drive to do anything. You have to WANT to do something before actually learning how to do it. We truly are a bunch of lazy bastards.

SirfficerNasty