Wednesday, May 30, 2012

Design & Coding Excellence Tutorial

I made a tutorial on design and coding excellence and thought of sharing with all software programmers. All of us write code however keeping certain best practices, principles, guidelines in mind while do so leads to greater design and coding. Most of the times, programmers tend not to worry about best practices while designing/coding but just complete the task in hand. This tutorial is an attempt to become better programmers. Takes less time to go through this but has lot of benefits in terms of how design and develop the software systems. Hope this tutorial on design and coding excellence benefits the readers.

Table Of Contents
                       
Ser.No
Topic
Description
1
Talks about fundamental design principles namely, Fail Fast, TELL, DON’T ASK, Design By Contract, Minimizing the Impact of Change principles
2
Talks about principles of class design (1) Single Responsibility Principle,(2) Open Close Principle, (3) Liskov Substitution Principle, (4) Dependency Inversion Principle, (5) Interface Segregation Principle and also covers principles of package design (1) Acyclic Dependency Principle (2) Stable Dependency Principle
3
Covers  types of code reviews, code review practices and assumptions (1) Explicit (2) Implicit assumptions
4
Talks about types of software errors and best practices on how to handle them
5
Covers what are code smells, how to eliminate code smells and guidelines on coding standards
6
Talks about what is code complexity and how to calculate the complexity and decrease the code complexity in legacy code
7
Covers best practices while refactoring the code.

Remember that there is no absolute truth in software. Some guidelines may be controversial. The practices, standards are usually customized to suite the type of the software development that is being carried out. In case of such arguments, we need to always look for the technical merits and demerits. For example some teams have file modification history on top of the source file and this is necessary if we do not have the version control system. In case of using version control systems, we can always differentiate between two sets of changes by comparing the revisions.
  
References

Fail Fast (http://martinfowler.com/ieeeSoftware/failFast.pdf)
Design By Contract (http://en.wikipedia.org/wiki/Design_by_contract)
Principles and Patterns (http://objectmentor.com/resources/articles/Principles_and_Patterns.pdf)
Single Responsibility Principle (http://objectmentor.com/resources/articles/srp.pdf)
Open Closed Principle (http://objectmentor.com/resources/articles/ocp.pdf)
Liskov Substitution Principle (http://objectmentor.com/resources/articles/lsp.pdf)
Dependency Inversion Principle(http://objectmentor.com/resources/articles/dip.pdf)
Interface Segregation Principle(http://objectmentor.com/resources/articles/isp.pdf)
Cyclomatic Complexity (http://www.sei.cmu.edu/str/descriptions/cyclomatic_body.html )
What was that story about the WinHelp pen-writing-in-book animation? By Remond Chen
http://blogs.msdn.com/b/oldnewthing/archive/2010/08/17/10050774.aspx
Documentaion/Naming conventions/ Functions
http://stackoverflow.com/questions/1585337/how-much-percentage-of-your-day-would-you-like-to-spend-on-writing-documentation
Clean Code (http://www.amazon.com/dp/0132350882/?tag=stackoverfl08-20)
http://www.amazon.com/Code-Complete-Practical-Handbook-Construction/dp/0735619670/ref=pd_sim_b_1
Refactoring (www.refactoring.com)

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...