Code Design
 Code Design & Conventions 

For either a team or individual to develop clean, consistent and easily maintained code an agreement to a set of coding standards should be made by all developers.

For example, in the case of C#/.NET projects, I personally tried to adhere to the following standards:
And for a team's code to look consistent they should have a source template like the following:

//--------------------------------------------------------- // // FILE: apple.cs // CLASSES: Apple // // AUTHOR: Joe Programmer // Copyright (c) 2015, XYZ, Inc. // All Rights Reserved // // USAGE: ... // // NOTES: ... // //--------------------------------------------------------- using System; using System.Windows; using System.Windows.Controls; //--------------------------------------------------------- // CLASS: Apple // PARENT: Fruit //--------------------------------------------------------- public class Apple : Fruit { //--- Types/Constants ----------------------------------- (enums, etc.) (const, etc.) //--- Data ---------------------------------------------- public string Color; // public member start with upper case letter protected int size; // non-public members start with lower case letter //--- Properties ---------------------------------------- public int Size // property names should be initial capped version of protected member { get { ... return size; } set { ... size = value; } } //--- Constructor --------------------------------------- public Apple (...) { ... } //--- Method1 ------------------------------------------- public void Method1 () { ... } //--- Method2 ------------------------------------------- public void Method2 () { ... } }


I also line-up common attributes and equal signs in my code.
It's just easier to read and maintain. These two chunks are the same.

public int TotalAdjustments = 0; protected Label prompt = new Label (); protected ListView[] reportLists = new ListView[4]; private float customerEarnings = 0.0F; : : : public int TotalAdjustments = 0; protected Label prompt = new Label (); protected ListView[] reportLists = new ListView[4]; private float customerEarnings = 0.0F;


What large projects
usually end up
looking like:
 
What they should be:


Formal Software Design Process

Software Building Process