Why People Often Give Up At Learning To Code
One small step for me, One giant leap for the future
Learn the concept first
If you understand the concept of programming, you can learn any language at lightning speed.
If you had the experience of learning by following some online tutorials, you must have had this overwhelmed feeling from reading the first a few pages. All these meaningless instructions along with many oddly structured sentences just makes people want to give up after a few hours into the article.
Not if you learn them in the correct approach :)
I don’t encourage people to begin their learning process by remembering the syntax, the keywords and the use case without knowing “why” they even exist. It is rather the concept we first need to understand. Everything we are about to learn was created and designed by people, and there are reasons why they are structured in a certain way and named as such keywords.
Our journey begins here
Firstly, let us remember that computers work on instructions.
To get computers performing tasks for us, we need to instruct the computer to do so. We write these instructions down so that computers can read them and perform the tasks we want them to do.
These instructions are written in different languages based on different types of work and field of industries. Like we mentioned, web builders will use HTML and PHP while mobile app builders will use Objective-C, etc.
We write these instructions and save them as a group of files so that we can use them again without having to retype them. We then differentiate these files from ones written in other languages based on their file extensions.
For example:
If we are working on a statistical project which uses Python language (bear with me, I know we don’t know what Python is. Just think of it as a name of the language, like “English”) to instruct the computer to analyze a group of data, we will name our files with extension “py”, like “Analyze.py”. Computers will then know to run these instructions according to Python guidelines.
These guidelines are enforced by what we called “interpreters”, because we need someone to help computers understand our instructions.
They enforce the writer (human) to follow certain writing formats (syntax) while on the other hand, helping translate the instructions into something computer understands.
While some interpreters are built into the systems (Windows, Linux, mac OS) we use, most often, we need to install these interpreters before we start writing instructions.
Instructions are ran one at a time, from top to bottom
Computers read instructions one at a time.
While similar to humans, separating each sentence with periods “.”, computers also have delimiters that help separate each instruction too.
Most languages use “;” (semicolon) to determine the end of an instruction with some exceptions such as Python which uses line breaks(meaning start a new line for new instructions).
Since we know a file is a group of one or many instructions, and they are processed one at a time with semicolons marking the end of each instruction. They are also processed sequentially from the top of the file to the bottom in most cases.
There are options(commands) to instruct a computer to jump to a certain line of instruction, but it is not recommended for good programming practice. Therefore, let’s think that computers will read a group of instructions from a file, and run them sequentially.
What’s next
In the next chapter we will begin learning each instruction, the concepts behind them and real life use cases.
Articles are updated every Wednesday, please stay tuned.