Road Rage [rpm] Efficient programmers

Disclaimer: This article is a blogger original article, follow the CC 4.0 by-sa copyright agreement, reproduced, please attach the original source link and this statement. This link: https://blog.csdn.net/dc_726/article/details/474277
 
Knew it has been working for six years, I recall vividly the first day of practice scene, reminding us of scenes yesterday. Six years have been enough to make many people turn management, product transfer, turn test, career change, it must be people who still adhere to the code, because love. Encountered all kinds of managers, architects, operation and maintenance, performance engineers, and so on, or that writing code is the most powerful! Here to share some years of personal experience to attend these. It may not apply to other people, but for me they are the most precious "treasure." Commemoration also spent code heap youth ~ to see the harvest of these bits and pieces, all will feel the passing of time and the sway of sweat is worth it.

1. Start: handy tool

Almighty IDE 1.1

About IDE, currently I'm using Intellj IDEA and Sublime Text to deal with the development of various languages.
Beginner MyEclipse Java had been used in college, then it is natural early career transition to a more flexible Eclipse. But two years ago through constant trial and then discard the trial, finally I managed to join the Eclipse from the Intellij IDEA camp. After that it got out of hand, not only heavy use Intellij, but also briefly tried the JetBrains its various products, Phpstorm, Pycharm, RubyMine including the latest Clion. Google also choose Intellij as the basis of its Android Studio. As a Java developer, of course, the most favorite or Intellij, degree of intelligence is too shocked! It is strongly recommended to students still waiting to see the official website of view about the small moving map presentation of its various operations.
It seems very easy, Intellj IDEA became my choice for Java developers. However, for other languages, especially C / C ++ but could not find a suitable IDE. From Vim + to create a variety of plug-ins to Visual Studio IDE to Emacs and CodeBlocks, has not to my satisfaction, until met Sublime Text. Now it is not only my outside Java IDE in addition to all languages, tools and code libraries or write my blog, at the back of the 3.2 Codebase one you will see. See "Sublime Text 3 under C / C ++ development environment to build" .

1.2 UML and design

UML in the field a lot of good software, such as Rose, EA, mostly commercial paid software. In the free open source software, StarUML quite good, version 2.0 compared to 1.0 made a lot of improvement, especially in the overall appearance of pretty much. With Visio and Power Designer and other design than to add UML, such as business lane diagrams, flowcharts, topology, ER diagrams, etc., almost to meet most daily needs.

1.3 Shell

Daily work will inevitably have to use the Unix / Linux command, or directly to a remote server to perform some operations. On Windows emulation Unix / Linux command course, to use Cygwin, those practical use of Unix commands on Windows can greatly enhance efficiency, especially when you often need to deal with text. The general SSH client to use SSH Secure Shell or XShell, the former is relatively simple, but the latter more powerful file transfer capabilities have to install additional software XFtp.
Of course, if the direct personal desktop use Linux to do it better and better, develop on Linux and on Windows is not only a tool for more easily, is simply upheaval in the way of thinking! See "Linux Mint 17 one week experience" .

1.4 virtual environment

VirtualBox is a good small and fast virtual machine software, VMWare perhaps more powerful, but a little too heavy. Install some commonly used operating systems and software, and test environment and test data using VirtualBox, and then made repeated snapshot reserved for future use, you can avoid a lot of trouble to make the environment. And in the virtual machine how frustrating all right, reducing the risks of using physical machines. In this regard, the current rising star Docker it should be for the benefit of the majority of developers. Because it has not been studied does not comment on the first.

2. Acceleration: simple and effective methodology

2.1 hands before first thought

As a programmer, after get the task had to be immediately encoded impulse is normal, but in order to reduce detours, we have to restrain the impulse. Development of large projects and products to large and small to implement an algorithm, ultimately leading design and thinking. Large projects to do high-level architecture design, to identify in advance those "pit", can effectively reduce the risk, avoid rework. Small algorithm to prove its accuracy, avoid some of the loopholes in logical thinking. The correctness of a piece of code, see "The road Pragmatic Programmer - (1) basis (under): correctness proof" .
Thinking about the degree of control have a "degree", or to "over-design" problems may occur. The "degree" find it hard to grasp, only by time and experience to continuously train intuition and judgment, learned a little bit after what design should put now doing very time-consuming assessment, which designs now do not bother but if not later change it is very time-consuming.

