Mongol Herdsman wrote: > Vitaliy wrote: >>> Choose one, Bolivar cannot >>> carry double. >> >> No need to pick one. The two can (and should) be practiced in parallel, >> and making your code more cohesive can at the same time make it less >> coupled, and vice versa. > > This was "Self documenting code vs. Comments" thread. The question was kind of: > When we break the "big" sub down into smaller ones with good > meaningfull names, and the smaller one is holding some unique > functionality that will never be reused in other subs; does this > increase understandability of the code and how it will affect "loose > coupling" and "tight cohesion" properties of the system. > > Let's see, yes, the code will be easier to understand, but what with > "loose coupling" and "tight cohesion"? > - "tight cohesion": yes, the unique functionality will be separated > out of the rest, making the rest more "cohesive"; > - "loose coupling" - _NO_, there is no need to make the separated > functionality be "loosely coupled" to the parent sub, for it won't be > used anywhere else in the code, just separate it out. > > That's why "Choose one (tight cohesion in that case), Bolivar cannot > carry double". Even though in this specific case you may not loosen coupling, tighten cohesion and improve maintainability/readability all at the same time, you still improve maintainability/readability without downside. So what is your point? (In other cases, you still can loosen coupling and tighten cohesion at the same time.) > The idea of breaking a system down into subsystems is trivial. > Non-trivial is doing that practically wise. Of course. What's getting you there (to do it practically wise) is, among others, practice in doing it. Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist