How to start learning to code?
Mehedi Hasan
Choose your weapon language
As Akira Toriyama once said: “ You should know a weapon doesn’t make the man “. It’s a quote from Dragonball Z, but the philosophy holds true for programming languages. A good developer is a good developer regardless of language. Learning any language will help you understand the core concepts of programming. However, you need to start someplace, and if you pick your first language wisely, you’ll drastically shorten the time to hit your goal.
Picking a language
Picking a language boils down to what you want to do. This is a quick list of general development goals and what language(s) are your best options to get there
NOTE: this is not meant to indicate that these are the only languages that you can use for a given domain, just my suggestion on what to start with)
-
Front-end web development (user interface and interaction): Javascript, HTML & CSS
-
Back-end web development (services that front-end web apps and mobile apps call out to): Ruby, Python, Javascript, or PHP
-
Mobile development: Swift (iOS) or Java (Android)
-
Windows development: C#
-
MacOS development: Swift or Objective-C
-
Operating systems, file systems, embedded systems, etc: C/C++
-
Game development: (C++, Unity and C#)
-
Data Science: R
Naturally, there are other options for each of these. Javascript is useful for items 1-5, for instance. But the list is a good starting place as-is.
NOTE: A number of people contacted me and mentioned that in certain places, especially outside the US, the above list is different for back-end web development. In those locations, C# and Java are used more often than Python or Ruby. The suggestion is to check job postings where you plan (or hope) to work for the job and companies you want to work in and see what languages they require.
Finding good resources before start learning
There are a ton of resources to learn to code out on the web. How do you sift through the chaff and find the real gems?
Most resources fall into the following categories:
-
Books
-
Videos
-
Blogs/tutorials
-
Courses
Book
Books are the traditional go-to resource. Search on Libgen for your topic and read reviews on Amazon. Make sure that any books you’re considering are new. Languages change and older books could slow your progress.
Video
A lot of people have gravitated to videos to learn coding and other topics. YouTube is the first place most people look. Fair warning, this is going to turn up a bunch of crap. Look at how many subscribers a given instructor has, and watch some videos to see if their style and method works for you. Another possible issue is that because video is more difficult to update for new versions of a language (or corresponding tools), some videos might be outdated.
Blog
For blogs and tutorials, a simple google search like “best python tutorial” or “best swift tutorial for beginners” is a great place to start. As with videos, you’ll have to try a few to see how they work with your learning style.
Online Course
Online courses are the newest resource on the scene. Codecademy is one that a lot of people find immediately. However, after I talked to a lot of people who tried it, none really thought it did a good job. Free Code Camp or The Odin Project are both highly regarded for web development. Udacity, Coursera, Udemy all have courses in different genres. Each has reviews so you can compare and only look at ones that helped others.
-
Where you should start
Each development goal in the above list is different enough to require different starting points. I have not personally tried all of them, but have come across them when doing research. There also might be better ones, and so if you know of any, let me know and I’ll update this list.
- Front-end web development: Free Code Camp
- Back-end web development: Ruby (for Rails), Python (for Django), Javascript (for Node), PHP ,The Right Way, for places where C# and Java are used more often, see Windows development and Mobile (Java) development respectively for resources.
- Mobile development: Swift Lynda’s Swift Essentials (Check Flatiron school’s free Swift course, Swift Programming book or Java Head First Java, University of Helsinki’s MOOC
- Data Science: R Swirl or Coursera’s R course
Once you pick your language and starting point and you start learning, some things will be obvious, but others will be difficult to understand. You’re going to run into trouble and with concepts and code errors. That’s normal. We’ve all been there. Getting unstuck takes practice too.
How to get unstuck once you’ve started
Once you start learning to code, you’re going to run into problems that you don’t know how to solve. This is normal and part of the process. You don’t really learn unless you struggle through it. That said, you won’t always be able to move forward without some help. So how do you find that help?
First off, forget books. They aren’t a great place to start here, because the number and types of errors they can cover is so small.
Online is the easiest place to find help. Most devs look for solutions on StackOverflow or just google the error message (if they have one). Other solutions are to find newsgroups or forums dedicated to the language you’re using.
Author
Mehedi Hasan :zzz: