General question for Guru in programming)

How do you guys understand the processing of the code?How do u understand what is going to be processed by a computer and what is not?And how did you evolve it in yourself?:sweat_smile:

Hey @Marryrr, this is deep question :slight_smile:

The key to understanding how it all works lays in 2 terms process and tree.


Particularly, at the beginning you can think of everything in your computer as processes and all these processes are organized in a form of a tree, meaning that there are a root process (that would be OS) and it has child processes and child processes have their children and so on. Every program running on a computer will always be a process in that tree, including your code.

So consider a game, it’s a running process that waits (listens) for user input from keyboard, mouse or joystick. Every press of a button on input device is called command. Now what if you write commands in a file, so computer doesn’t need to be bored between your inputs and very quickly run all commands one by one. We can do that and these files are called scripts, the syntax of contents of the file called scripting language and JavaScript is one of those scripting languages created specifically for one process - browser. So to recap, browser is your game and JavaScript is a sequence of commands in that game.

Now, as in any game, different sequences of commands do different things, there are certain rules or guidelines, like pressing X Y A B on joystick will result in Falality and so on… In computing, we call these guidelines - API.

I think this is enough for a start. Just always remember about trees in your computer and it will slowly bring you to more understanding.

1 Like

Actually I studied Discrete Math and Basics of High math before IT classes, and trees too)but I could not understand what is the purpose of it for programming)Need to find logic sequences in all the processes to perceive them)Ok,gonna read these pages,thank you for your reply:smiley:

note I provide JavaScript specific documentation for most concepts, as it has some of the most accessible documentation out there as its the language of the web. The concepts are available in almost all other languages, but I’ll stick with JS for this post :slight_smile:


Code is nothing more than a set of readable instructions that you give a machine.

Code itself is just a bunch of words that mean something to the machine based on a set of rules. (the language syntax)

There is a a thing called a Turing machine which is an abstract machine that manipulates a set of symbols on a strip of table defined by a set of roles. The machine is simple, but it is powerful enough to simulate any algorithm. Programming is nothing more complex than that at its core.

The difficulty can arise from the set of roles, or the language syntax. Once you understand the “rules of the game” (the syntax) for any programming language gets you to a point where you can understand the code, permitting you understand the underlying concept.

Stuff like logical operators, boolean logic, control flow all existing at some level for every language.

The best way to learn the language syntax is to read about it, and practice with it. I’d consider it like getting the most complex board game ever, and having to read the instructions every few seconds. After a while more and more of it sticks and eventually you start to be able to play the game easier without reading the instructions. This doesn’t mean you will be any good at the game, as that’s the next step to learning, but knowing how to play is a core part of that.

In the same regard, if you don’t know what a given piece of code does, read about it, understand it, digest it, and repeat it to learn it. Once you understand the syntax, you will start to understand part of the code. Understanding what the code represents is the “getting good at the game part”, as stuff like algorithms, and data structures are concepts that should be understood within the game, that aren’t necessarily rules, but patterns and concepts.

Finally I want to point out that its ok to not be able to understand something initially, the main skill to learn is the skill to learn haha. What I mean is, you just need to be able to take things slow and learn what you can over time. You don’t learn how to programming/code overnight, it takes time effort and a lot of Googling. The key is focusing on the learning part as everything builds on each other.

Good luck and keep learning :smile:

PS. The term Guru could be mis-leading, as you don’t need to be some kind of god programmer to be a good programmer. You don’t need to be super smart, or some kind of genius to be good, you just need time, grit and an internet connection. There’s just so much to learn out there, and so many resources anyone with the grit to stick with learning, the time to devote to learning and the internet connection to enable such learning can be a good programmer :smile:

1 Like