Difference in Learning Syntax vs. Coding Logic

It is increasingly common to hear of business and political leaders talk about the importance of coding. However, what do they actually mean by learning to code?

Sequencing, Loops and If/Else Statements are the fundamentals of computer science

Child learning to code with a laptop and mouse

What is syntax: It is equivalent to grammar, punctuation and sentence structure of the English Language

Syntax is the set of rules that define the combinations of symbols in a coding language such as C++, Java or Python. Syntax is the equivalent of grammar, punctuation and sentence structure in the English language.

Syntax is crucial because it provides a standardized frame of interpretation that is consistent to readers. However, unlike you, the reader, who is able to understand what is written within context, computers are much more literal in the way they understand instructions. Thus coding languages have to be extremely structured and highly complex in order for them to be both consistent and unambiguous.

What is coding logic: It is the ideas and thoughts being communicated within a paragraph

Coding logic refers to the ideas and thoughts that run the program. It is similar to content in English. Just as how the same content in a paragraph can be re-written in different languages, an algorithm can be written in a multitude of programming languages.

Coding logic refers to 3 fundamental concepts:

  • Sequence - in what order do we execute the steps

  • Loops - which sections of the codes do we repeat

  • If/Else - if a condition is true, perform action 1 otherwise, perform action 2

Benefits from coding accrue from learning coding logic especially for children

Programming languages change with time. Python, one of the more popular coding languages today was not used 10 years ago. Thus one has to ponder, if we are teaching our children a programming language, what are the odds of it becoming obsolete in the future? The 3 coding logic concepts however, are fundamental in every coding language, and once understood, can never be forgotten.

Coding logic also flexes the mind and develops cognitive and problem solving skills. Just like being able to write a convincing and moving essay, it is the content and ideas within that is crucial, not the nuances of syntax.

As for how younger children can learn coding logic without being bogged down by syntax, we think using a graphical pesudo-code is the ideal option early on. Once a child develops an understanding of coding logic, syntax becomes more accessible and meaningful.

Previous
Previous

Is learning drag and drop coding useless?

Next
Next

Harvard's guide to early childhood development