Creating Quality Methods
摘要
Methods are the smallest block of code in our application. They encapsulate logic for reuse which helps prevent duplication and speeds up refactoring. The process of creating methods is more than copying a chunk of code and wrapping it in a method definition. Quality methods take careful planning and consideration, much like variables. More often than not, it requires multiple passes to craft it into something that we can be proud of, each time refining the logic and removing the cruft.