Hacker News new | ask | show | jobs
by awestroke 1599 days ago
Why do PHP developers insist on calling themselves artisans?

Give me a call when PHP ditches backwards compatibility and cleans out all the shit from the standard library - 5845 global functions always available, most of which you are just supposed to know are shit... Just a nightmare.

5 comments

As the one who did the comment, I've never seen or heard PHP devs calling themselves artisans. My phrasing was an analogy. What I meant was, don't confuse PHP with the bad practices that were propagated for years from careless devs.
Artisans = Laravel dev. Is a complete sub-type of phpc.
First time I've heard of that. The only thing that rings a bell is the artisan command in Laravel
Artisans? First time I hear that. I certainly use PHP and never called myself an Artisan.
It comes from Laravel (https://laravel.com/); "The PHP Framework for Web Artisans". The command line entry point is also called "./artisan".
Isn’t "software craftsman" rather common? And artisan is just a synonym of craftsman. This is nothing specific to PHP. There people out there who take pride in delivering code that was created more as a piece of art.
(ˈɑːtɪˌzæn, ˌɑːtɪˈzæn) NOUN, denoting or relating to goods produced on a small scale using traditional methods

Checks out!

Which by the way is heavily mocked by PHP developers actually using OOP, dependency inversion, hexagonal architecture etc. Which is not the "artisanal" way of development it seems :)
Mocked as in made fun of? Personally (in 7 years as a PHP dev) I've not found this. There was one company I interviewed at where the lead engineer thought facades were dumb, but then couldn't explain why he needed to rebuild the entire backend in Node. Perspective.
Yes, made fun of. Philosophy of Laravel crowd seems to be similar to "the rails way", which means a lot of framework-specific solutions, disregard for TDD etc.

Well, static service locators disguised as "facades" are a bad design. Rebuilding entire backend in Node for that reason alone is dumb. Laravel features a PSR-compliant DI container and supports dependency injection with autowiring, you can very well write a nice, decoupled, SOLID code using Laravel. But it's rather not the thing people have in mind when picking it over Symfony or Laminas.

You can of course take a TDD approach with Laravel. I think I know what you're getting at, but I do find the Laravel has a lot out of the box now that I would otherwise have to write from scratch. I suppose the Spatie packages (for example) fill some of those gaps. I hadn't heard of Laminas before
Why would you care how many global functions there are in PHP? Just namespace your own functions and the whole "issue" will instantly disappear.
Do you think the problem is that I want the function name mysql_real_escape_string for myself? No, I just don't want thousands of confusingly named, completely worthless and/or actively harmful functions to always be in scope.
> No, I just don't want thousands of confusingly named, completely worthless and/or actively harmful functions to always be in scope.

Again, why would you care whether some functions that you don't use are available should you want to use them someday? It's not as if there's a huge list of thousands of functions stapled to the beginning of all your code files that you have to scroll for 5 minutes before reaching your code.