Home > headlines > body text

I just realized today: learning to program and learning a programming language are two different things

PHPz
Release: 2020-09-08 15:18:58
Original
4546 people have browsed it

Most programmers and beginners think that they are learning programming. In fact, they are not, but they are taking a detour.

You may be learning a programming language, not programming itself

Computer science is not about learning computers. Shockingly. Rather, it is about solving problems automatically with the help of computers. Solving problems is computer science, not writing code. This is why many computer science students don't seem to understand why they study algorithms and mathematics.

If you’ve taken a computer science class before, this won’t surprise you. Because you will notice that programming has very little to do with programming languages. Think about why pseudocode is so common in these courses.

But most programmers always fall into the trap. We learned programming languages ​​for more than ten years before we realized that what we really needed to learn was programming, and I was the victim.

I have spent more than ten years learning various programming languages. The more programming languages ​​I learned, the harder it became to build simple things and I felt like I couldn't find the right tools. But the problem is, when I don't know where to start, I forget to explore what to do instead of looking for the right tools.

The strange thing about programming languages ​​is that they are always changing. Programming languages ​​change almost every day, and keeping up is very difficult. And most good programs use only a small part of the programming language.

The problem with prioritizing learning a programming language is like learning how to use a woodworking saw, hammer, and various cutting machines before learning carpentry. Carpenters need to pay attention to: ideas, feasibility analysis, measurement, testing, and user habits. Old carpenters pay more attention to these. Instead of hammers and nails.

During the scientific study of the work, he will also spend time checking the quality of nails, stains, wood, etc.

What is the difference between learning programming and learning a programming language?

"Programming" Make the system run automatically by giving an instruction. We do it every day, we teach it to our kids, our soldiers, our customers. We give or receive instructions to act freely or independently in a prescribed manner. Your parents don't need to follow you around and guide you every step of the way; they have already given you guidance (instruction) in many areas of your life before.

Most schools and educational websites teach the syntax of programming languages. They also add some design patterns (and you may have just missed what design patterns are), some math, how to declare variables and how to use them, data types and how to declare and create them.

The knowledge of programming languages ​​mentioned above will not teach you programming. When you find out, you will feel that learning programming is a waste of time, a lot of time.

We use programming to solve problems, and programming languages ​​are tools that help us solve problems.

They are like toolboxes, we call them frameworks. They can make your thoughts more organized.

If you are learning programming but still cannot design and write an actual application, it means that you have to spend more time learning programming rather than programming languages.

We meet many people who still don’t know how to design a program.

For programmers, a program is a problem that needs to be solved. Before involving any programming language, you need to think carefully and understand the problem first. You can actually code in any programming language no matter what problem you want to solve (the important thing is to think about the problem you want to solve).

Let’s take calculating squares as an example. Calculates the square of a number, multiplying itself multiple times. We can implement it in multiple languages, for example:

Using C language

function square(int * x) {
    return x * x;
}
Copy after login

Using PHP

function square ($x){
    return $x * $x;
}
Copy after login

Learning recommendation: php programming introductory video tutorial

Using JavaScript

function square(x){
    return x * x
}
Copy after login

Learning recommendation: javascript Video tutorial

Using Scheme (a Lisp dialect)

(define (square x) (* x x))
Copy after login

You will notice that the syntax only determines the specific implementation, not the solution to the problem The method is the same. This is one of the main reasons why you can build any kind of software in almost any language you care to use.

It is easier to understand a language through programming

Human language is a problem because human language is full of limitations and errors, so machines cannot directly understand it.

When you learn to program, you will learn new terminology and new tools to write logic so that computers or other programmers can also understand and agree on it.

Typically, you will start with a simple, human-like language called pseudocode. It is a great transition tool from human languages ​​to computer programming languages ​​and is done to prevent you from wasting time on programming languages.

In this way, you can completely focus on the problem itself and the logic of the solution. Through this process, you will discover the core parts of a good programming tool (language), and you will know what is important and what you need (if you need to use a hammer to smash things, learn to smash things first, and hammer nails temporarily) If you don’t need it, don’t learn it first).

In this way, you will learn a programming language without knowing it (completely master the use of the hammer)

Translation original text: Learning programming is different from learning a programming language: https://phpocean.com/blog/article/learning-programming-is-different-from-learning-a-programming-language/80

【Related article】

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!