3 ms·
A nice article, and I think I should add the book to my (already too large) to-read pile. I totally agree with "DRY might not be great in all cases" - In tests
by struppi 12y ago
A nice article, and I think I should add the book to my (already too large) to-read pile.
I totally agree with "DRY might not be great in all cases" - In tests, it's often better to make each single test as expressive as possible. I once read (and forgot who said it):
"Code should be either DRY (don't repeat yourself) or WET (write expressive tests), but never damp)"
And here's a shameless plug: I recently wrote an article about how tests can help you achieve simple design, and the next article in the series will be coming soon: http://quickglance.at/en/simple_design/passes_its_tests http://quickglance.at/en/simple_design/passes_its_tests
- zak_mc_kracken 12y ago> "Code should be either DRY (don't repeat yourself) or WET (write expressive tests), but never damp) I'm getting so tired of people who try to capture the intricacies and complexities of our profession with witty one liners that have to be taken like dogma. Just use your common sense, let your experience guide you and if you're not sure about something, ask your teammates.
- struppi 12y agoWho says that they have to be taken like dogma? Sometimes the one-liners are just easy to remember. Often they are funny. They can be a great tool to quickly illustrate a point or start a conversation. The one liners can never replace a conversation or explanation. They cannot replace common sense or real knowlege. I would never treat them as laws or follow them by the letter...
- Gupie 12y ago> Just use your common sense, let your experience guide you and if you're not sure about something, ask your teammates. Brilliant, added to our bugzilla quips list.