unixdigest / phpthewrongway

A pragmatic view on PHP programming.
https://www.phpthewrongway.com
Other
382 stars 69 forks source link

"The Right Way" tip? #29

Closed theofidry closed 8 years ago

theofidry commented 8 years ago

Each section of the website kind of follow the same structure: a "the absolute right way" title, a part explaining why this is not "the right way" but "a way" which may not always be "the right" for you or your use case, and then a little tip summing-up what is said above.

This, IMO, is not enough: pointing something as wrong explaining why is ok, depending of the arguments people will agree or not with it, but you ought to finish the work and give a solution. For example:

The wrong way: Religious following of rules and guidelines. Thumbs down

Yeah I think most people would agree with that, but what should be done instead? Another tip following it could be:

"The right way": Rules and guidelines are there for a reason. Question them and understand the rationale behind them before deciding if it applies to your use case or not.

I do realise that "The right way" could seem a bit too trollish to be used, but this kind of message is mandatory to try to be constructive and create a discussion. Otherwise it is not a discussion, but a closed opinion: "don't do this", which in the end is not so different than "this is how you must do it".

unixdigest commented 8 years ago

@theofidry, thank you very much for your tip!

Yeah I think most people would agree with that, but what should be done instead? Another tip following it could be: "The right way": Rules and guidelines are there for a reason. Question them and understand the rationale behind them before deciding if it applies to your use case or not.

I get what your saying, but in all due respect, and IMHO, I think this is obvious from the context.

I believe most people will understand clearly what they should avoid - any kind of "extremism" and blind following - and instead investigate, study, experiment and gain experience themselves. Balanced with what other experienced people are saying too etc.

As soon as a person stops being a "blind follower" he or she will - quite naturally - begin investigating, study, test-and-trial, etc. This is actually the natural process of a programmer which only gets "blocked" as soon as someone starts preaching stuff like, "This is modern PHP, everything else is backwards!"

Otherwise it is not a discussion, but a closed opinion: "don't do this", which in the end is not so different than "this is how you must do it".

What we're saying is to avoid *always following what's popular, blind following, extremism, etc. This can never be a closed opinion, this is rather common sense as you also kinda point out.

We're also linking to the discussion that took place on Hacker News about PHP - The Wrong Way, which has a lot of good points on both sides. We do that in order to avoid a closed discussion.

Some comments here on Github has been closed quickly, not to avoid discussion in general, but because we're trying to "filter" out what we believe is "framework trolling" or "OOP trolling", or simply because we found the comment not directly useful. We reserve our right to do that too.

theofidry commented 8 years ago

Hm ok let me rephrase this then: the sections themselves are rather destructive. Not because they don't make sense (they do), but are a negative critic on something. Such tips would A) provi de a bit of help where to start, B) counter balance a bit this destructive side.

I agree that A) is fairly obvious, but to be honest, "Religious following of rules and guidelines." is as obvious too me as "try to understand the rationale behind things". But maybe I'm just overthinking it.

Some comments here on Github has been closed quickly, not to avoid discussion in general, but because we're trying to "filter" out what we believe is "framework trolling" or "OOP trolling", or simply because we found the comment not directly useful. We reserve our right to do that too.

Entirely fair.

unixdigest commented 8 years ago

@theofidry, I think you're overthinking it :) I have elaborated a bit on our approach in the new issue about missing facts: https://github.com/bitflop/phpthewrongway/issues/30

theofidry commented 8 years ago

Fair enough, closing the issue then