Learn How to Code: Beginner’s Guide

Jasmine
3 min readDec 4, 2021

I love programming! My very first program was simply “Hello World” and I was fascinated when this was printed in the terminal. Honestly, it is interesting to see that computers can take inputs and are capable of giving outputs. Are you passionate about coding as well? In this article, I will discuss how you can learn to code.

First, you should choose a programming language. Then, you need to learn the most fundamental programming concepts. Last but not the least, you should practice your coding skills through small projects.

1. Choose a Programming Language

First and foremost, choose one programming language that you wish to learn. There are so many programming languages to choose from: Python, C, JavaScript, and Java to name a few. These are the most common and highly popular languages and initially you can choose any one of them. Once you learn a language, it would be much easier for you to learn the other ones. This is because you will already know what it means to define variables and how to write algorithms using data structures. So, you would just need to adapt the language structure. For example, Python uses ‘and’ and JavaScript uses ‘&&’ while the result of the statement remains the same. There are many alike differences among the languages but there are similarities too.

2. Learn the Language Structure, Semantics, Data Types, Data & Control Structures, Algorithms

After choosing the programming language, you should learn the language structure and its semantics. In addition to this, you will need to know the different algorithms, control structures, data types, and data structures (see the following). I have also published an article, Learn the Fundamentals of Python. You can also find many useful resources online. It might take weeks to months to learn. However, the main objective here is to learn it all and well at your own pace.

  • Data Types: Booleans, Numbers, Strings
  • Data Structures: Lists, Dictionaries, Tuples, Sets, Linked Lists, Binary Trees, Queues and Stacks, Graphs, Trees
  • Control Structures: If-Elif-Else Statements, For and While Loops
  • Algorithms: Searching & Sorting, Tree Traversals
  • Other: Operators, Range, User Input, Methods, Break/ Continue Statements, Modules and Libraries, Variable Defining, Testing, Exceptions, etc…

3. Practice your Coding Skills with Small Projects

Next, apply the programming concepts you have learned. I highly suggest that you practice applying the concepts as you are learning because it will give you a strong foundation to build your other coding skills, for more complex concepts such as algorithms. You can do so with projects, especially small projects because simple programs provide an opportunity to improve your skills and correctly use the programming language to build working programs.

For example, I wrote a simple program called Password Generator, it generates a random password while satisfying the common password requirements (such as having at least 8 characters, one uppercase and one lowercase letter, and one special character) and the user inputs the desired length of the password. Although this program seems simple, it incorporates many important coding concepts such as importing libraries (random and string), using If-Elif-Else and Try-Except statements, assigning variables, learning exceptions, writing functions, conditional statements and also loops, using the built-in user input method, and much more. Once you master these skills, you can build even more complex programs.

I really hope this article has been helpful. Thank you for reading!

--

--

Jasmine

Interested in human cognition & natural language processing | lifelong learner 🌺