@Crell@phpc.social avatar

Crell

@Crell@phpc.social

Anything worth doing is worth doing well.

Anything worth doing well is worth teaching others to do well.

Author of Thinking Functionally in PHP, now on LeanPub: https://leanpub.com/thinking-functionally-in-php

#tootfinder

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

Crell, to php
@Crell@phpc.social avatar

Please, web app developers, consider how your users will upgrade. If your upgrade process is "remove the old one, unzip the new one", then it's not an upgrade process. It's an encouragement to never upgrade.

Crell,
@Crell@phpc.social avatar

@sarah Trying to upgrade Koel (Laravel-based self-hosted music streamer, pretty nice), and... there's a reason I haven't bothered to upgrade in a while.

Crell,
@Crell@phpc.social avatar

@ralphschindler I don't believe I said otherwise. (I've had similar issues with many other web apps. This is just the current one I'm fighting with.)

Crell,
@Crell@phpc.social avatar

@ralphschindler Probably? That's a larger lift than I have time for right now. I just want to upgrade my app and figure out why the search function doesn't work.

Crell,
@Crell@phpc.social avatar

@acelaya I don't have a very easy solution. I've seen "checkout from Git and change your tag", "Composer update," and self-modifying updaters (eg, Nextcloud, or the Platform.sh CLI app).

I think an update CLI command is probably the best option for non-cloud envs. In concept it could make its own backups and do the download for you from GitHub, using the API. Though that is admittedly more work.

Crell,
@Crell@phpc.social avatar

@acelaya Another option I've attempted myself is to put virtually all the code into dependent Composer packages. If there's nothing not-in-composer to update, then a composer-update will do everything.

That helps, I think, but sadly does have an upper bound on what you can move out of the main app. And requires someone have composer installed.

sarah, to random
@sarah@phpc.social avatar

PHP needs a code of conduct for the project itself. Is there anyone willing to push for an RFC to add one with me?

Crell,
@Crell@phpc.social avatar

@heiglandreas @sarah @ramsey @pronskiy I'm pro-CoC in general, though the specifics matter. A bad CoC is worse than no CoC.

My issue is that every time I've tried to propose a CoC in the past for FIG, I got sealioned by "well why aren't you just using Contributor Covenant?" as the only feedback, and "I dislike CC v1 for $reasons" wasn't a sufficient explanation.

So yeah, I support a CoC for both Internals and FIG, but depends on details, and I will not be the main sponsor.

Crell,
@Crell@phpc.social avatar

@sarah @heiglandreas @ramsey @pronskiy v1, no. v2, I'd have to look at it again to see if I like it. It's been a while.

My repos all use the Code Compact as a CoC, which is what I'd proposed for FIG. Some felt it was too wishy washy, though. (I liked that it was mostly "do this" rather than "don't do this.")

http://codemanifesto.com/

Crell,
@Crell@phpc.social avatar

@maccath Oh geez. I don't know if the maintainer is even active anymore, but I'll leave an issue on the GitHub repo just in case.

Crell, to php
@Crell@phpc.social avatar

Any time I see "bad" code, the first answer is usually "you need more precise and strict types."

Often there's other stuff wrong, but easily 70% of the time, the fix starts with "define the problem better and the problem goes away."

Crell, to ai
@Crell@phpc.social avatar
michael, to php
@michael@thms.uk avatar

Got to say: Just been through upgrading an app from 8.1 to 8.3 and it's really nice and painfree.

Very few breaking changes, and the few that are there are stuff that a sensible person would've addressed a long time ago.

Unfortuantely that means that apart from readonly classes, there are also few exciting new things in there. But I guess these also are just point updates after all…

Almost boring 😉 (Not a bad thing! Stability is also nice.)

Crell,
@Crell@phpc.social avatar

@michael As a general rule, "well-behaved" code tends to upgrade very easily and quickly. Code that is not well-behaved... less so.

Mainly that's because older PHP versions allowed all sorts of stupid shit, and the list of allowed stupid shit has been steadily decreasing over the years. The less stupid shit your code does, the easier the upgrade process will be. 🙂

