unixdigest / phpthewrongway

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

Please name your self #27

Closed goetas closed 8 years ago

goetas commented 8 years ago

Hi, The goal of the project is unclear to me.

Can you (or you as a group of people) please name your self?

I would like to know your experience in software development before expressing my opinion on it

AlexNodex commented 8 years ago

What does a name have to do with anything?

If you want to express an opinion then express one, else don't it's really that simple.

theofidry commented 8 years ago

You are free to express your opinion, but if you are not willing to reconsider your views or are closed to discussions, then it is nothing but useless ranting. What it has to do with a name? Well, it's easier to know who you are talking to.

Also I think this article sums quite well why phpthewrongway as it stands right now is unprofessional and has no legitimacy.

AlexNodex commented 8 years ago

@theofidry : Commiters and responders quite clearly have their name stated in their responses and commits.

All I see on the article that you posted is ranting by a fanboy of frameworks.

PHPTheWrongWay quite rightly points out a lot of bad practices in today's dare I say Modern programming. Most developers and frameworks are more interested in writing "pretty" and "complex" code that screams out "Hey look at me, I am so cool for writing this elegant code that cripples the infrastructure it's ran on" than writing efficient and performant code.

It is quite possible to write secure and performant code without the use of a framework, yet all you ever hear from developers is "Use X/Y framework for that part"

The original author was simply pointing out that a framework is not needed for every single problem and that frameworks by nature are very generic. Generic things by nature are not optimised for specific tasks and for the most part websites/apps are NOT the same and seldom fit into the realm of generic.

Every day the company I work for is tasked with fixing scaling problems by companies who have overly complex systems due to their original developer blindly following "How to write PHP the right way" style guides, creating massivley complex, dependancy heavy, spaghetti code, microservice based platforms, the developer has done this for two reasons. 1. (as above), 2. Cementing their job/role for the future. Most times all the comapny really needed was a few hundred lines of code to reach their goal, instead they ended up with a lot of technical debt that follows them around and actually hinders their scalability both as a company and technically.

You, me, everybody is entitled to their own opinion of course. My opinion is based on nearly 20 years experience in this industry, watching frameworks and trends come, go and revert.

theofidry commented 8 years ago

All I see on the article that you posted is ranting by a fanboy of frameworks.

For sure the author is biased, however it makes very good points by pointing a lot of statements which are claims without any facts to back it up. Pro or against fanboy, you should back up your claims, it's not being it's not a public scientific paper that you should not do it.

Most developers and frameworks are more interested in writing "pretty" and "complex" code that screams out "Hey look at me, I am so cool for writing this elegant code that cripples the infrastructure it's ran on" than writing efficient and performant code.

While it is certainly true for a segment of the developers population, I wouldn't dare it's the majority of people. I for one see more people caring about having code that works than having pretty code. If it's the impression the author or you gets, it should be stated as such and not like a evidence unless you conducted a survey (and then for the sake of transparency gives the details of the survey process).

It is quite possible to write secure and performant code without the use of a framework

I don't know any professional developer not agreeing on that one, but well, it's just my impression :)

The original author was simply pointing out that a framework is not needed for every single problem and that frameworks by nature are very generic. Generic things by nature are not optimised for specific tasks and for the most part websites/apps are NOT the same and seldom fit into the realm of generic.

Depends, frameworks like Symfony, Laravel or co. are sure somehow generic, but they aims to solve a specific set of problems, not all the problems of the world. So really it depends of what is meant by "generic". A routing system can be generic, but a routing system is still a routing system and unless you have something overly specific or you your routing system is dead simple, there is nothing wrong with advocating using library X to solve this specific problem.

Every day the company I work for is tasked with fixing scaling problems by companies who have overly complex systems due to their original developer blindly following "How to write PHP the right way" style guides, creating massivley complex, dependancy heavy, spaghetti code, microservice based platforms, the developer has done this for two reasons. 1. (as above), 2. Cementing their job/role for the future. Most times all the comapny really needed was a few hundred lines of code to reach their goal, instead they ended up with a lot of technical debt that follows them around and actually hinders their scalability both as a company and technically.