2.2 concise code

When it comes to spare and clean, I would have to mention some of the classic books huge impact on me. Starting at the university the "Code Complete" (Code Complete, the idea of ​​listening to this translation really thought it was an encyclopedia of various codes), was fortunate enough to be able to see the book before the formal entry, it makes me less take a lot of detours, and even develop some code "over the top", and sometimes even from one class names have to think a long time, but time proved all worthwhile.
And later he saw the "Clean Code", not only about the skills in all aspects of the code simple, concise code will write to rise to the height of the occupation declaration. For details, see "Code tidy way" the study notes .
"Clean Code" in the end of the passage impressive, unforgettable:
"In 2005, Elisabeth gave me a green wristband that says the word Test Obsessed obsessed test, I am pleased on the Strip. I found myself unable to remove the wristbands, wristbands not only because of very tight, but it is also mentally the magic spell. that wristband is my work ethic announcement, but also my commitment to do what we can write the best code tips when writing code, I use it Piaojian peripheral vision. it has reminded me that I had to write clean code that commitment. "

2.3 reconstruction

Although there is no in-depth personal contact with agile development, but subtle or come into contact with a lot of good ideas and agile development methods, such as going to say reconstruction.
There are a lot of reconstruction techniques, we may unknowingly already used the. From the simplest to rename, member variables to extract, to extract the class inheritance hierarchy moves up and down and so on. MF book, "Refactoring: Improving the Design of Existing Code" Hou Jie translation coupled with a very classic! Here again strongly recommended Intellij IDEA, because it refactorings is too strong, you can save a lot of time, greatly enhance the efficiency of our development.

2.4 Unit testing and TDD

Test-driven development (TDD) methods and techniques is actually very simple, but many of the attendant benefits. One can start to realize very complex function easiest function, and then gradually improve; the second is with unit testing, code can be found in the corresponding problem directly through the failure of use cases; third is to continue to iterate through TDD code, design more reasonable, post easier to maintain. Any technology inevitably has two sides, TDD is no exception, see "TDD practice sentiment" .
For other tests, such as integration testing using Selenium can also test automation. Recorded test script can automatically play, mouse and keyboard as "no automatic pilot" the same.

2.5 Continuous Integration

Continuous Integration (CI) project known as the heartbeat. Make good use of it, not only can we develop a common approach, integrated on a variety of useful plug-ins, such as JCoverage, FindBugs, CheckStyle deployment scripts and a variety of packaging, can effectively improve code quality and speed of development and testing. CI with the UAT environment allows customers to see as soon as possible whether the current product is the way they want to avoid more bad modify more to the latter, exposed the problem as soon as possible. Java world's most popular open source CI server should be the right Jenkins, reference "Jenkins continuous integration environment to build" .

2.6 Code Review

Although TDD and CI can automate part of the work, helping us to improve code quality and development efficiency, but the manual code review or unavoidable. Self-examination, peer review, the investigation together like pair programming, like, this is like a master "learn" a good opportunity!

2.7 domain model

An accurate and stable value model layer is difficult to estimate, this is a great role for the current and future business code upgrade. This is also the object-oriented analysis and design (OOAD), Domain Driven Design (DDD) methodology such as the "battlefield." Although there is not much practical experience to DDD, but still recommend, not to the full measure, but the essence of the idea of draw. DDD Sample Application is a good learning materials to get started. In addition, with a custom field model field of language (DSL) it is also a trend worthy of attention.

3. booster: the continuing accumulation of knowledge

3.1 of knowledge

The first two parts have been introduced tools and methodologies will allow us to rapidly accelerate to one hundred kilometers. However, most of this knowledge is that anyone can get from the Internet. Tools like who can install, unless you have a "private" plug-ins, like the methodology also has a lot of work to learn. To Biao as 200 Mai, only paid off, forming a personal style and routine. Therefore, we must have their own long-term plans, and firmly implemented, after all, working slowly and deliberately. This is my long-term plan "Pragmatic Programmer road" :
Computer mathematics: discrete mathematics and specific mathematics.
Algorithm analysis and design: design skills and common data structures.
Platform: architecture, operating system, network, and database compiler theory.
Code design: architecture, design pattern, methodology.
Code implementation: mainstream development tools and programming languages.
Test verification: unit testing, performance testing and optimization.

3.2 Codebase

