When I first started my job, an interviewer told me that if you work hard for two years, you can quickly grow from a programmer to an engineer. At the time, I was surprised to find that, according to many job postings, “programmer” means “engineer”, only “engineer” sounds better. As I worked for a long time, I realized that “programmer” and “engineer” are really different — programmers write programs, and engineers write programs that create value in the real world.

Unfortunately, many software developers are not aware of the difference, and even after a long career are considered programmers rather than engineers in the proper sense. So LET me talk about the differences between programmers and engineers, based on my observations and experience.

First, engineers don’t write black-box programs

The famous formula “program = data structure + algorithm” is well known, but unfortunately it does not apply to engineering or real-world programs. There are a lot of programs, data structures and algorithms that are well written, powerful enough, complex enough, but — it’s hard to debug, you can’t stop running, and you don’t really know what’s going on in the program.

Don’t be funny, I’ve seen developers who’ve been around for three, four, or even five, six years still produce black-box applications: the first thing to do when something goes wrong is kill the process and restart it. Of course, there are more fierce, directly with the development machine connected to the production database to debug.

Do you think they’re bad at it? I can handle all kinds of technical problems. You say they don’t have systems awareness? The program is not simple. But what they do is at best a “program,” not an engineered “system.”

What program is not a black box? You need to think about its hierarchy, you need to think about what runtime information must be exposed and logged in what way, you even need to think about the performance impact of those exposures and logged, and what manipulation interfaces the program needs to provide… When you think it all through and write a program that allows the details of the operation to be “under control”, you have one foot in the door of “engineering”.

In this respect, the Internet and software development companies will pay more attention to some, but it is not to say that there is no room for individuals to pursue. You know how to write a crawler, and you know how hard it is to debug if you want to get the data right. I have a friend who wrote a “visual” crawler at a big factory that can quickly locate problems by manipulating statement execution step by step. Engineers of this caliber, who are not available, are still praised every time they speak of it.

Second, engineers pay attention to implementation and interface separation

A classic Java interview question: Describe the difference between an abstract class and an interface. In general, it is understood that “interface” and “implementation” should be separated. Unfortunately, many people understand “Interface” in the narrow sense of a language-specific Interface, without considering what “Interface” really means.

What does an interface really mean? What computers are best at processing is information, which can flow at a high speed without the barriers of reality. If “implementation” is dirty work, “interface” is a window for issuing instructions to do dirty work. It’s enough to do the dirty work once, but there can be millions of Windows for sending instructions.

More specifically, it is the programmer who completes the feature, and it is the engineer who completes the feature and imagines how it will be used and makes it easy for people to use. I’ve seen a number of programs where the login session starts out fine in local memory, but then you have to do a lot of work to switch to a database for easy session transfer, even though all you really need to do is access it. If there is a problem with the data automatically loaded by the program, it cannot be loaded manually at all; Data loaded manually in the past, changed to automatic loading will have to be overhauled……

Interface awareness and the ability to truly distinguish between an interface and an implementation is one of the distinguishing marks between a programmer and an engineer.

Third, engineers focus on the logical connection of functions

Many systems are in the process of constant change and improvement. Programmers see function points and engineers see logic on top of function points.

Any system is, of course, made up of several functions. But above the function points, there needs to be a logical web, so that the function points can be put together, the complexity can be reduced, and the object can be understood. The simplest “login”, including data entry, data verification, login information record and other functions, “login” is the logical collection of these functions, but also the basis for understanding these functions.

Over time, as the business grows, there may be more and more new features, such as user data loading, notification to friends, AD push preparation, and so on. All of these features are easy to implement, of course, but the result of feature stacking is a dramatic increase in complexity because the logical connections between features are cut off. So engineers need to think about how these functions should be combined into logical actions such as “login”. It is through this continuous thinking that the complexity of the system is kept low and easy to understand.

This example looks simple, but it’s not that easy to do. I sometimes read manuals for complex systems that make me laugh or cry: 1) click here; 2) There; 3) Lose this The logical meaning of these operations is so accurate that it should be done automatically at one time. The consequence of separating them greatly increases the complexity of the system, which is not convenient for maintenance and operation. In the end, it’s the developers themselves who have to clean up the mess.

I often reflect on the education I received, writing programs in school, and writing programs at work, there is a little bit the same, but it seems to be completely different, what is the difference, only after experiencing, thinking, so I want to write out what I see and feel. Those of you who are savvy and have the opportunity to be well trained probably don’t need to know this. But for those of you who don’t have such a condition, I hope that this bit of chanting can give you a little help.