It is just my opinion and I can't speak for everyone, but I don't believe a single instant that it's the frameworks folks fault. A frameworks are tools like any other, the developer is the one taking the decision to pick his tools and decide on how to use them.

You, me, everybody is entitled to their own opinion of course. My opinion is based on nearly 20 years experience in this industry, watching frameworks and trends come, go and revert.

3 steps forward and 2 steps back. You try, get an opinion, do something else, get another opinion, want to retry and retry, get another opinion... Looks much better than stagnating don't you think?

Overall the issues (I think) most people have with phpthewrongway are:

phptherightway and frameworks give guidelines, they are not laws and it's a developer responsibility to question them and judge if they are appropriate for his use case or not.

But I think we are digressing :) I answered to your comments with my point of view, but to go back to the initial goal of this issue I guess @goetas was complaining about the lack of transparency on what the goal of this project is. Even if it was just something like "we are some people angry and frameworks fanboys blindly following guidelines as if they were laws to show them you can get the job done by yourself as well" it would be more clear.

AlexNodex commented 8 years ago

"I don't know any professional developer not agreeing on that one, but well, it's just my impression :)"

Your response is very ambiguous. You agree that developers just tend to "Use X/Y framework for that part" or not?

Regarding your points on overall issues.

  1. I don't criticize tools, I criticize the over use of them when not needed. I am a firm believer in the right tool for the right job, that rings true for Languages, Databases and Operatings systems. If the job is a (simple) 5 page website then a framework is an overkill - this is a simple fact. I also criticize the pushing of these frameworks by developers to other (less knowledgable) developers who are perhaps just starting their career and don't know any better. In the original article - I didn't feel that it criticized the framework itself but rather the overall complexity surrounding frameworks and the assumptions they make regarding standards and structure.
  2. I agree
  3. I can't quite decipher what @goetas original point was, it's very unclear to me, but judging by his website, projects and git stuff he seems to really like the frameworks so I can only surmise it's an attack on this repo!
theofidry commented 8 years ago

Your response is very ambiguous. You agree that developers just tend to "Use X/Y framework for that part" or not?

I edited my comment to truncate the part I agreed with

  1. If it's one of your personal project and you get the job done faster because you are familiar with a framework, then there is nothing wrong to use one even if it's overkill. But except this specific case, I agree.

For 3), let's let @goetas talk for himself

goetas commented 8 years ago

It does not matter if i like frameworks or not, but what is important to me is: how many years of experience in software development do you have to claim that what is written on phpthewrongway make sense at all.

How many teams have you managed? How productive where they using some tools vs using different? What was the bug ratio delivered on production compared with used tools/libs/frameworks? How was the team WTF ratio compared to used tools?

I'm not good at writing, and i will never be able to create such long and elaborated website about php being good or bad. On the other side, when we talk about code and best practices, choosing tools, frameworks, libraries, languages, I think that I'm good enough to be able to make my point.

As somebody said, words are cheap, show me the code.

AlexNodex commented 8 years ago

@goetas if this is directed at me then here are some answers.

  1. Close to twenty years.
  2. I've managed many teams developing some of the fastest websites on the planet.
  3. I don't understand what a "WTF ratio" is.

If it's not directed at me then, well, you still have an answer of sorts :)

goetas commented 8 years ago

WTF ratio: http://www.osnews.com/images/comics/wtfm.jpg

My question is directed to the author of the website and to whoever claims what is written there is right. Without having clear in advance the aim of the website and a concrete propose.

What i learned is that in sw dev is always about trade offs.

What I see in this website really dangerous. If a junior dev will read and follow what is expressed there, essentially is a clear invite to re-invent the wheel. Understanding if re-inventing the wheel or not comes with experience. For a junior, I will always suggest the approach "use a framework/tool/library, and when you will be good enough you can start thinking about writing your own".

AlexNodex commented 8 years ago

It's also very dangerous to always rely on a framework, certainly early in a career.

unixdigest commented 8 years ago

The goal of the project is unclear to me.

The goal of this project has been very clearly defined from the onset on the "welcome" section.

Can you (or you as a group of people) please name your self?

This website is about ideas and combating extremism in the PHP community, it's not about personal fame or recognition. Naming people will only shift the focus from the problems addressed on the website to the people addressing the problems. Just stay focused on the ideas.