Legend Each master has its own set of code libraries. To become a master, and then I also continue to accumulate their own code base. My code base programming exercises, mainly from projects and business practice time work. Corresponding to the two most commonly used development tools, my code base is also divided into two parts: Java code and LinuxC system programming code.
First look at the schedule my personal library of Java, after several revisions as the following structure: Foundations of Computer Science cs algorithm / compiler theory, etc., java basic API, framework mainstream framework, mobile mobile development, bigdata large data hadoop / cache / machine learning, ui user interface, architecture architecture design, project amateur and open source project code, verification testing and validation codes. Dependency management the use of the most comfortable Maven.
$ tree -I "target|*.iml|pom.xml" -L 1 codebase/
codebase/
|-- 01-cs
|-- 02-java
|-- 03-framework
|-- 04-mobile
| - 05 bigdata
|-- 06-ui
|-- 07-architecture
|-- 08-project
|-- 09-verification
|-- autobak.sh
`-- README.md
 
Currently I use Sublime Text management knowledge and the code outside the Java world, mainly in accordance with its scheduling system from the bottom up is divided into: assembly language, C language (based on algorithms, systems, practices, open source software), script (batch, Shell scripts, Cheatsheet), other language (golang and Python, etc.).
$ tree -L 2 syspace
syspace
|-- 1-assembly
| - 2-ccpp
| |-- 21-basic
| |-- 22-algorithm
| |-- 23-system
| |-- 24-pragmatic
| `-- 25-opensource
|-- 3-batch
| |-- 31-bat
| |-- 32-shell
| `-- 33-cheatsheet
| - 4 only
| | - 41-golang
| |-- 42-python
| `-- 43-php
|-- autobak.sh
`-- index.md
 
In addition, not only to organize your code, you can also collect some small and lean open-source software to learn, such as by Nginx code for learning network programming, through Redis learn C language and data structure, to explain the principles by Lua study compiled by libevent learning concurrent programming .
Linus said: RTFSC (Read The F *** ing Source Code). In OpenJPA source when searching in practice, because there is no extension points and a function to change the source code for the Jar bag and, finally really so that the. Then it got out of hand, immersed in a sea of ​​Spring source. Sometimes Yimapingchuan, from top to bottom to see in the end, as there are open source OSGi was a small kernel Felix. Sometimes run into a wall and fall by the wayside, remember that time to see the Derby, has been to see the storage layer, I remember like with antrl generated SQL interpreter, because skill is not enough and ran aground. Now whether it is C, Java or other popular open source programming languages, can not say effortlessly, but very quickly you can see a rough process, have to say the result is constantly reading. All in all, great reading excellent source of harvest is beyond words to describe.

3.3 Cheatsheet

Cheatsheet cheat sheet, that is, from a cheat sheet of some routine work for common operations, mainly composed of common configuration commands, shortcuts and other components. I am currently divided into the database, IDE, in various languages, middleware, operating systems and so on. There are some ready-made online online Cheatsheet, but still more familiar with their own finishing. Practical work it helps me save a lot of precious time and repeated inquiries.
$ tree 33-cheatsheet/
33-cheatsheet/
|-- db
| - here
| - Just
| - midware
| - the
`-- revctl
 
On this section, each person will probably save some useful little script. But it notes that some work is not suitable or say worth Automation scripts. "Fruitful programmer" in said: "Do not let the automation efforts become yak hair cut." Yak hair cut is a very dangerous thing, it will eat you a lot of time, and have found only a practical not only a great script with a few tools or hidden.

3.4 Scaffolding

Scaffolding (Scaffold) is a good thing, it can help us to automatically generate code "skeleton." After the use of our accumulated skeleton code base for fine-tuning to do, continue to add functionality on top of the application form can be quickly available. Maven Archetype plugin provides a good scaffolding, many projects are based on code templates it offers. Of course, if you want to customize your template is also very simple, with specific reference to "Maven archetype skeleton and frequently asked questions" .
This outer Maven build tool in addition, IDE typically provides a scaffold to generate a variety of small small pieces of code. The most common is the IDE's code templates and complete feature, feel unsatisfied if you can write your own templates and IDE extensions, like scaffolding on Rails support RubyMine same. For details, see "Intellij IDEA plugin development Getting Started" .

3.5 Blog

