News for hackers. Stuff that matters.
Re:Reusable Software? Just Don't Write Generic Code by jrochkind1 on Wednesday January 07, 2015 @07:58AM (#8850215)
I wonder if the converse guideline would actually be more useful: Everything should be made no more generic/abstract than actually neccesary.

Phrasing it as "should be made as generic as possible" is just what leads us down the primrose path to over-engineered complexity, no?

Abstraction maybe doesn't at first seem to use like it should be the enemy of simplicity -- certainly we can think of cases where abstraction leads to beautiful simplicity, and that's in fact a large part of what makes software engineering work, and what we enjoy about it.

But in actual life, the pursuit of "as generic as possible" (even if qualified by 'not more generic than necessary") seems to often be the primary motivation leading to conflict with "as simple as possible but not simpler."

Re:Reusable Software? Just Don't Write Generic Code by chriswarbo on Wednesday January 07, 2015 @09:09AM (#8850537)
You've made a subtle change of meaning there. By going from:

> should be made as generic as possible

To:

> should be made no more generic/abstract than actually neccesary.

You've introduced a subjective judgment call. The result is a tautology, since we could rephrase it to:

> should be made no more generic/abstract than it should

Whether or not we agree with the quotes from Einstein or the parent, at least they're (mostly) objective, and tell us how to proceed: if anyone finds a way to simplify or generalise a result (without sacrificing correctness), they should do it.

Re:Reusable Software? Just Don't Write Generic Code by jrochkind1 on Wednesday January 07, 2015 @11:14AM (#8851323)
I don't know if it's any different in objective/subjective, I think, as applied to software engineering, anyway, there's always a subjective element.

I suppose the corresponding operationalization to the way I've phrased it is: Don't add genericness unless you are unable to find a way to proceed with what is needed without it.

I think (and I think the OP thinks) the problem we have more often is people adding too much abstraction, not too little. If so, we need a rule that discourages, rather than encourages, the problem.