I would like to know your experience in software development before expressing my opinion on it

Religious following of trends and hype and blind following is unfortunately predominant not only within the PHP community, but in general in many areas in life, as such we must always stop for a moment and think about why we do the things we do.

The ideas, thoughts and conclusions expressed on this website doesn't take much experience to reach if you just stay focused on the main theme which is to always do a particular thing because other people says so.

J7mbo commented 8 years ago

This is a joke issue. I expect more maturity from Symfony developers, this is Laravel-level "show me your credentials or your opinion doesn't count".

theofidry commented 8 years ago

Thanks for drawing such generalities @J7mbo. But maybe a more mature behaviour would be to contribute to the discussion (in another thread) about say for examples some points made in there article mentioned here which criticise the fact that a lot of statements are far from being factual or backed up with data when they should, instead of making a troll comment on a closed issue.

J7mbo commented 8 years ago

Not a problem! And this was never a discussion to begin with.

teresko commented 8 years ago

argumentum ad verecundiam

Look it up, @goetas

Zvax commented 8 years ago

For a junior, I will always suggest the approach "use a framework/tool/library, and when you will be good enough you can start thinking about writing your own".

Being a somewhat junior dev myself, I would request from you to let us beginners have our own voice. I totally feel, and experienced, that it's the other way around.

Build something first, make mistakes, then when you're ready proceed to actually use existing libraries / frameworks, knowing why you do it, why a particular way is used, having faced the actual challenges said library or framework is trying to mitigate.

@goetas You're apparently an experienced senior dev. As such, can you really understand how we youngsters face today's reality or how we react to phpthewrongway? As it is, that site totally helps my understanding and development, as it really is about not only blindly following hard rules. Not about you should do things this way, nor you shouldn't use frameworks.

I would like to know your experience in software development before expressing my opinion on it

how many years of experience in software development do you have to claim that what is written on phpthewrongway make sense at all.

Sorry for being harsh, but this is a terrible statement. The idea that one needs to know the author of a point to be able to determine the validness of it misses some very basic premise about communication. If this site doesn't make sense to you, fine, but it does make sense for a lot of us. Maybe when I'll be as experienced as you are, it will stop making sense, but to get there, I have to learn, don't I?

J7mbo commented 8 years ago

I'll borrow this from someone else who is watching this thread:

"please name yourself so that we can easier attack you about things unrelated to code"

theofidry commented 8 years ago

it really is about not only blindly following hard rules. Not about you should do things this way, nor you shouldn't use frameworks.

@Zvax, anyone teaching you something that way is not doing it wrong, to some degrees. I would say this is were your education, culture and background influence this. When you teach additions and substraction to a kid, you just tell him how it works in a specific domain. Because this is enough for what he needs, and he is not mature enough to learn more about it. If you do a bit more math, you may learn a bit more properties additions and substractions may have, like commutativity or associativity. If you go a bit deeper, you'll learn how they are created, why they work that way, and release that in other contexts, 1 + 1 = 0 and not 2.

I'm not doing teaching as a profession neither I would dare to claim to know how people should learn it. I don't know if it's better to learn PHP with a framework or not, I would tend to say it depends and that if you're planning to invest yourself in this language, you should learn both anyway. I never liked blindly following something, but with insight there was many times were I was not confortable enough with some things to fully understand them, and at that time following this specific rule helped me to keep focus. But as always, it's never black and white, but always a question of balance.

AlexNodex commented 8 years ago

It's never better to learn from a framework. Learning things only from the perspective of a framework does two things.

  1. Limits your scope and knowledge to that framework and its purpose.
  2. Inhibits you to learn a different way that is probably more suited to your usecase. An example of this is found in most functionality in most frameworks where they write less efficient/performant code in aid of either easier to read code or easier to write code, this as we all know directly effects scalability of an application.

Point 1 but especially point 2 is why vanilla [Insert language here] should always be the starting block for any serious developer, and, -should- it make sense for them to do so then pick up a framework but again only if it makes sense to do so for them and their application.

I'd also like to point out that I don't think the author was digging at "never use a framework ever", I think he was referring to using the generalised open source frameworks available and pushed as "The right way to write php" without giving it a second thought.

AlexNodex commented 8 years ago