Crell, to Ukraine
@Crell@phpc.social avatar

Remember: Every mile of land lost by #Ukraine this month to Russian invaders is the direct result of #GOP intransigence and refusal to stand by our allies just so they could make Biden look bad.

Every Republican legislator is a threat to national security. Every. Single. One. Treat them as such.

Crell, to python
@Crell@phpc.social avatar

No, , this really is a gotcha, and a stupid one at that.

https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments

Crell,
@Crell@phpc.social avatar

@maxalmonte14 It's more that all default arguments are function-static. Which... holy crap, that's dumb.

(This is apparently a long-standing feature of Python, not something new. I only just learned of it.)

grmpyprogrammer, to random
@grmpyprogrammer@phpc.social avatar

It’s Friday so once again, Ask Me Anything.

Crell,
@Crell@phpc.social avatar

@grmpyprogrammer How much longer before you give up on the trainwreck that is tech and become a farmer?

phpday, to php
@phpday@phpc.social avatar

⭐️ "Watch the clock" is Andreas Heigl's talk.
@heiglandreas is Solution-Provider

#phpday #phpday #PHP #conference

Crell, (edited )
@Crell@phpc.social avatar

@phpday ...Is @heiglandreas presenting in a kilt??

Crell,
@Crell@phpc.social avatar

@SenseException @phpday @heiglandreas I didn't even notice that! I was distracted by the unexpected Scottish.

Crell,
@Crell@phpc.social avatar

@MarkBaker @phpday @heiglandreas The one year I was there, it was sadly kilt-free.

Crell, to til
@Crell@phpc.social avatar

: @leanpub now lets you add a Mastodon account to your author profile. Neat! I've done so, and removed my Twitter account.

(While you're over there, buy my book. :-) )

https://leanpub.com/thinking-functionally-in-php

ZachWeinersmith, to random
@ZachWeinersmith@mastodon.social avatar

Weird question:

Why do you think so few artists attempt to create a magnum opus? It really seems most people who are good at something want to just keep making it in various forms, but don't try to make a single lasting great work, even when they're in a position to try.

As an example of what I mean, take Virgil who became well known for pastoral writing, but always had an eye on writing a national epic. A few people still read Georgics and Eclogues, but the Aeneid is the Opus.

Crell,
@Crell@phpc.social avatar

@ZachWeinersmith High-risk/high-reward. Your odds of producing an opus are about 1/100000. Your odds of producing lots of decent work that puts food on the table is 1/10.

menelion, to php
@menelion@dragonscave.space avatar

Dear community! Could someone with power please raise an RFC to make the strict parameter of the in_array() built-in function true by default? It's really annoying to remember putting true as the third parameter every time, and not doing it might potentially lead to weird bugs. Thanks!

Crell,
@Crell@phpc.social avatar

@menelion Even in v9, that change would break any existing in_array() call where the dev is relying on non-strict behavior. It's impossible to know how many hundreds of thousands of lines of code that is.

I'm a strict typing fan, so I have no use for false there. But IMO the answer is to move away from arrays and build a proper collection trio that is strict by default. (Sequence, Set, and Map, as separate things.)

CursiveHello, to random
@CursiveHello@bitbang.social avatar

What should I know before open-sourcing my program?

My goal is to improve it by letting people submit changes, and making it easier for me to ask for help. I would still make the final call on decisions.

(Blog posts welcome! Boost if you care. The program is @songpocket)

Crell,
@Crell@phpc.social avatar

@CursiveHello @songpocket The second worst thing that can happen is that no one uses it.

The actual worst thing that can happen is a whole lot of people use it, and start demanding support.

Crell,
@Crell@phpc.social avatar

@CursiveHello @songpocket If you actually want people to use it, treat it like a product, not a tool: Consider the experience of installing and using it the first time. How do they get from zero to "hey, cool!" in as little time as possible?

Crell,
@Crell@phpc.social avatar

@CursiveHello @songpocket Have a CoC. Enforce it from day 0. If someone objects to you having a CoC, they're being helpful as self-identifying as someone who will be a problem so you should ban them in advance.

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