@dragonmantank@phpc.social avatar

dragonmantank

@dragonmantank@phpc.social

I coalesce the vapor of human experience into a viable and logical comprehension.

PHP developer, author, speaker, and podcast host. Senior developer relations @ Vonage. My posts and opinions are my own, and are hot garbage. Pretty sure a raccoon writes these things.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

omerida, to php

friends - does anyone know if SPL autoloaders scans through the registered loaders first asking for interfaces that match and then if no match is returned, goes through the stack asking for classes? Seeing something weird.

Because sigh I have two composer autoloaders ATM, both handling the same namespace. //cc @dragonmantank @ramsey @derickr

dragonmantank,
@dragonmantank@phpc.social avatar

@omerida @ramsey @derickr I want to say there isn’t a distinction between class, interface, or trait during the lookup. But you would go through one auto loader and then to the next, so you’d want to have the auto loader that matches most of the time loaded optimally (I don’t remember if it’s FIFO or LIFO for the order)

dragonmantank, to random
@dragonmantank@phpc.social avatar

While I’m not one for chasing the newest JS frameworks, SvelteKit so far seems the best “all-in-one” framework for getting stuff done if you want a JS back end and front end. It solves the big gripe I had with vite by itself.

I’m not sure which way I’d go just for front end though, other than using vite, but I think I’d lean toward VueJS still. React still feels too low level for what I want.

dragonmantank, to random
@dragonmantank@phpc.social avatar

Most days when I’m working on a project:

heiglandreas, to random
@heiglandreas@phpc.social avatar

So my daughter has to give a presentation tomorrow (actually "A PowerPoint"). First she asked whether the slides are OK (they were! She did an awesome job with keynote!) , and then whether she could borrow my clicker.... 🙈

I think my job there is done....

dragonmantank,
@dragonmantank@phpc.social avatar

@heiglandreas I’m currently having to balancing my kids teachers giving them crappy presentation advice while giving them tips that will still get them good grades. But all the teachers want are bullet-point readers.

dragonmantank,
@dragonmantank@phpc.social avatar

@heiglandreas latest complaint I had was on an art presentation. Kid got points docked for “not providing required information” because it wasn’t written on a slide. They talked about it and pointed it out in the painting, but because it wasn’t written down it didn’t count.

I wonder how well my last presentation would score, which was just 1 sentence or phrase per slide.

dragonmantank,
@dragonmantank@phpc.social avatar

@heiglandreas @ramsey Same. Learn which teachers are easy to deal with, and unfortunately put up with the others.

dragonmantank, to random
@dragonmantank@phpc.social avatar

Open Sourced Code !== Open to Contribution

None of that matters though, because true OSS allows you to fork and modify for your own use. You don’t need your contributions committed upstream to be allowed to use your modifications. The beauty lies in that you can do things the author doesn’t want to support. The author is not obligated to accept your changes or support them. You are free to share your fork.

dragonmantank,
@dragonmantank@phpc.social avatar

@ramsey I saw that, and would love to know more about exactly what was going on. But my OP was based on some Twitter discussions.

dragonmantank,
@dragonmantank@phpc.social avatar

@ramsey Which is against every license that I can think of. If I had to guess, it was to pass off the library as their own as a portfolio entry.

dragonmantank, to random
@dragonmantank@phpc.social avatar

Updated PAMStack to use Sculpin under the hood for static site generation. Now to figure out the best way to handle the PHP vendor folder so it works with IDEs properly.

dragonmantank, to random
@dragonmantank@phpc.social avatar

I’m so confused by this Remix talk I’m watching. It starts off making fun of PHP, then proceeds to do what PHP was been doing for 15 years, but with an air of “PHP from 1995 is the same as today lol.”

I like how mixing HTML and code is bad, unless JS does it. Putting things in {} is the same as <?php?>, don’t kid yourself.

I’m also pretty sure this is showing off what cgi-bin was doing as well?