@Zvax

Sorry for being harsh, but this is a terrible statement. The idea that one needs to know the author of a point to be able to determine the validness of it misses some very basic premise about communication. If this site doesn't make sense to you, fine, but it does make sense for a lot of us. Maybe when I'll be as experienced as you are, it will stop making sense, but to get there, I have to learn, don't I?

I've been in this industry for many many many years, I've survived and even flourished without doing php the so called "right" way.

Use the right tool for the job, most of the time that's NOT a generalised framework as most of the time you're not building "sheep clone" applications, you're building something to solve a specific problem.

J7mbo commented 8 years ago

@AlexNodex I don't think your latest comment was necessary, @Zvax and yourself are in agreement... That's what he said.

AlexNodex commented 8 years ago

@J7mbo I wasn't looking for your approval so happy days :)

J7mbo commented 8 years ago

@AlexNodex Are you English? We're getting confused... Language barrier?

I didn't give you my approval.

I was saying: both yourself, and @Zvax, agree with each other.

AlexNodex commented 8 years ago

Yes, I was agreeing with him, I just didn't read his previous post until after my reply :)

And yes I'm English.

theofidry commented 8 years ago

I'd also like to point out that I don't think the author was digging at "never use a framework ever", I think he was referring to using the generalised open source frameworks available and pushed as "The right way to write php" without giving it a second thought.

That may be the general intent and I think there is little serious developer not agreeing on this, however a lot of arguments says otherwise and this is where more people disagree or are upset. For example:

All general purpose PHP frameworks suck! – Rasmus Lerdorf

Yeah fair enough. Just a question though: what is do you mean by "general purpose PHP framework"? Which framework are you talking of and what in your opinion makes them "general"? What makes them suck? To take an example of an argument in the video, he takes the that people start using a framework, and then because they tweak it so much it becomes impossible to upgrade after. This is not a framework problem. The problem is your abstraction. If you write code coupled to your framework, there yes changes at the framework level are more likely to affect you. But the same goes with PHP itself or any library, this what coupling is about. Does a framework forces you to write coupled code? Depends, if you are using Drupal or Typo3 the answer is likely to be yes. Otherwise most frameworks nowadays are modular enough to embrace libraries, not framework packages.

I don't blame the initiative behind this website although I'm not too found of it's frontal approach, but there is a lot of elements which needs more facts and less opinions.

unixdigest commented 8 years ago

I would like to open another fresh issue on the very important point that @theofidry makes here about missing facts.

I don't blame the initiative behind this website although I'm not too found of it's frontal approach, but there is a lot of elements which needs more facts and less opinions.

Lets jump to the new issue and keep the discussion focused on this point in the discussion.

theofidry commented 8 years ago

@binarygenius do you want to do it point by point or rather have a full list instead? The first is, well kinda slow, the later might get quite messy depending of its "sensibility", i.e. if there is little facts available and is more a matter of beliefs.

unixdigest commented 8 years ago

@theofidry, lets try to deal with with one "sub issue" at a time if possible.

theofidry commented 8 years ago

Just in case: if some people don't want to get spammed because they don't feel like following this thread anymore for whatever reason, remember that there is an "unsubscribe" button.

Let's tackle them in order then. The first "issue" I find is this one:

In the world of PHP programming a set of trends are massively being propagated by some people (in their books and on websites) as “Modern PHP” while all other approaches are frowned upon as backwards, stupid, or just plain wrong.

These people seem to work tirelessly at getting other people to follow their way of doing things.

There is several things bothering me:

a set of trends are massively being propagated [..] “Modern PHP”

