C
C
CodingStub2021-02-21 19:05:05
IT education
CodingStub, 2021-02-21 19:05:05

How to understand the program, and write your own code?

All textbooks and tutorials on PL talk about the basics of programming. And the examples use classic code. But, why exactly is it necessary to write like that, and nothing else. And how it is possible to implement the task in a different way, no one tells. Therefore, apart from repeating the "foreign" code, it is impossible to do something of your own.

What is the most effective way to get out of this framework, and learn how to write your own code?

I hope for understanding the problem, and the most useful answers! Thanks to all!

Answer the question

In order to leave comments, you need to log in

8 answer(s)
D
Dr. Bacon, 2021-02-21
@bacon

In order to "get out of this framework", you must first learn to understand these frameworks.

O
Oleg Smirnov, 2021-02-21
@sovaz1997

To learn how to write code, you have to write code. Yes, even if you can’t just take and solve a problem, even if its solution is not visible.

R
rPman, 2021-02-21
@rPman

What is the most effective way to get out of this framework, and learn how to write your own code?
Solve problems not through the use of ready-made solutions, but also not to go to extremes. It's perfectly normal not to parse video files at a low level, just learn how to use ffmpg.
Another important point is the correct choice of tasks.
The task should not be too difficult - otherwise failure will discourage the desire to learn.
The task should not be meaningless - find some simple task that you do with your hands all the time, rename the files, delete extra commas in Excel manually, ... it seems that simple tasks are easy with your hands, but there will be benefits from automation.
Choose convenient and pleasant to useit is the tool for you, and not what I advise those around you. At one time, everyone said - take bash, a cool scripting language, mega-cool, mega-convenient ... yeah, but for some reason, writing general-purpose scripts in php turns out to be much more convenient for me , and more readable than abracadabra.
You need to understand that you won’t become a great programmer in a day, and you won’t succeed in a month, and in a year too, although in a year, with due diligence, you can reach quite a noticeable salary.

U
Uno, 2021-02-21
@Noizefan

just like an engineer, if he doesn’t think with his head, he won’t come up with anything new.
Develop your head and think about how to use standard tools in non-standard conditions for you

E
evgeniy_lm, 2021-02-21
@evgeniy_lm

1. Programming is not writing code, but solving the problem of the customer / employer. Nobody needs your "unique code" if it is not able to save time / money
2. Any task can be divided into 100-1000 smaller ones, usually standard ones, well described theoretically for a long time, for which an optimized code has already been created. Question - why reinvent the wheel?
3. There are a huge number of standard problems that do not have an optimal solution, such as finding prime numbers. But this is no longer a matter of coding. So if you find a better solution to any issue, honor and praise to you. Well, writing code is a trifle.

S
Sergey Karbivnichy, 2021-02-21
@hottabxp

Want a book like "500 Spellings of Hello World"? Well, read it - then what? You will know 500 options for displaying a string. And what's the point of this? That's right, none.

All textbooks and tutorials on PL talk about the basics of programming.
Well, in language textbooks, they just don’t teach programming as such, they basically have the syntax of a particular language, its device, its libraries, etc.

A
Alexander, 2021-02-22
@Aleksandr-JS-Developer

How to understand the program, and write your own code?

Program code is just a command for the computer to execute. You need to:
understand the task, the goal
It is impossible to write a program without understanding what it should do and why.
build a solution algorithm to
make a sequence of primitive actions leading to the desired result.
All programs are built according to algorithms. Even the super-duper graphics of modern games are described by dozens, sometimes millions of sequential primitive actions, long known from the same books on PL.
finally, write the implementation of the algorithm
here, finally, write the code. This is the fastest stage of software development.
You cannot start right away from this point, otherwise what are you doing? What for?..
In general, it is worth understanding that all problems, tasks have long been solved for you. A lot of people have spent a lot of time researching and deriving optimal algorithms. But these solutions are quite small and do not completely close the problem. Your task, as a programmer, is to evaluate the task, decide which of the ready-made solutions to use and in what sequence. And correctly configure the interaction between these ready-made solutions.
If you solve each problem "again" (this is called "reinventing the wheel"), then you will become a very disadvantageous employee for the company. This is called "progress". Programming without it will just freeze in place.

F
Fenrir89, 2021-02-22
@Fenrir89

Start with algorithmization, then the syntax of the language, then aspects of typing, non-typing of variables in the language, you can start writing your code stumbling over errors generated during compilation and code execution glitches, this is how the Zen of programming is known, and to questions why this is so, and not otherwise, you can be you will come in 10 years when you begin to understand the entire architecture of the OS or the nuances of the interpreter that this code executes, maybe never envy most often not from you, everything changes too quickly in this kingdom, especially on the web

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question