Environmental protection, it also needs environmental protection, and the world needs environmental protection.

Source: Internet
Author: User

Google once said: If all websitesCodeAll compression processing will increase our service capability by 30%. What is 30% of Google's service capability? I don't know either!

Performance is said every day, and optimization is said every day. Why not think about environmental protection? Do not know how many times the machine's CPU runs, the memory size, and the hard disk speed are all fixed. Do not run other irrelevant code, or let the memory contain useless things, can the performance come up? What can be done after a database connection is improved by five times? Can the performance be improved?

How is environmental protection? Let's talk about the familiar code.

1. if else nested code can contain hundreds of lines and dozens of nested judgments. Such code is unknown to maintenance personnel, I don't know how much time it will take to look at such "spam" code.

2. If a piece of code appears more than five times in a file, change it to five places. Is it okay?

3. Define a uniform string for more than 10 times in the same class. Why don't you define it as static or constant? Is your memory very powerful?

4. What name do you use for comparison? Id. Although the comparison between. Net framwork and strings is similar to that of numbers, you have to deliberately challenge it if you have nothing to do. Are you testing CPU performance?

5 ......

Wasting machine performance, manpower, and resources ....

Do you like the code that makes your head big? As a leader, do you like your soldiers? As a boss, do you want to see that your team has no score for working overtime every day ?...

Maybe you are not the boss yet. Maybe you don't need to think about it now, but I suggest you start developing it now.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.