Original:15 programming career, 7 lessons from a senior architect
Foreword: This is an article that should be written by Infoq, starting on the Infoq public number.
You can take a look at the INFOQ website and the public number, which is a great community with a lot of depth.
I have communicated with a lot of people an interesting phenomenon, that is, just graduated to 30 years of age, will feel the time is very slow, always feel very young, but once the 30-year-old, time is like fleeting, year after year flies.
I myself also, eyes look at graduation nearly 15 years, 15 years from a fresh graduate of the rookie, to grow into a technical backbone, to achieve the position of the architect, look back, listen to relatives of a word, mistakenly into the computer industry, it seems to have not gone wrong, programming although boring hard, but if really interested, you can experience the fun of it , and get a handsome return.
1
Curiosity
Liu Cixin in the "Chishida" depicts such a plot: on the ancient African continent, there is an original person inadvertently looked up at the stars, staring at a little longer, more than the threshold of the alien set, immediately sounded the human imminent emergence of civilization alert. Because aliens believe that human beings have produced a curiosity about the universe, the emergence of civilization, the development of science and technology is just a matter of a moment.
Indeed, Curiosity drives humanity forward, landing on the moon in just thousands of years (relative to the primitive age of hundreds of thousands of years) and striving to expand to other planets.
For programmers, too, if you see new technology, new products do not like children to see new toys as the two eyes shining, do not want to hurry up on their own computer to play on the impulse, you need to carefully consider whether it is really interested in software development? If there is no interest at all, do not waste time, or early career change, there are more former (money) career waiting for you.
Without curiosity, we are unwilling to trace the essence of technology.
No curiosity, it is difficult to calm down, resistant to loneliness, away from the impetuous and code struggle, more difficult to cross this bitter industry brought about the challenges, go to the architect this position.
Without curiosity, not willing to learn new technology, an architect, if not sensitive to technology and forward-looking, has been holding a set of technical structure unchanged, estimated to be eliminated soon.
Of course, the strong self-control, except, but then back, by self-control to make oneself do not like things, not very painful?
I was in the company of a training class on leader, the teacher has been talking about Passion (passion), passion,passion, but I always feel no curiosity, no interest, how can produce Passion?
So, curiosity/interest in technology is the foundation of everything.
2
Form the way of thinking of computer
Before the "code Nong turn over" public number sent an article, called "Learn to program, rather than learn Java" said is to be able to think in a computer way.
Now the computer is still very "retarded", you can not say: "Computer, I want to create a Java like ArrayList similar class, there is a get, add, remove method, and this ArrayList capacity is not fixed, can self-growth, quickly write to me!" 』
The computer of course can't write now.
Instead, you can use a very, very low-level computer language to tell it to do things in a computer-understandable way: Create a class, assign a fixed-size array to hold the data, and use a number (size) to record how much data is stored in the array. If the array is full, you need to enlarge the array and copy the data from the old array to the new array.
There are lots and lots of annoying details that you need to deal with, and you'll make mistakes when you're not careful---computer programming is like this.
It is the basic skill of the programmer to develop the computer's thinking mode and to translate the requirement of human language into computer language smoothly.
Many people can grammar, but also understand the framework, but the basic skills are not cross-border, can only be in the junior programmer stepping.
This basic training is the data structure and algorithm, my experience is to do more exercise (I put the data structure after the problem in the University), let this thinking in the brain curing, later programming can be handy.
3
Solid Foundation, Mastery
I took part in a bit of open source software development a long time ago, was fortunate to see an old programmer's resume, let me be shocked that he unexpectedly in Altair This earliest computer creates Macintosh program.
Yes, Altair is that even the display and keyboard are not, by the toggle switch to enter, by the light to output the so-called "personal computer", Bill Gates and Paul Allen on the above wrote a Baisc interpreter, from now on Microsoft Road.
If I had the experience of programming on such a machine, I'm sure these old programmers would understand the hardware, the drivers, the operating system, the application software far more than we are now.
I have to write the article encountered a problem: a process to read the file, at the bottom of the use of DMA, DMA completion of the file read by interrupt to let the CPU to process, but the CPU and interrupt handler at all do not know the ID of the process, how it went and associated, how to wake up the waiting process? This question makes me realize that I have not integrated the foundation of the computer.
We have learned the principles of computer composition, operating system, compiling principles, computer networks, databases, assembly language, can you integrate these knowledge, open the two veins, in our minds to establish a computer computing picture?
By integrating this knowledge, I believe I can surpass most programmers.
Now the level of software development packaging is very high, as long as you learn Java can do a programming work, as you do more and more deep, more and more specialized, these basic problems will emerge.
More importantly, the basic idea of computer hardware and software in the past few decades in fact, such as caching, increase the abstraction layer, such as the basic idea of armed, to learn new things not only learn fast, understanding will be more thorough.
4
to understand the nature of a technology in a thorough way
As an example of ant, most people learn ant just to learn how to use it, and realize that Ant provides a lot of built-in tasks to help us make automated builds, such as commands, easy to do.
<copytodir= ". /backup/dir ">
<filesetdir= "Src_dir"/>
<filterset>
<filtertoken= "TITLE" value= "FooBar"/>
</filterset>
</copy>
Few people think about why Ant's task is described in XML. Why doesn't ant provide a set of Java class libraries/api for programmers to use, so it's not more natural?
One of the important reasons for this is that XML can customize the label, so the expression force is unmatched; If you use Java, its syntax does not allow you to customize a keyword like copy, Fileset, can only define some classes to emulate these copy, Fileset, it is not so simple and clear, Don't believe you try.
Ant's important revelation to us is that XML is a great way to extend the language by describing tasks. But the problem with ant is that the programmer needs to handle too much detail, specify the source code path, specify the path to the compiled file, specify the path to the resource file, specify the desired jar package and its location, and it's annoying.
So Maven came out with the "Convention better than the configuration" approach to solve the ant problem.
Understanding the nature of technology can be comprehend by analogy and fast, which is especially important in the software industry, where technology updates quickly.
Just learn to use is not possible, not only to know how, but also to know why.
To stop and think is the essence of progress.
5
to be able to write beautiful code.
Architects are not high up, out of code deeds. The architect is first and foremost a good programmer to be able to write the core functions of a project or product, ready to roll up the sleeves to solve problems in the project.
The code is not beautiful how to get the shot? How can you convincing?
The so-called beautiful code is not only clear, easy to understand, elegant, but also to achieve functionality, no bugs or very few bugs.
In fact, if the code is simple and elegant, generally no problem.
Writing beautiful code is not easy, requires clear thinking, good programming fundamentals, excellent abstraction, and proficiency in a language.
6
the ability to abstract
The ability to think abstractly can never be overemphasized.
The demands of reality are complex, and if architects are not able to abstract these chaotic requirements into some "concepts" and think at the conceptual level, the system simply cannot be designed.
But after the concept of abstraction is not enough, but also to see whether the concept is orthogonal, can independently change, if not, consider the new concept of abstraction.
"Orthogonal" is a linear independent, very important, like a point (x, y), changes in the x-axis will not affect the y,y axis changes will not affect X, which is orthogonal.
"Orthogonal" power is huge, (x, y) can express all the points of the two-dimensional plane, if you add a Z axis, not only can express all the points in three-dimensional space, and each axis can be independently changed.
If the orthogonal design can be made, the development and maintenance of the system will be very comfortable, thought can be assured that the bold modification of one aspect will not affect the other.
The "Discovery of change and package change", which has been emphasized in design patterns, is what this means.
The training of abstract ability is not a shortcut, is the accumulation of experience, diligent thinking and learning. For example: A programmer who learns Android can think about how Android is abstracted from unknown, complex applications. Why are there four components of activity, Service, Broadcastreceiver, ContentProvider?
In-depth reading: "Abstraction, the ability of programmers"
7
Technical Leadership
One of the important lessons I learned at IBM was to use the influence of technology on leaders, not on authority and position.
In other words, plain English is to be able to get the technician to serve you. With technical influence, the voice you make in the team will be heard and respected.
But the influence is not built quickly, it is a long process: you solve a technical problem, your proposal is proved feasible ....
This kind of thing will accumulate your image in other people's mind, build your personal brand, and eventually everyone will put a tag on you: Daniel.
Public Number: Code Nong turn over the "code Nong" public number was created by a former IBM architect working for 15 years, sharing programming and workplace lessons.
"Reprint" 15 of programming career, Senior architect summary of 7 experience