6/19/2017 - 2:19 PM



  • Don't hard code settings (e.g. figure colours), read them from a file via read_settings().

The code is more readable and flexible than it would be if a value were hard-coded. You don't need to change the program to change titleBar.color ; you simply change the contents of the source that's read by"

-― from "Code Complete (Developer Best Practices)" by Steve McConnell,

  • Prefer long informative names over short uninformative ones (8-20 characters is ok)

In modern languages like C++, Java, and Visual Basic, you can create names of virtually any length; you have almost no reason to shorten meaningful names.

--from "Code Complete (Developer Best Practices)" by Steve McConnell,

"Access routines allow you to redecorate the interior of your house and leave the exterior unchanged so that your friends still recognize it."

--from "Code Complete (Developer Best Practices)" by Steve McConnell

"Anything you can do with global data, you can do better with access routines. The use of access routines is a core technique for implementing abstract data types and achieving information hiding."

--"Code Complete (Developer Best Practices)" by Steve McConnell

"Emulation of named constants. Although C++, Java, Visual Basic, and most modern languages support named constants, some languages such as Python, Perl, Awk, and UNIX shell script still don't. You can use global variables as substitutes for named constants when your language doesn't support them."

--"Code Complete (Developer Best Practices)" by Steve McConnell

"The only way you can intellectually manage a large program is to break it into pieces so that you only have to think about one part at a time. Modularization is the most powerful tool at your disposal for breaking a program into pieces."

--"Code Complete (Developer Best Practices)" by Steve McConnell


Chesterton's fence is the principle that reforms should not be made until the reasoning behind the existing state of affairs is understood.

The single biggest way to improve both the quality of your code and your productivity isto reuse good code.

― from "Code Complete (Developer Best Practices)" (


If you are writing several routines, you should test them one at a time.

--Code Complete's cheaper to fix defects early.

--Code Complete

...code reading detected about 3.3 defects per hour of effort.

--Code Complete

90% of the defects were found in preparation for the review meeting, and only 10 percent were found during the review itself.

-- Code Complete

As the size of the project increases, developer testing consumes a smaller percentage of the total development time.

--Code Complete