The only times I heard "Modern PHP" were for: mentioning how recent version of PHP made PHP easier, "library driven" (quoting it as I doubt that's the correct phrasing for it) with Composer and the modularity of frameworks (as opposed to frameworks working in a very specific way with a very closed ecosystem like Wordpress, Drupal, eZPublish, etc.) (I can't speak for the latests versions like Drupal 8 or the rewrite with Symfony of eZPublish as I didn't check them). Oh and yeah on frameworks pages, "this framework is a modern PHP framework", but it's more marketing than anything.

while all other approaches are frowned upon as backwards, stupid, or just plain wrong

Honestly that's where I'm a bit lost. I do know some people that are like that, but more about people themselves than because they use or don't use framework X. And I sometimes some people with a very strong view also happens to be framework authors, like Paul M. Jones who is a fervent believer of a 1 component should have a little dependencies as possible to a certain extreme.

These people seem to work tirelessly at getting other people to follow their way of doing things.

Too me looks people feeling:

The are not mutually exclusive. I also don't doubt there is some people in quest of control and fame out there, but let me try to be optimistic and believe that they are a very little minority in this world.

What strikes me in this welcome message, is that by reading it, I perceive it more as a personal attack from the author to very specific persons whom he doesn't want to name. I don't feel like a welcome message should be this aggressive or negative. Maybe this could be rephrase to have something more neutral, something more along the lines "this website is about presenting a pragmatic view on PHP, questioning trends, breaking dogmas".

I'm not good enough with words to find a more suitable phrasing for this message, so if anyone has something to suggest or disagree with what I said...

unixdigest commented 8 years ago

@theofidry, I have noticed that this issue seems to be the main focus on your comments (not all of them):

What strikes me in this welcome message, is that by reading it, I perceive it more as a personal attack from the author to very specific persons whom he doesn't want to name. I don't feel like a welcome message should be this aggressive or negative. Maybe this could be rephrase to have something more neutral, something more along the lines "this website is about presenting a pragmatic view on PHP, questioning trends, breaking dogmas".

I very much appreciate your point!

I don't feel like a welcome message should be this aggressive or negative.

We do. Here's why..

This is an attack, using a provocative "style", not on or towards a specific person, but on the ideas expressed by such persons because of how they work in expressing these ideas!

If you or someone has never "met these people" or read anything from "these people" or don't know of anyone doing that then that's great, but we have, and we strongly believe that the way they are dealing with these issues is plain wrong.

We noticed - almost by coincidence - that some of these people (not all of them) seems to be - as we also state on the website - infatuated by the idea of other people "following their way of doing things", or "using their products", etc.

We would like to address this issue using the "provocative" approach on purpose.

Why? Because we very strongly believe that it is very wrong to state that method X is "the modern way" of doing things when this leaves the impression that method Y is backwards and/or outdated.

I could throw in a couple of links right about now and you would see clearly what I mean, but we all feel that it would be wrong to do so.

We're not against the people who say or write these things. They are in their full right to their opinions and beliefs etc., and in some other aspects or areas we think they are doing great work, so we don't want to be like that.

But we believe that this attitude deserves the "provocative" approach without being mean, or aggressive in any personal way.

We want to "provoke" thought!

What we have seen so far is:

  1. People who disagree on the basis of another experience or view. Some people - for example - strongly believe that you should always and only develop software using the object-oriented paradigm.
  2. People who agree with all or most of what we say.
  3. People who has emotional reactions because we've hit the nail right on the spot of what they do in practice and they cannot justify this. They are blindly following "the trends".

We respect number 1 and a lot of those ideas where expressed on the Hacker News debate which we also linked to. Some where expressed on Reddit, (even though a great deal of the Reddit stuff is too immature to pay attention to in our opinion - thus we ignored that).

People in the third group however should stop and think hard about why they react emotionally to these issues. Emotional reactions like these are often the result of "blind following" of charismatic or popular leaders, popular community members, etc., people that other people "look up to", even idolize.

Such reactions are not the result of a strong belief based upon knowledge and good judgment, it's based upon emotions and they cloud objectivity.

The third group of people (and the people they are blindly following) are the ones who are causing damage to clients, ruining projects, making programmers look really bad, and a whole lot of other issues that would most likely deserve a whole website on its own to address these problems properly.

I personally work mainly in the IT industry as someone who is called upon to rectify a very bad situation caused by a programmer or a team of programmers. I have been in the software and communications industry for 29 years with about 16 of those in PHP development and I have seen some pretty nasty stuff.

Clients who's businesses almost got ruined due to programmers who didn't analyze the problems they where dealing with, but simply followed trends and hype.

Clients so mad and so angry at programmers in general that it was very difficult to handle the situation because they had some serious bad experience with "extreme" programmers whom they paid a lot of money, but the software they purchased was horrible put together by people "following" trends and "modern way of doing things" that they never cared to try and really understand the problems and long term implications of their actions.

I personally believe this stuff is a very serious problem in our industry that needs to be addressed.

Many companies are also making these issue worse because of their so-called "modern" way of perceiving programmers. They view programmers as "people who are easily replaced by someone else doing the same thing". And a pattern emerges in which you can recognize such a company by their way of interviewing people, they only care about solving puzzles or online "math battles", etc.

This is horrible because these companies puts a huge and completely unnecessary pressure at young programmers who might - in pure desperation - seek out the best advice propagated by whomever is perceived as popular in the business rather than taking the time to really understand the technology and the problems they are dealing with.

No, all of this is wrong!

Programming is an art form. It takes much more than mathematical skills or "following trends" to be a good programmer. You have to really enjoy what you're doing and not just "throw software together quickly". You have to analyze long term implications and respect the responsibility that the work you do carry. You have to be very emphatic and not just technical minded in order to develop software that other people can use with easy and joy.

This was a long post, but I hope that I have addressed some of the important issues of why we chose to do it as we did.

As long as we see this "PHP the modern way" propaganda we feel that the provocative approach is the best suited.

AlexNodex commented 8 years ago

The lat comment is brilliant, I could t have put it better myself. The best part is how you described putting right other people's mistakes who have had no forethought on the problem... You described what I do and see on a daily basis, for me I would have thought this problem would be receding but it's getting worse !

theofidry commented 8 years ago

Thanks for the detailed answer @binarygenius.

I have noticed that this issue seems to be the main focus on your comments (not all of them):

Well, that's the part I like the least :) I think is more because I perceive this tone as aggressive and/or extremist, which is something I don't like for various reasons.

Some where expressed on Reddit, (even though a great deal of the Reddit stuff is too immature to pay attention to in our opinion - thus we ignored that).

I couldn't help but to laugh at this one. If one's view on the state of PHP would be only through Reddit, this would be quite sad. It's more a source of depression and frustration than anything else.

As long as we see this "PHP the modern way" propaganda we feel that the provocative approach is the best suited.

I have mixed feeling about this one. On one hand, I believe that this "modern PHP" is indeed due to hardcore OOP believers, frameworks fandboy which is clearly nocive.

On the other hand, there is the good part I mentioned: easier OOP support (it doesn't mean one should do only and everything in OOP), Composer that changed the game on how we approach libraries and development (I can only see that as a huge improvement withing PHP) and modular frameworks (which is the best thing that could be in a framework, who likes to be restricted to a framework? If I want to upgrade or ditch the framework, I should be able to easily do so and without fighting the framework).

And last but not least, there is this marketing side. A new framework or libraries comes out, it want to attract a bit of attention (what more normal?), it will claim it is using "modern PHP". I honestly don't buy this kind of stuff because for a developer this the kind of line you're not buying. But for non tech people, this makes sense for them: PHP has a very bad reputation. It gets better, but there is still a lot of people out there laughing at the very idea of using PHP. It's stupid yeah, but companies can buy this stuff. Having a new catchy line to say "PHP changed a lot, it got better" (be it the language itself or its ecosystem) is not bad.

for me I would have thought this problem would be receding but it's getting worse!

@AlexNodex is it or is it in your environment only that is getting worse? 😁 Let's not be pessimistic, there's teacher 500 before J.-C. were already saying the education is getting worse and worse we're heading straight into a wall. Exactly today's talk in a lof countries 😆

On a more serious not, for sure there is a problem: the number of developers double every 5 years. That means that half of the developers have less than 5 years of experience. As long as this is the case, I hardly see how the industry can really change at this level, I believe it will at some point, but not tomorrow. So let's do our best in the meantime ;)

theofidry commented 8 years ago

Ok I still can't help but not to like this welcome message even with your explanation @binarygenius, but I also can't find something better which still express your ideas so let's go to the next one unless someone find something else to say about it.

I'll write about the next point when I'll find some time for it, but if someone wants to start another one first feel free.

unixdigest commented 8 years ago

@AlexNodex, @theofidry, thanks for your comments!

@theofidry, alright lets move on for now then :) Feel free to open each single subject in its own issue, that way we can keep each issue separated and specific as much as possible.