But I understand. PHP isn’t a cool language, and all the stuff we did isn’t cool until JS does it.

dragonmantank,
@dragonmantank@phpc.social avatar

@syntaxseed Programming ideas have a half-life of 6 months. Anything older than that just rediscovered and touted as “new.”

dragonmantank,
@dragonmantank@phpc.social avatar

@ian @josh Sorry, that threw a phpstan error, we don’t allow variable variables in this code base.

dragonmantank,
@dragonmantank@phpc.social avatar

@heiglandreas @syntaxseed I’m sure it’s also that, coupled with lack of generalized experience. I’m sure I was guilty of it early in my career, but it seems like people who should know better don’t.

dragonmantank,
@dragonmantank@phpc.social avatar

@ramsey @heiglandreas @syntaxseed Welp, I know what book is going on my reading list next.

dragonmantank,
@dragonmantank@phpc.social avatar

@kboyd @ramsey @heiglandreas @syntaxseed The Twitter source code

For me, it’s actually been a variety of books like “Beautiful Code,” Joel Spolsky’s books, Mythical Man Month, Pragmatic Programmer, “The Art of Agile Development”, and being a polyglot. The exposure to various ideas helped much more than any individual code base.

dragonmantank, to random
@dragonmantank@phpc.social avatar

I'm a professional writer

dragonmantank, to random
@dragonmantank@phpc.social avatar

Have a good weekend after ? Don't forget to rate the talks you attended over on https://joind.in/event/phptek-2023 , even if there isn't a prize for it! We speakers love the feedback so we know how to improve and keep bringing everyone great talks.

dragonmantank, to random
@dragonmantank@phpc.social avatar

OH: “PHP is just a pile of mistakes in a trench coat.”

dragonmantank, to random
@dragonmantank@phpc.social avatar
dragonmantank, to random
@dragonmantank@phpc.social avatar

Hot take: PHP doesn’t have an async or concurrency problem, people just think it does because devs are brainwashed to “async everything.”

Scaling out via FPM pools or even just more httpd threads with mod_php works fine for most applications. Once PHP is the actual bottleneck for your application, then you worry about async/concurrency.

dragonmantank,
@dragonmantank@phpc.social avatar

@m1ke $5 says proper indexing would have also solved the problem.

dragonmantank, to random
@dragonmantank@phpc.social avatar

Looks like I have a box full of travel companions for next week! See everyone there!

dragonmantank, to random
@dragonmantank@phpc.social avatar

I have always thought ‘protected’ is the way to go. I cannot predict an end users needs all the time, so let them extend the code as they need.

Why should I stop them from doing what they need? I’m not obligated to fix their custom code.

RT @PerttiSoomann
With the last week's PHP 'final' usage in open source software packages - should libraries try to use 'protected' over 'private' to allow users to extend/adjust functionality …
https://twitter.com/PerttiSoomann/status/1654761395206987776

dragonmantank,
@dragonmantank@phpc.social avatar

@ramsey I just saw it on Twitter, no idea where it started.

dragonmantank,
@dragonmantank@phpc.social avatar

@itsjoshbruce @freekmurze Hot take: either you are coupled or you aren’t. There is no such thing as “loose coupling.” Once you depend on third party code you are beholden to it, shifting it from one level to another doesn’t reduce that fact.

Sure my controller isn’t dependent on Guzzle, but the wrapper service I inject into my controller is under the hood. I’m still maintaining that code.

2nd hot take: Composition isn’t necessarily better than Inheritance. Use what makes sense for the code.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • provamag3
  • ngwrru68w68
  • InstantRegret
  • ethstaker
  • magazineikmin
  • osvaldo12
  • rosin
  • mdbf
  • Youngstown
  • khanakhh
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • JUstTest
  • thenastyranch
  • tacticalgear
  • cisconetworking
  • GTA5RPClips
  • modclub
  • cubers
  • normalnudes
  • everett
  • tester
  • megavids
  • Leos
  • anitta
  • lostlight
  • All magazines