If the indentation of the former programmer is very untidy, the reading speed of the current maintainer's code will be greatly affected.
The new project code (no matter which editing environment is used) can adapt to the company's indentation specifications and facilitate communication between developers.
Programmers should be good at communication. The significance of code beautification is to reflect developers' respect for others. Good coding conventions can make the source code clear, easy to read, and accurate, it is more intuitive and consistent with other language conventions, so that programmers can better communicate with each other.
Statistics show that code with good indentation can improve code reading efficiency by more than 40%. Another statistics shows that more than 70% of software development efforts maintain previous code, therefore, beautifying the format of previous code is often the first step in refactoring. The use of the code beautification tool (pretty print program) can make the basic code indentation standard a system that is easier to execute.
In addition, if you are the creator of the department code specification, you should also understand that programmers are not machines. It is almost impossible to write code without making code indentation errors. Tools-based batch formatting and sorting tools facilitate the configuration import/export mechanism to develop a unified indentation specification is a truly operable system.
For Java code formatting,JacbeIt is also a good choice. By default, it contains a configuration file formatted completely according to Sun's code specifications.
Jacbe code beautifier, which providesEclipseIDE development environment tool plug-ins.
1.Jacbe plug-in for eclipse 3.1.0
Decompress the plug-in and copy it to the plugin file.
2.Personal Edition (free)Decompress and configure eclipse
3. Restart the eclipse tool. Choose WINDOW> preferences> JAVA> jacbe> and set the relevant path on the right.
4. Write a piece of code and then beautify it with jacbe.