How to Learn Code

How to Learn Code

Table of contents

No heading

No headings in the article.

from the day I wrote my first hello world program it took me two years to land a job at amazon and another two years to get into google that's because I did all this with no computer science degree or boot camp. I made countless mistakes along the way which made my path to becoming a software engineer longer than it should have been I watched countless youtube tutorials paid for numerous udemy courses and spent hundreds of hours learning things that didn't add any value. If I could go back in time and undo all the things that don't work I would be in the same situation as today within 6 months of starting programming. let's talk about what a beginner wants from a programming language, number one the language should be easy and intuitive to write and should not require learning any complex syntax. it should be as close as possible to writing in English next the programming language should be versatile and have many applications. as a beginner you don't want to learn a new programming language for every new project you want to build in other words the language should have great returns for the time you invest on learning it. lastly, the programming language should be fast to write you shouldn't have to waste time spelling out the declaration of a new variable or simple iteration through a list in other words. it should be concise and get the job done in minimum lines of code some of you might have already guessed it python is a language that solves all these problems. it's almost as easy as writing in English it has so many different applications like web development data science and automation python is extremely fast to write when compared with other popular languages. that's because it requires fewer lines of code for the same amount of code as example here is the same code written in java versus python for me I started with learning java I used to do all my coding interviews in java. recently I switched to using python and it improved my interview performance by at least two times because it's so fast to write having said that java and other popular languages have their advantages and you'll have to learn another language at some point in your career but I do believe that python would be the best language to start with now that we know we should learn python. let's talk about how to do it and this is where most new programmers make the first major mistake that slows them down the mistake most beginners make is that they learn by watching others code let me explain this by telling you how most people learn programming most newbies would go to a course provider like udemy and look up for python courses then they pick one of these 20 plus hours courses thinking that these courses are long and detailed and hence good for them and then they never end up finishing the course that's because 20 hours of content is not the same as 20 hours of great content some people will go to youtube and watch someone else code without ever writing any code themselves and watching these tutorials gives them a false sense of progress that's because coding in your head is very different from actually writing down the code and debugging the errors so what is the right way to do it the answer is very simple you should learn by coding for this you can go to this free website called learnpython.org on this website just focus on the basic lessons for python and don't worry about data science tutorials or any other advanced tutorials that's because even if you learn advanced concepts right now you would not be able to remember them until you have actually applied them on a real world problem you can always come back to learn advanced concepts in the future when you need them for your projects to look at a lesson each lesson first explains a basic concept and then asks you to apply these concepts to a problem feel free to play with the sample code think about other problems you can solve with the concepts you just learnt and try to solve them in the exercise portion once you are done with the basics you are good to move on to the next steps in the spirit of learning by coding we would do some projects in python next in the beginning it's very hard to do something on your own so we'll take help from the experts so go to youtube and look up this video called 12 beginner python projects by free code cam which by the way is a great channel to follow in this video they built 12 beginner python projects from scratch these projects include building mad libs tic-tac-toe minesweeper etc and all of them are very interesting they walk you through the implementation of all these projects step by step making it very easy to follow but before you start watching this tutorial there are two things you should know one you should not watch this tutorial casually follow along if you really want to learn programming and become a software engineer to follow along you will need something called integrated development environment or ide to build these projects ide in simplest terms is an application where you can write and run your code there are several popular ids for python this tutorial uses vs code so you might want to download vs code and set it up for python before starting on this tutorial once you have completed this tutorial you are ready to work on your own projects working on building your own projects will help you in multiple ways number one it will introduce you to how software engineers work in the real world you will write code that will fail and you will debug it and repeat it over and over again this is exactly what a day in the life of a software engineer looks like number two you'll build a portfolio of projects by doing this you can host your code on github and put the link in your resume this will help you attract recruiters and get your resume shortlisted lastly building your own projects will give you confidence that you are ready to tackle new challenges as a software engineer but what kind of projects should you work on you can think of any projects that you find interesting but here are some examples i found you can build a web crawler or an alarm clock or maybe an app that gives you wikipedia article of the day some example projects that i built were spam filter an algorithmic trading engine and an e-commerce website now you have a great resume and you're confident about your programming skills let's start applying for software engineer positions wait a second this is actually the second major mistake new programmers make you see in an ideal world having good programming skills and a great resume is all you should need to become a software engineer but unfortunately for us tech companies like to play games with us in the interviews they ask you specific kind of programming questions in the interviews if you don't prepare for these questions you might not get the expected results so let's see how to prepare for the interviews all the interviews are based on this one course that is taught to all computer science graduates this course is called data structures and algorithms fortunately for us google has created this course and made it available for free on udacity the best part is that this course is taught in python in this four week course you learn about different algorithms related to searching and sorting you'll learn about data structures like maps trees and graphs don't worry if you don't know any of these terms right now i'm sure that by the end of this course you'll be a pro for that just keep two things in mind one be regular and finish this course as i mentioned earlier most people start courses and never finish them so make sure you take small steps every day and make regular progress two make sure you complete all the exercises they give you in this course as i've already said many times the only way to learn coding is by doing so implement the algorithms by yourself if you can and finish all the assignments trust me when i say this when it comes to interviewing for entry level jobs this course is the only difference between you and someone who dropped more than a hundred thousand dollars on a computer science degree so if you finish this course you'll be pretty much on par with someone who has a cs degree when you interview after completing this course on data structures and algorithms you have all the foundation knowledge you need to tackle the interviews in order to sharpen your interview skills further you need to practice some questions that have been asked by tech companies in the past for that you should use this website called lead code on lead code you will get interview style questions you can write your code and test your solution right there on the website leak code is great for beginners because all the questions are tacked easy medium or hard based on difficulty level if you get a premium subscription of the website you can also filter questions by the tech company that ask them in the past interviews you should start with easy questions and keep working on them until you can solve them in 45 minutes once that happens you can move on to the medium questions when you start solving mediums in 45 minutes you can start applying for software engineering jobs if you are lucky you'll get the job right away. for most people, it will be a process full of disappointment and rejections and this is where they make the third and the biggest mistake of all they quit the main reason people give up early is that they overthink and complicate the interview process . after every rejection, they replay the interview over and over again in their head to figure out why they failed and take every rejection personally to avoid this stay inside your circle of control and try to influence the outcome of your interviews.