4 ms·
>so there's a lot of unskilled people producing code. It's not just that. There's also a lot of people who spent their entire careers working in the PHP ecosys
by drspacemonkey 10y ago
>so there's a lot of unskilled people producing code.
It's not just that. There's also a lot of people who spent their entire careers working in the PHP ecosystem. All the bad practices common among beginners get ingrained in them as their go-to design patterns, because they never learn things like "authenticating APIs with cookies is bad", or "business logic doesn't belong in the controller". They'll even defend their bad patterns because "that's how we've always done it", never making the connection between what they've always done and the problems they've always had.
- arenaninja 10y agoLack of knowledge on design patterns and fat controllers are not inherently attributes of a PHP developer
- drspacemonkey 10y agoYou're right, it's not inherent to nor exclusive of PHP developers. It's entirely possible to write good code following good design patterns in PHP. But regardless of reason, that's not encouraged in the PHP community. A person who starts out writing PHP and stays in PHP development is, in my experience, far less likely to follow good design patterns.
- arenaninja 10y agoI think it depends on the community you're involved in? For example, Laravel, Slim, Symfony and Yii frameworks do encourage good design patterns (Laravel may have fallen off the wagon here though). I've seen pretty good code from October CMS, Craft CMS and even Magento 2.1 is decent. A lot of the PHP community is modernizing very fast even if WordPress can't (or won't). I think a person who starts out writing PHP today on a modern PHP framework will be almost as likely to pick up good design patterns as someone who is starting, say, .NET Core.
- drspacemonkey 10y agoThat's fair. I've been stuck dealing with CodeIgniter people for the last year, and that's a shitshow and a half. It's likely colouring my perceptions, especially coming from the Rails community. God, I miss Rspec.
- busterarm 10y agoI came from Rails into WordPress and the stink that I've picked up from having this on my resume has definitely hurt my career prospects...not like I'd rather be working on Rails right now anyway. I've resigned myself to digging deeper into Elixir and Erlang and using my Ruby background to get the next gig. I interviewed with some folks recently who are primarily CodeIgniter and transitioning to Laravel -- wasn't a fun interview. They just couldn't see the benefits of a functional style anywhere in PHP.
- computerex 10y agoSurely it hasn't hurt your career, PHP is still the most common language of the web. It's never a bad thing to have PHP experience on your resume imo.
- busterarm 10y agoI guess. The last year and a half I've done nothing but heavy WordPress backend and plugin development and large ETL projects in Ruby. Right now I'm working on a Jekyll with WordPress-as-CMS backend architecture for a high-traffic site. I think I'm building really cool stuff but when I talk to the kinds of companies I want to work for here in NY, most people seem to just tune me out the second I mention WordPress. I'd have an easier time if I spent a lot more time working with Node and React, but for the work that I do here those are the wrong tools.
- thehardsphere 10y agoActually, those frameworks don't encourage good design patterns. Those frameworks copy design patterns from other languages, assuming that "design pattern" is a proxy for software quality. The flaw in this is that the PHP runtime is not suited to executing large amounts of "Design Patterned" code. It's cargo cult software engineering. Symfony is by far the worst of these that I have seen. It's like they sat down and said "let's copy Dependency Injection from Spring, templates from Django, and routing from Ruby. Then we'll offer a choice between two different ORMs that are both broken, because ORMs are 'modern.' Finally, we'll slap the label 'Enterprise' on it so that people will finally take PHP seriously." But don't take my word for it; Rasmus Lerdorf is known for saying that all PHP frameworks suck: https://www.phpclasses.org/blog/post/226-4-Reasons-Why-All-PHP-Frameworks-Suck.html https://www.phpclasses.org/blog/post/226-4-Reasons-Why-All-P...
- tyingq 10y agoThat's likely true for any language old enough to have supported the old CGI model. Inertia...