I started off the discussion with defining the practice of refactoring and i quoted Martin Fowler's blog as following
•Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.
•Its heart is a series of small behavior preserving transformations.
•Each transformation (called a 'refactoring') does little, but a sequence of transformations can produce a significant restructuring.
After this we moved on to the best practices for refactoring classes. Following is a list that we discussed:-
- Comments
- Long Method
- Long Parameter List
- Duplicate Code
- Large Class
- Type Embedded In Name
- Un Communicative Names
- Inconsistent Names
- Speculative Generality
The session was very intense with everyone chipping in with their comments and i thoroughly enjoyed hosting it. Towards the end Anton and I wrote couple of code snippets to check the Andrew idea of using Interfaces (more on it later on). Rolf also chipped in with his comments and critiques. Notable absentees were Ron and Zubair and it would have been much more fun had they attended the event.
ps: watch out this post for snaps from the event.
Edit#1: Rolf's blog post on the event is live http://techiesleaders.spaces.live.com/Blog/cns!50531D3D6442376A!214.entry
3 comments:
This looks like an interesting discussion, too bad I missed it, hopefully I'll join in the next one InshaAllah
I am quite sure they will learn lots of new stuff here than anybody else!
Great post, I admire the writing style :) A little off topic here but what theme are you using? Looks pretty cool.
Security Equipments
Post a Comment