jeudi 24 octobre 2019

How to determine what "best practice" would be in general when implementing in Java?

I just came across another question asking about the best practice in dealing with issue XY. The intention of the OP might have been to get some viable practices (all the replies answer to that one in the example), but I found it still desirable to come up with a response about "best practice"- desirable but not really feasible.

While it is still possible to reply to a question, whether some approach is "clean" (just scan the writings of M.Fowler (inventor of the term) and R.Martin (evangelist of the attitude)), I'm at a loss with "best practice". If you search for the term you get a zillion arbitrary blogs announcing their insights (e.g. [1], [2]) with some of the recommendations probably harking back to "Structured Programming" by Dahl/Dijkstra/Hoare from 1972. Then there is J.Bloch's "Effective Java" an the Nth edition (promising "best practices for the Java platform" on the cover) and the whole pattern zoo, starting with GOF's "Design Patterns", with another zillion posts where for each pattern you can find a claim that it is an anti-pattern (e.g. [3], [4].

Is there any common frame of reference at the moment, or at least accepted fragments of one, against which a reply to such a question could be set? It would be a frustrating state of affairs, to label all of them "opinion based" wholesale ("The question you're asking appears subjective and is likely to be closed").

Aucun commentaire:

Enregistrer un commentaire