Transcript for:
Essential Insights for Learning to Code

everybody needs to learn to code coding is the new literacy if you can't code you'll soon become obsolete plus coding is easy so you really have no excuse these are all statements that are not true but i've been told that fear-based sales tactics will scare you into subscribing to my youtube channel in today's video i'm going to share a variety of practical techniques that have helped me learn to code because learning in and of itself is a skill and if you want to be a software engineer you'll need to learn new things all the time many moons ago i didn't know how to code i wanted to learn because i hated my low paying miserable job and wanted to build some kind of app on the internet that would allow me to break out and start my own business i figured i wasn't smart enough to code but you only live once so i bought a giant book about php and mysql and sure enough i wasn't smart enough to code and those toilets weren't going to clean themselves i went back to my crappy job and forgot about it luckily a little while later my family needed a website so i figured i was at least smart enough to learn html and somehow a few months later i figured out how to ship my first website the important thing to recognize when learning to code is that hard work is more valuable than talent talon is great if you have it and there are 10x developers out there where things just click on a much higher level but programming is a skill very similar to playing a musical instrument or juggling for most people you totally suck at first then you feel like a genius when you code your first program then you realize you totally suck again and this pattern goes on and on forever in an infinite loop learning is supposed to be painful in fact i believe that you need pain to grow when learning a guitar you need to put your fingertips through a lot of pain before you build calluses in programming you'll have to bang your head against the keyboard a bunch of times until you figure out how to make these error messages go away so if you don't have talent be prepared to embrace the hard work now as you learn you might be wondering which programming language should i start with the truth is that it doesn't matter as long as you get really good at one of them the thing about programming is that there's so much to learn you are never going to retain at all i used to be a really good ruby programmer but at this point i've forgotten almost everything about it and that's no big deal because memorizing syntax doesn't really matter the thing you really want to learn and retain are programming patterns essentially everything you do in programming is problem solving the idea is to create a repertoire of tools in your brain that you can then use to solve virtually any problem in any language for example if you need to loop over something but you've never used pearl before you still understand the trade-offs between a for loop while loop and recursion this is the exact reason that when you go to a technical interview they usually don't care which language you use they just want to see that you know how to solve problems and in some cases they may only have you write pseudocode on a whiteboard to analyze your problem-solving skills so in learning i would recommend trying out a few different languages and learn the one that feels most natural to you for most people i think python is ideal because it has a minimal syntax is extremely popular and is also just a very useful language to know in general but javascript go kotlin and swift are also good languages to start with but again it's about becoming a problem solver not about memorizing syntax and that begs the question how do i become a good problem solver the answer is go solve a bunch of problems turn off youtube and go write some code will you ever learn to play guitar by watching other people on youtube play guitar the answer is no you also need to be playing the guitar along with them books and tutorials are great sign up for fireship pro but they're utterly useless if you're not coding along with them in my tutorials i try to set you up with something cool to build so you can go have fun and fail on your own you can build things based on tutorials you can try to build your own stuff you can do coding challenges participate in hackathons and all kinds of other stuff if you're serious you should be coding at least a couple hours every day there's a reason they require pilots to have a certain number of flying hours experience matters more than anything else and luckily for you to get time in the saddle all you have to do is sit on your ass in front of your computer screen and hit the keyboard until something cool happens speaking of which sitting on your ass in front of a computer screen is not natural or healthy and that means you need to work extra hard in this line of work to protect your health both mentally and physically that's why i prefer to eat at arby's the most trusted name and nutrition i also get plenty of sunshine and exercise to offset the time i spend banging my head against the keyboard in my mom's dark windowless basement if your health is not optimal you won't learn as efficiently and there's no activity in the world that's worth sacrificing your health over now let's switch gears and talk about a physicist named richard feynman he's a nobel prize winner known for many things one of which is his learning technique it goes like this choose a concept you want to learn about explain it to a 12 year old reflect refine simplify then organize and review in other words you learn most efficiently when you try to teach the very thing you're learning i can tell you right now that i've learned way more about programming from running this youtube channel than i ever did working all by myself now that doesn't mean that everybody needs to go and start a youtube channel all you have to do is pretend to teach something but if you can create valuable content out of it like a video or blog post that's even better or if you already have a job you'll find that you learn a lot just by mentoring other people or if you don't have a job you can join programming slack or discord channels and help people out there or answer questions on stack overflow helping others feels good and it forces you to be extremely precise about what you actually know here's how it might look for a programmer choose a topic like i want to program a video game do some research and experimenting and write a summary explaining the technology to a 12 year old then go and build something and get to a full working demo as quickly as possible it doesn't need to be perfect because in the final step you'll go back and refactor and simplify and find ways to improve your process and get feedback from someone more experienced than you if possible so approach it like a teacher even though you have no idea what you're currently teaching now i said something very subtle but very important and that is to build a full working demo as quickly as possible learning is supposed to be painful but there also needs to be some kind of reward for that pain and the more quickly you can get to those rewards the better because what you want is a positive feedback loop that basically makes you addicted to coding there are ways we can hack the most primitive parts of our brain what i do almost every day before i go to bed is write down a few small goals that i want to achieve the next day the important thing is that the goals are achievable because then writing a check mark next to that goal feels good when good things happen your brain releases dopamine and you want to try to find activities that after hard work give you that dopamine hit because otherwise you'll have a negative feedback loop in which case you're going to absolutely hate coding in no time that'd be like learning how to press the strings on a guitar without ever knowing how to play an actual song the idea is to work hard and be rewarded but you don't want to work too hard it's extremely important especially for programming to pace yourself and take regular breaks for most people that likely means one or two hours of programming followed by a nice long break i remember in my early days being absolutely determined to not let the error messages win i'd go late into the night stack overflowing every possible combination of questions only to give up and get a good night's sleep and then come back and immediately solve the problem in the morning and this isn't unique to me it happens to everybody because mental spacing is actually a very important thing you can be mentally exhausted while at the same time your ego is saying you got this bro don't be a loser but the reality is that the most efficient thing to do is go outside get some sunshine jump in a cold body of water and get some sleep when you wake up you'll be ready to crush it once again now that you know how to learn to code all you have to do is go to google type in what you want to learn and let it be your guide because that's basically all you ever do as a software engineer i'm going to go ahead and wrap things up there make sure to hit the subscribe button to get the next video in this installment about mastering the technical interview thanks for watching and i will see you in the next one