A
A
Akigami2019-06-04 13:38:13
Programming
Akigami, 2019-06-04 13:38:13

What if you read and translate the code as foreign language?

Maybe this is a stupid question and professionals do just that, it’s just that when you start to study any PL, the emphasis is on books, understanding the theory and trying to repeat, but what if a beginner takes some someone else’s code with comments, throw it, for example, on a reader and in your free time to read it and translate it as foreign language? And devote a lot of time to it.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
sim3x, 2019-06-04
@Akigami

Reading code is one skill
Writing is another
Just reading, without serious concentration, will come down to skimming through the code and going to the next page
Without understanding what happened in the code
Which is not just useless, but very useless
Reading with debugging in head appears after you write the same code many times
many times
But even after that, without concentration, you can skip the nuances

R
Ronald McDonald, 2019-06-04
@Zoominger

Bad idea. No theory anywhere.
On the other hand, the ability to read code will come in handy, but you can’t learn programming in this way, it’s like learning construction from dismantling a house.

V
Vitaly, 2019-06-04
@vt4a2h

This is not a very appropriate comparison, I think. Reading a program is very similar to reading math. model, which is described by some formulas. A program is essentially a formalization of an algorithm or model in PL.
In fact, we can understand what, say, a particular line of code means; it will be much more difficult to understand why she is here and what she describes. Many programs are so complex and multifaceted that it is extremely difficult for one person to understand them in detail. Even if they are well decomposed. In principle, most often this is not required.
The question is: what do you want to achieve by reading the source codes of programs?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question