Different languages need to be mastered

In fact, if you read more, practice more and think more when you are learning a language, you will find that different languages are similar. Programming language is the human control computer instructions, grammar rules and other aspects of nature is similar.

On the other hand, learning a new programming language is not that difficult. The first thing you need to do is to make a distinction. For example, when learning about conditions and loops in Python, remember what other languages’ syntax looks like. For example, can you analyze the complexity of adding strings in Python? Consider the complexity of adding strings in other languages, such as Java. What are the similarities and differences?

In addition to being able to clearly distinguish the differences of language, we also need to be able to connect them and use them flexibly. For example, the most typical “programming language two questions” :

  • Do you know the characteristics of each programming language you’ve studied?
  • Can you choose the right programming language for each product?

For example, one of the advantages of Python is that it is particularly good at data analysis, so it is widely used in artificial intelligence, machine learning and other fields. For example, the TensorFlow framework in machine learning is written in Python. But when it comes to the underlying matrix operations and so on, it still depends on C++, because C++ is faster and more efficient.

In fact, many companies do this, with server-side development based on Python but the underlying infrastructure relying on C++. This is the classic “different languages for different needs.” After all, understand that even a speed difference of a few tens to a few hundred milliseconds is critical for the company and the user experience.

Only language, can step by step

Of course, if Python is the first programming language you learn, don’t worry. As we know, although Python is a bridge for human-computer interaction, its syntax is more concise than C++, Java and other mainstream languages, and it is also more English friendly to the programming world, which is also its significant advantage. In this case, what you need to do is to focus on the Python language, know what to focus on, and learn at a good pace.

According to my years of learning and working experience, I put the programming language learning focus, summed up into the following three steps, no matter whether you have the basis of other languages, can be compared to do, steadily advance.

Step 1: The foundation of the building, practice

The scope of any programming language is quite broad, from basic variable assignment and conditional loops to concurrent programming, Web development, and so on. I don’t think there is any book on the market that can cover it all.

So, I suggest you get more hands-on when you have the necessary basics. Don’t wait until you have learned everything in the textbook to start, because then you will find that the front of the hard to remember a bunch of things seem to have forgotten. Computer science is a very practical discipline, so the more the morning hand practice, practice more and more often, the better.

But what exactly is a necessary foundation? In Python’s case, if you can understand assignment between variables, basic data types, conditions and loops, and functions, then you’ve reached the baseline for step 1 and should start practicing more after class.

For example, you can program a simple calculator yourself, which is probably the first small project that most programmers work on. After the user enters a number and an operator, can your program check whether the input is valid and return the correct result?

Step 2: Code specification, essential

Sure, learning to program is about being fast and efficient. At the same time, however, be sure not to overlook the necessary programming specifications for each language. When you start your own coding exercise, you don’t have to write unit tests, but you can’t write hundreds of lines of code without a single function, but start from the beginning to the end, right? You can leave out some unnecessary comments, but you can’t put many lines of code on one line, right?

Step 3: Develop experience and make a qualitative breakthrough

To truly master Python, or any other programming language, experience with medium to large products is essential. Because experience is what makes you stand higher and see farther.

For example, we use search engines every day, but what do you know about a server-side implementation of a search engine? This is a typical object oriented design, where you need to define a set of related classes and functions that are considered in terms of product requirements, code complexity, efficiency, readability, etc., as well as optimizations once you go live.