Keep it (functions/methods) small and simple
I have been doing some work using Oop and have a lot of re-factoring to do since I did not keep my methods small and simple. Often they use other methods or presume a certain amount of constructed parameters.
When I was working strictly in procedural programming I would make my functions small and tie them together like the Unix command line tools. But then I had issues with having to pass too many variables all around. So that is the next step for me, figure out the balance of keeping things small but not always passing around or re-constructing numerous variables.
Pattern: Single responsibility principle
comments powered by Disqus