This will be a short post, it is more like taking note of a thought that crossed my mind.

VS
Dry: Don't repeat yourself principle, a well known and preached principle.
We should pay attention how to apply "Dryness".
Depending on the context, for example the source code for create and update may be identical in many scenarios but at sometime the logic may change and they can be different, if you try to apply dry by trying to use the same code base for the two operations this can catch you later. they are the same by accident, but will likely vary by design later and should therefore not share code in common.
Remember: even a broken clock is right twice per day. (but it is still broken)
:)
Related Posts:
That thing called testing
There is always a lot of discussions about testing in general, what to test (class, method, behavior, use case , feature, UI) ? when to test (after, before, during) ? how to do it ? like this one between DHH Martin Fo… Read More
D.R.Y principle and the Broken clock
This will be a short post, it is more like taking note of a thought that crossed my mind.
VS
Dry: Don't repeat yourself principle, a well known and … Read More
Use technologies as tools, don’t let them drive your design
Normal
0
false
false
false
EN-CA
X-NONE
X-NONE
… Read More
Open / Close principle and Design Patterns
The open/ closed principle
represents the second principle of SOLID design,
in this post I will give an overview of this principle and how to achieve it
using different design patterns (including some notes about the limi… Read More
General thoughts about TDD, BDD, SOLID and Agile
TDD
I still remember first time i heard about TDD, i was curious and a little suspicious;
my first thought was how spending time and money writing more code that doesn’t add functionality
to the product could be … Read More
0 comments :
Post a Comment