- examine your code
- determine what variables are related to what responsibilities
- identify classes with more than one responsibility
- identify classes in need of dependency breaking refactorings
- refactor the code with minor intervention
- compliment the refactorings with a full suite of unit tests that ensuring equal behavior
Following soon after, languages that enforce this at compile time. "Compile Error: Too much responsibility in this class". Additionally, "Compile Error: No unit tests for methods X, and Y". The IDE's will then tie into the unit test generation code like Agitar, and write legitimate unit tests for your code. You might think thats funny, and it might be annoying sometimes, but I bet it makes for cleaner code.
Then, people who haven't read a million books, and have 10 years of schooling can actually write code without subtracting value. They will be forced to do things correctly, and it shouldn't sacrifice creativity like a strict methodology.
Nice use cases! I am thinking about new generation ide (here is my post at comp.lang.python http://groups.google.com/group/comp.lang.python/browse_thread/thread/e019614ea149e7bd ) that makes such things possible.
ReplyDelete