Write a blog role can not be underestimated! Did not do it just summarizes the knowledge of knowledge of others, I did not make reading the book with notes and soon after became not read the same. A summary of knowledge when it comes to finishing off the search for your Blog will give you the fastest answer. Do not think this now as a Google search, you look very carefully over and over again to write something and see what others are totally different concepts! And Chinese technical articles there are too many shoddy content, layout and forwarded mess not indicate the source of countless. So read the book a chapter or post anything useful done the exercise, we must build on the progress quickly sum up!
So what to write? Before tried Orgmode under Emacs, before contact with lightweight markup language, with Emcas feeling quite amazing! Later he met Sublime writing for blog have moved on it, because it's Markdown plug-in is really handy. See "Markdown syntax and SublimeText under tips" .

3.6 Diversification

As a long time to write code, depth of knowledge, and the means to solve the problem of diversification will be up. What kind of programming language for what kind of projects with, what kind of architecture design for what kind of scene. Programming language diversification, diversification diversified architecture, development tools, and ultimately to contribute to the diversification of our thinking to solve real problems. Thoughtworks maintains a technology radar , regularly updated technology trends in technology, platforms and tools.

4. Fury: focus and immunity

Despite various auxiliary above, but if you can not stop and coding all been for nothing. Either look will see here will be there, or is in a noisy environment can not concentrate. Although modest, this is to improve the efficiency of the "last kilometer."

4.1 distraction-free mode

IDE provides a variety of general full-screen mode, like Sublime Text also provided additional "Distraction Free Mode" interference pattern, so that you concentrate into an open file editing.

Virtual Desktop 4.2

Used Linux desktop version knows that many Linux distributions have provided four standalone desktop workspace. A workspace can do communicate, like e-mail, instant messaging, a work area used to access a remote server or FTP environment, a work area is to concentrate on coding undisturbed. Under Windows this can be achieved also like Dexpot virtual desktop software, may wish to try.

4.3 touch typing and typing speed

Generally we often chat, then typing speed should not be a problem. Comfortably, but in addition to 26 letters, as quoted in parentheses common punctuation semicolon, numbers 1-3, and 8-0, the function keys F1 and F2, Ctrl / Alt / Shift the like can also be familiar with the best position, so knock to wind up fast.
In addition, regardless of what IDE and tools, master shortcuts remain in your hands off the keyboard mouse are basic skills. Otherwise, plenty fast wind speed touch typing is not acceptable. About IDE shortcuts I use most often refer to the introduction of the "Top Ten Intellij IDEA shortcuts" . About accumulation of this part, do not forget to save your own Cheatsheet years.

Music 4.4

About why you want to listen to music programming, there are many studies , all very interesting, but also said that not only promote anti-jamming excitement. Really have this problem, as well as a recommended list on almost universal knowledge, see what music to listen to when there is appropriate programming? . There's even a dedicated website http://musicforprogramming.net/ . In this regard varies, I personally still used to this "anti-noise" approach, recently OST listening to just read two quarters of "Silicon Valley" of.

4.5 bread crumbs

Of course, the others interfere with and interrupt the inevitable. Before leaving the work at hand, be sure to leave some clues, such as the key point, where were we thinking, etc., this is the "bread crumbs." So and so will be able to recover slightly faster time to continue some of the "live", as the same context switching process.

5. The method of efficient programming tools + = + + Focus System

Front based on personal experience, shared some personal experiences to improve programming efficiency. Everyone's experience is different experience, in fact, I believe everyone has a copy of your list. But the most important thing is to adhere to investment, continue to practice, practice, practice, practice, practice ......
Here quoted saying recently seen what self-encouragement, from Bruce Lee Bruce Lee:
“I fear not the man who has practiced 10,000 kicks once, but I fear the man who has practiced one kick 10,000 times.”
I'm not afraid to ten thousand kinds of style of play and practice all the time, but I'm afraid to practice kicking ten thousand times one kind of people.
“There are many paths you can follow to reach your destination. However, you’ll never reach the end if you keep changing paths along the way.”
There are many ways to reach the destination. But if you are constantly changing along the route, you will never reach the end.
Li Xiao teacher in "the time as a friend," once said: "Success on all learning, all rely on two things: strategy and insist and insist that in itself should be one of the most important strategies" Audio Bible, Wire Saw wood off. Do not be afraid detours, as long as the focus has been to go on to the end will be! I wish you could reach the other side of the dream to become the most powerful man of his mind!

Guess you like

Origin www.cnblogs.com/dantefung/p/11362886.html