How to learn coding?

Submitted by chaky on Wed, 11/02/2022 - 09:29

Some of you may struggle to learn coding.  Here are some tips I have (which I wish someone told me when I was young):

1.  Coding is about practice.  It cannot be learned through reading or listening, but only active learning.   It's ok to watch videos, but the only way to learn coding is to code.    Practice, practice, practice.     Just do it.   Don't complain.

2.  Be patient.  It takes 1 year to start feeling comfortable,  3 years to feel skilled and confident, 5-10 years to feel competent that you can solve some new problem.   So coding is a LONG journey.  The winner is the one who is patient and learn hard.   The loser is usually those that is very active in the beginning, and give up midway....(I see so many students like this....)

3. Learn coding through project, NOT syntax.  Start a project you are passionate about, and learn through it.  You will truly understand what is "coding".      You can also start build your career by building up your GitHub profile.

4.  Learn through MANY examples.   Once you feel a bit more comfortable, this is the time to learn MANY examples in the GitHub and    Try to copy them and change.    For example, copy TicTacToe and adapt it for Bomberman.....

5.  This may sound silly, but buy either a linux-based machine or MacBook.    It's much better for coding, and you can learn much more system/network skills.   I recommend M1 MacBook Air.  It's cheap and has everything you need. 

6.   Go to and learn typing daily.   40wpm is a good start, 60wpm is quite ok, 80wpm is sufficient.   You can boost your productivity by typing fast.    One of my student improve from 20wpm to now 80wpm.

7.   Master only one language first.   Please don't be like a greedy man trying so many languages.   Master one language deeply so you can truly understand the essence of programming.   I recommend Python.

8.  Try to minimize StackOverflow in the beginning.  Learn to read documentations and come up with your solution.  Then compare your answer to those in the StackOverflow.   This will train your mind.     But once you are very seasoned, there is no problem using StackOverflow because they simply help you recall the syntax.

9.  Learn data structures and algorithms.  For example, you should know the differences between using a tree vs. graph vs. priority queue. Read the book "clean code".   It will completely change how you write code.

10. Go to good company where there are many good coders.  You can learn from them.  But please be humble.   Always chant: "I suck, I am much to learn.....I suck, I have much to learn..."    Be a guy with empty glass, not with full glass.   (I also see many students like this.....they can never learn...)