30 karma · joined Jul 14, 2009 (17y ago) · 12 submissions
comment 17y ago · link · parent
I've always understood high cohesion to be related to low coupling. Also, writing util classes before you need them (where low cohesion may be necessary) is a nothing more than a time sink. Do something when you need it, not before. You are not omniscient and will not be able to account for everything no matter how hard you try.
comment 17y ago · link · parent
Need to write something to a file, fine; just do it. Need to do it again in another class; time to extract common behavior.
You should also have an idea of what components will likely need this kind of abstracted behavior and preempt the wasted time writing something twice by just doing it the first time.
All of this comes with experience and the best way to gain experience is by doing it. Avoid trying to keep everything loosely coupled because it adds too much complexity is a great way to introduce tons of code smells and maintainability/extensibility issues.
comment 17y ago · link · parent
So close MS, almost made me buy an OS for the first time(Aside from OEM includes).
comment 17y ago · link · parent