@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 random
@Crell@phpc.social avatar

Top ten bits of advice for new conference speakers.

https://peakd.com/php/@crell/advice-for-new-speakers

Crell, to Software
@Crell@phpc.social avatar

Always remember the P7 rule:

Proper Prior Planning Prevents Piss Poor Performance.

#Software #Programming #Design #OOP

sirber, to php
@sirber@fosstodon.org avatar

I'm starting a 22h course on C#.
outside is dying...

Crell,
@Crell@phpc.social avatar

@maxalmonte14 @sirber @Skoop I miss PHP every day I have to deal with Spring Boot, JPA, Hibernate, and that whole cluster*.

Crell, to Kotlin
@Crell@phpc.social avatar

Having tasted extension functions in , I really really want them in . I am not sure how that would be even feasible, though. 😞

Crell,
@Crell@phpc.social avatar

@ralphschindler I mean without 15 layers of undebuggable indirection involved. 😛 And natively supported by the language.

Crell,
@Crell@phpc.social avatar

@maxalmonte14 Where I'm seeing them in Kotlin is for converting objects of type A to type B. That code often makes little sense "in" either class, but extension functions let it live externally without a whole new class hierarchy to think about.

Crell,
@Crell@phpc.social avatar

@henrikjernevad @maxalmonte14 The alternative is Elixir-style pipes, which auto-close for multiparameter functions. I quite like it, but that's probably even less familiar for a lot of people.

Crell,
@Crell@phpc.social avatar

@henrikjernevad @maxalmonte14 I still hold that the gap between those two is not as big as people think. :-)

Crell,
@Crell@phpc.social avatar

@henrikjernevad @maxalmonte14 Most of the guidelines for "good" OOP are borrowed straight from FP, with or without some twisting. Honestly a structurally typed language (Go or Rust) could, with the proper features, easily straddle both sides perfectly.

Crell, to random
@Crell@phpc.social avatar

Much science went into this, apparently...

https://www.tiktok.com/@jencapella/video/7365508189795683616

Crell, to random
@Crell@phpc.social avatar

No, goth lasagna is now its official name. I don't make the rules, I just eat them.

pwaring, to php
@pwaring@fosstodon.org avatar

Currently working on a rewrite of an old application (PHP 5.6, was probably written in an even earlier version) by building a new one in PHP 8.3 and migrating all the data across.

I don't usually recommend rewrites but occasionally it's more cost-effective than trying to fix really old code.

Even though I work with legacy code every day, the changes in 8.3 (and libraries that require it) make life so much nicer.

(I currently work with versions from 5.4 to 8.3)

Crell,
@Crell@phpc.social avatar

@pwaring Which changes in particular? 8.3 wasn't a particularly exciting release, especially compared to 8.0/8.1.

Crell,
@Crell@phpc.social avatar

@pwaring Got it. Yeah, the trio of attributes, constructor promotion, and named arguments coming all together in 8.0 was earth-shattering. Totally changed the story on what is "easy" or "natural" to do.

PHP just keeps getting better and better.

Crell, to random
@Crell@phpc.social avatar

How the rich are strangling Social Security.

https://youtu.be/GfZuB7XSFys

sirber, to php
@sirber@fosstodon.org avatar

What do you think of Codeigniter?

Crell,
@Crell@phpc.social avatar

@sirber The Laravel of the 2000s. That is not a complement.

OldGrumpyBitWrangler, to php
@OldGrumpyBitWrangler@mastodon.social avatar

An instance of a popular CMS is used for a website. While analyzing I'm coming across a a table in it's MySQL database where a column called "deleted" is defined as such:

deleted` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'A boolean indicating whether this data item has been deleted‘

🤦‍♂️

There should be a license allowing allowed to write software used by someone else. Like with drivers licenses it needs a points system for violations and license revocation.

Crell,
@Crell@phpc.social avatar

@OldGrumpyBitWrangler I have theories as to which CMS you're talking about... But I'll ask, what would you do instead? Isn't that the only way to do a boolean flag in MySQL, or have they fixed that more recently?

Crell,
@Crell@phpc.social avatar

@OldGrumpyBitWrangler OK, so your objection isn't to what the CMS is doing, just with their choice of database. Got it.

(I agree Postgres is the more robust option, but wasn't sure what issue you had with "deleted" flags. That's a common technique for that use case.)

Crell,
@Crell@phpc.social avatar

@OldGrumpyBitWrangler Yeah, using 4 there is an odd choice.

Crell,
@Crell@phpc.social avatar

@OldGrumpyBitWrangler In fairness, 95% of developers in my experience don't know what SQL is, other than "that thing backing my over-engineered ORM." The vast majority of implementations use SQL as a glorified card catalog or CSV file with indexes, for hydrating overly complex objects in the language of choice.

That's hardly specific to one ORM, language, or database.

enusbaum, to dotnet
@enusbaum@tootsmcgoots.io avatar

You know why PHP is still around? Because it's fucking simple.

The levels of abstraction in Web Frameworks like React/Angular or ASP.NET Core is a little silly. You have to navigate through 4-5 files of logic before you actually get to the rendering of a page.

PHP?

<?php echo "Hello World!"; ?>

If dotnet could give me a syntax and framework as simple as PHP, I think it'd dominate. Just one file (index.cs), not a zillion files and boilerplate.

Call it ASP.NET Min

Crell,
@Crell@phpc.social avatar

@enusbaum @b4ux1t3 @khalidabuhakmeh As someone transitioning from PHP to Kotlin/JVM, there is absolutely nothing in PHP that can come close to how grotesquely over-engineered Spring Boot and its various pieces are.

Crell, to random
@Crell@phpc.social avatar

@typo3blogs Looks like https://planet.typo3.org/ is offline?

Crell,
@Crell@phpc.social avatar

@supergarv Le Sigh. (Or Das Sigh, I guess?)

It was an RSS aggregator/repeater. The idea being anyone with a TYPO3 blog feed could get aggregated on the planet, then people could subscribe to just the one RSS feed to get everyone's blogs. If only typo3.com ever used it, then it wouldn't add anything, but the intent was for others to also feed into it.

"Planets" used to be a lot more common before the War on RSS began...

Crell,
@Crell@phpc.social avatar

@supergarv Keep an eye on https://planet-php.org/, which is kinda waining now but we're going to try and reboot it. Stay tuned.

Crell,
@Crell@phpc.social avatar

@supergarv We've discussed a little bit what Planet/Mastodon integration would look like. Right now I have no idea, but a simple repeater shouldn't be too hard, I think?

nyamsprod, to random
@nyamsprod@phpc.social avatar

@Crell I have a question ? https://github.com/thephpleague/csv/blob/master/src/Operator/Comparison.php I use an Enum in the case because to me the number of Comparison operator is finit BUT there is a case for using a class instead for better type hinting ? What do you think from a DX perspective ?

Crell,
@Crell@phpc.social avatar

@nyamsprod The constraints feel like an unbounded set from the looks of them, so I agree, classes are the better solution than enums in this case.

Crell, to random
@Crell@phpc.social avatar

My home town just voted overwhelmingly to adopt . It's the first city in Illinois to do so, but I don't expect it to be the last. We've been working on this for 2 years.

Whatever else happens tonight, this feels dammed good.

Crell,
@Crell@phpc.social avatar

@Phosphenes

For Illinois specific efforts: https://www.fairvoteillinois.org/ (I'm a board member.)

National orgs:
https://fairvote.org/
https://rankthevote.us/

Most states have a state level org at this point. Google for "Ranked Choice Voting $state" (for your state) and you should find one.

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