Here is the mind map summarized of what I learned.
Add some thoughts:
- TDD/SOLID principles/Refactoring skills become more critical and in an Agile/Scrum team, you have to be great, to be better so that you can deliver faster, your code will be easier to change, easier to maintain;
- Simple Design - it is summarized by only 2 points: fixing names and removing duplication. Combining with TDD's Red/Green/Refactoring cycle, it means just repeating this 2 things with test cases, your complex code logic design phase will turn into many tiny steps which just renaming and removing duplication; if you can do it fluently, the effort of thinking hard before hand becomes simple physical typing movements - which means you can design the code without thinking too much. This conclusion is so striking.
- Refactoring - When I tried the Kata Gilded Rose (a simpler version which have all the tests before), I really sense the power of simple design - refactoring by doing renaming and extract methods, then the business logic gradually emerged, and design pattern is emerged. For me it means as long as you have all the test cases, then you can refactoring the code without need to understand the business logic, and business logic will be more clear after you refactored. That is another aha moment for me. Looks like code quality is a separate attribute beside the domain knowledge. If we apply this to code review, it means the good code should be enough understandable without understanding the business background first.
Resources:
- Four Elements of Simple Design, by JBrain
- Kata: Gilded Rose, this is a great Kata about refactoring, it worth trying more times
No comments:
Post a Comment