Answer the question
In order to leave comments, you need to log in
Do I understand the essence of programming correctly?
I am a beginner who studies programming by comparative study of programming languages used in the subject area that interests me - Web dev. I do this in order to learn several languages, and more specifically, their common functional properties, elements and coding techniques, by creating the same programs with them, in order to feel confident before trying to build a career in the subject area.
I want to know if I understand the process itself correctly, the very essence of programming, and this is how I see it:
Programming is the ability to encode algorithms intended for execution by a processor in a language whose syntax, after the stages of translation of character masks into a sequence of electrical signals, is intended to be understood by the processor. As a result of encoding the algorithm/s, a computer program is obtained. Algorithms must correctly use data types and structures, in accordance with how they are encoded in memory and interpreted by the processor.
The data interpretation format and their encoding in memory, as well as the list of instructions that the processor is capable of executing, are predetermined by the CPU manufacturer and described in the Instruction Set Architecture of the processor?
Here's another question: does ISA determine how data is encoded in memory, or does it only determine how this data is interpreted by the processor? If ISA doesn't define data encoding, then what does?
Here is another exciting question: if programming began with the painful direct introduction of sequences of binary electrical signals into a machine for interpretation, then how was the first interpreter of a text program created?
Answer the question
In order to leave comments, you need to log in
No, you all misunderstand. Think about what waters -> You can program without a PC and without a processor, and without involving technology at all. This does not change the essence of programming. And you have solid "processors" in your definition.
Roughly speaking, Programming is the process of writing logical instructions, more oriented for transparent and clear understanding by other people.
And you ... It seems that you are a copywriter and write an article on a topic that you do not understand at all. From the abundance of beautiful words, the statement does not become smarter.
You are definitely not in "web-dev" ..
Ps climbed too low. We are all in abstractions :D
The data interpretation format and their encoding in memory, as well as the list of instructions that the processor is capable of executing, are predetermined by the CPU manufacturer and described in the Instruction Set Architecture of the processor?
Yes, you understand correctly. Processor manufacturers, of course, are trying to standardize their architectures, but both AMD and Intel still have nuances (if we consider only PCs).
An example of documentation from Intel: https://software.intel.com/en-us/articles/intel-sdm
In general, for a PC (specifically for a PC), there is a certain x86 standard, as well as its x86-64 extension . It is he who describes the set of instructions, flags and data cells (registers) available to the programmer.
Within this standard, each instruction has its own opcode .
Those. after compiling the program into machine code (binary sequence), the command opcodes will be the same for all x86-compatible processors (i.e., compilation is not for a separate processor, but for the architecture, and there are many architectures themselves, x86, ARM, etc. ).
This makes it possible to run programs with the same result on both Intel and AMD processors.
If we consider only the coding process itself, then something like this is.
But now the term "programming" means something more than a simple set of instructions from the keyboard.
Programming is an applied science. Without a subject area, programming does not exist in principle.
And it is the subject area that often determines what the language and infrastructure will be like.
The programmer is required not only to hammer in the algorithm and compile the source code, but often this algorithm must first be invented / combined. Without knowledge of the subject area, this will again not work, or it will work, but ineffectively.You are definitely not in "web-dev" ..
Ps climbed too low. We are all in abstractions :D
Such comments should not be taken seriously. In web development, tasks often pop up that require knowledge of how the machine works at a low level.
This may be a need to write your own module for PHP, Python, JavaScript (Node.js), or to implement a programming interface to external applications / systems.
Unfortunately, such tasks are not covered by programmers of another specialty, for example, system engineers - because they tend to write very low-level stuff: device drivers, OS kernel modules, and so on. therefore, it is highly desirable for web developers to be able to do this.
In 90% of tasks, of course, this is not necessary (especially where you need to "pull the layout on the engine" =D), but if you want to grow as a professional and cover the entire range of possible tasks on the web, then this, as they say, is a must have.
Eee... Are you sure you're in webdev? The questions are not at all web-based, but more typical of machine gunners - developers of industrial automation devices :) Between the web man and the Instruction Set there are several levels of architecture that it makes no sense for him to go down to.
The first text program interpreter was a punch card reader - I also found one in 1992 :) One program line - one card. That is why in the past program strings were called "maps".
Programming is the ability to encode algorithms intended for execution by a processor in a language
The main task in programming (and not only) is to make simple things out of complex ones.
1. "Programming - the ability to encode algorithms intended for execution by the processor"
Not really. Now very little is written manually for the processor, even in system programming. Mostly they write in high-level languages, and for processor execution there is a compiler that does this.
> in a language whose syntax, after the stages of translation of character masks into a sequence of electrical signals, is intended to be understood by the processor.
Ultimately, almost yes, but you need to remember that a modern computer does not live by a single processor. So is a programmer - now there are few who are seriously involved in the processor - with the exception of those who develop it and who write compilers / drivers / operating systems for it. The rest use ready-made libraries, BIOS and OS functions.
3. As a result of encoding the algorithm/s, a computer program is obtained.
Developing algorithms to execute a computer is a program. Prosot does not need to go down to the processor level - this is already a special case, not a general one.
4. In algorithms, it is necessary to correctly use data types and structures, in accordance with how they are encoded in memory and interpreted by the processor.
Nothing in memory is encoded or interpreted by the processor. The processor works with very simple structures - byte, word, double word. Everything else is high-level abstraction. Once again - do not get into the jungle of the processor yet, if you have such a mess
5. The format of data interpretation and their encoding in memory, as well as the list of commands that the processor is capable of executing, are predetermined by the CPU manufacturer and described in the Instruction Set Architecture of the processor?
Yes. One of the reasons why they write in high-level languages is cross-platform, when there are different compilers for different platforms (CPUs), and the same source code can be compiled for each CPU / OS
6. Here's another question: does ISA determine how data is encoded in memory, or does it only determine how this data is interpreted by the processor? If ISA doesn't define data encoding, then what does?
The data is not encoded or interpreted. The data is simply stored. It is your program that decides what and how to do with the data. If you want to make an array in assembler, you create an algorithm that works with arrays. For high-level languages, there are already ready-made functions.
7. Here is another exciting question: if programming began with the painful direct introduction of sequences of binary electrical signals into the machine for interpretation, then how was the first first interpreter of a text program created?
Even on Wikipedia, you can read the history of programming languages. Read about C, about B.
The first interpreters were so simple that one person could write them in machine code in a reasonable amount of time.
Actually, you can write a simple compiler in a day, in which there will be a minimum of checks (and high requirements for the code).
data is interpreted by the processorThe processor processes the incoming bytes on the bus ( machine code ). And the interpretation is:
Programs in interpreted languages (such as BASIC or Python) are not translated into machine code; instead, they are either executed directly by the language interpreter or translated into pseudocode (bytecode). However, the interpreters of these languages (which themselves can be thought of as processors) are generally represented in machine code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question