Learning the fundamentals of syntax for code reading

Do you think reading code needs talent? And do you consider yourself less talented in terms of code reading? It's not true. There are some causes you don't have a feeling of being good at code reading. One of them is a lack of the fundamentals of the syntax of a programming language.

What is a lack of the fundamentals of syntax?

A lack of the fundamentals of syntax means "not good enough to learn the syntax of a programming language" or "not exhaustive knowledge of basic syntax". Software engineers frequently read a few or dozens of lines of code at a time. Reading a piece of code requests the ability to understand it line by line. Needless to say, it is mandatory to master the basic syntax of the programming language.

You may take it for granted that all the software engineers have mastered it. But that is not the case.

A tutorial for beginners doesn't teach exhaustive basic syntax

In terms of the modern learning environment for beginners, it is natural to lack the fundamentals of syntax. Ten or more years ago, most software engineers began to learn programming with a textbook, which mainly taught the syntax of a programming language and introduced the syntax exhaustively.

But nowadays the mainstream to learn programming is being replaced[1] with a tutorial or a hands-on which teaches beginners how to develop a simple software like a todo app. As a result, there are a lot of junior software engineers without a chance to learn syntax exhaustively. They do some typical tasks well in practical development, but easily get stuck with others because they don't master exhaustive basic syntax. Especially, the tasks with code reading.

If you're an engineer started from a tutorial, have you suffered from code reading?

Is it possible to master exhaustive basic syntax through work?

Do you depend on blog posts or Stack Overflow whenever you face a problem? While you solve the problem using the information from them, you can also learn the syntax related to the problem. Well, is it possible to master exhaustive basic syntax through work?

The answer is no. The frequency of problems or bugs depends on the type of them. Some happen frequently, others do rarely. There are fewer chances to learn the syntax related to rare problems. So you can't expect daily tasks to provide you chances to learn syntax "exhaustively".

It is also important to recognize a lack of the fundamentals of syntax. You usually ask your colleagues some questions to solve a problem and the advice from the colleagues solves the problem you face. But it doesn't find why you can't solve the problem for yourself. If the reason is a lack of the fundamentals of syntax, getting the advice takes away a chance for you to recognize it. Without the recognition, you will not learn syntax exhaustively.

Even if you are busy working as a software engineer, you haven't yet mastered exhaustive basic syntax. Whenever you have to read code, you stay uncomfortable and don't have a feeling of being good at code reading. That feeling keeps you further away from code reading and it is too much of a bother.

What is given as a profit by mastering exhaustive basic syntax?

In contrast to the above, what is given by mastering exhaustive basic syntax as a profit? First, you can ease the discomfort caused by code reading. It gives you a better developer experience because code reading is essential to any situation of software development. Easing the discomfort also makes you positive about code reading and leads you to tackle code to understand it more often than before. The more frequently you read code, the better you are at code reading. A little while later, you will be very confident.

How to master exhaustive basic syntax

Learning exhaustive basic syntax with a textbook is the right way. All you need to master is the exhaustive knowledge of basic syntax. Not the complete knowledge. For example, one of the best sellers of textbooks about JavaScript is JavaScript: The Definitive Guide, which is over 700 pages and covers a wide range of topics about JavaScript in detail. But in terms of the exhaustive knowledge of basic syntax, Learning JavaScript(350 pages) is good enough. It is easier to learn basic syntax with a textbook after you have already done the tutorial than to learn a programming language for the first time.

If you don't have enough time, another way is to refer to the official website of a programming language. The official website has exhaustive information about the syntax of the programming language and therefore is helpful to get exhaustive knowledge of the basic syntax. You should visit the official website and learn the syntax whenever you face a problem and need to investigate its cause. And make this behavior a habit. Visiting the official website repeatedly is better than searching blog posts or Stack Overflow one after another.

Summary

There are no shortcuts to mastering code reading skills. The first step is "good enough to master the exhaustive basic syntax of a programming language". Don't hesitate to learn exhaustive basic syntax with a fundamental textbook. It is also important to make it a habit to visit the official website of a programming language. Exhaustive knowledge of basic syntax gives you better developer experience.


  1. https://survey.stackoverflow.co/2022/#learning-to-code-learn-code-age ↩︎