August 2007 - Posts
Summary Motley: My code is so readable and self-documenting that comments are unnecessary. Maven: Comments should address the intent (the why ) behind the code, not the how . Extraneous comments around how may indicate refactoring opportunities. ______________________________
Read More...
Summary Motley: The best way to get what you want is to complain… loudly. Maven: Complainers can get ahead, but try being pleasant and nicely asking for what you want. You often end up with more than you counted on. ______________________________ [Context:
Read More...
Summary Motley: A simple if-then-else hook is the simplest and best way to inject a mock object. Maven: First, you have to design to interfaces. Then, techniques like dependency injection, factories, and endo-testing are more effective ways to inject
Read More...
Summary Motley: I can't mock something that I have no control over (like third-party or old legacy code) Maven: Design to interfaces, create a wrapper, and use tools for mocking. These are all great practices for leveraging mock objects. ______________________________
Read More...