3 ms·
And the odd part is that frameworks were meant to provide structure and make code easier to maintain. Last time, long time ago, when i touched a php symfony pr
by gumballindie 3y ago
And the odd part is that frameworks were meant to provide structure and make code easier to maintain.
Last time, long time ago, when i touched a php symfony project i ended coding yml instead of actual php because _everything_ was in a config file - hundreds of packages and libraries just because the dev couldn't be bothered to issue calls to native php functions. Hilarious. However i did make a killing in training teams in design patterns and coding practices to help them maintain quality.
And almost always my advice was to write framework agnostic code (treat the framework as if it were just a dependency). Worked nice. Clean little specialised classes, no config maintenance madness, i also enforced running code linters and smell detectors on each commit and push. Gave up on the language when i noticed that _literarily_ all teams had the exact same issues, the exact same topics of debate and the exact same flamewars.
- lioeters 3y agoAt some point, we have to go beyond linguistic relativism, and admit that some languages are inherently flawed - when we observe that everyone who uses it struggle with the same problems. It's like the opposite of the "happy path", or "falling into a pit of success". Some languages guide the user toward poorly built software.
- gumballindie 3y agoYeah that’s likely true. The reason i like it as a language is that if you do know your design patterns and good engineering it is rather powerful, and the core language has plenty of nice little features. Prior to framework madness and a worker (person that works, not background process) mindset that plagues the php world it allowed for some fun creativity. I remember fondly how fun it was to solve design problems only to learn later on that hey, these are design patterns that other people in other languages use. Was nice to know i had the right “mindset”. It helped me become a better engineer in other languages ironically. I ate slept and dreamt design patterns. But thinking of it it’s because the language so easily becomes a mess that you need to constantly reinvent software programming just to keep things on track. Therefore all in all i think, for me, php belongs to history, and without wanting to insult anyone, i try and avoid any debated with a pho developer - it simply gets stuck in a bike shedding endless loop.
- lioeters 3y agoI'm right there with you, I also grew as a programmer writing lots of PHP. There are many things to like about it, such as the ease of deployment. And how forgiving the language is, especially for beginners - which in retrospect was great for exploration, building my own abstractions and design patterns, but the flip side is that a ton of terrible code has been written because the language lets you. As I gained more experience, I've become wary (and weary) of how a language or framework can mis-guide programmers into messy code that's difficult to grow and maintain. But then again, as long as the work gets done and money gets made, perhaps it doesn't matter much to some people. For myself, I want to take pride and pleasure in the work, and there are other languages with better design and developer experience. Living with some of the hellish code that exists in the wild (and honestly terrible code that I've written myself) has been a great learning experience, making me a better programmer. It's important to be sensitive to code smell, noticing how it's going in the wrong direction and what can happen in the long term, understanding how it happens, what can be done to prevent it - and better yet, how a language (syntax, patterns, tooling, ecosystem) can be designed to guide oneself and others so that good code can be written "naturally" by following best practices that are built into it.