@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.

ntha, to php
@ntha@mastodon.social avatar

Re: Primitive Obsession (https://acairns.co.uk/posts/primitive-obsession)

I like the idea, but has anybody performance tested this? What happens when you're dealing with thousands of rows of data that pass every item along as class instants vs primitive types?

Crell,
@Crell@phpc.social avatar

@ntha Unless you're dealing with very large datasets, the cost of the SQL query to load it will be vastly more than the cost of making an object.

ramsey, to php
@ramsey@phpc.social avatar

Opinions/thoughts/advice on #PHP monorepos with #Composer. Is anyone working within this problem space? What tools do you use?

I know #Symfony is a #monorepo. Are the tools they use specific to them, or can others use them?

Crell,
@Crell@phpc.social avatar

@ramsey Symfony uses a custom Go tool to do their repo split, IIRC. That's the only way I'd even consider a monorepo.

Crell, to ai
@Crell@phpc.social avatar

Google's search is about as accurate as usual, I see...

Crell, to random
@Crell@phpc.social avatar

"It's a DTO so it shouldn't have methods, just data" is an excellent way to end up with procedural spaghetti with a class keyword floating around.

It certainly won't get you a good codebase, that's for sure.

Crell,
@Crell@phpc.social avatar

@SenseException Not basic anemic. (No one can agree on what those mean, either.) But hard core full on thou shalt not have methods or behavior on dumb carrier objects.

I just spent an entire day teaching a junior how not doing that leads to vastly simpler code.

Crell, to random
@Crell@phpc.social avatar

When people complain about #OOP being just an over-engineered mess of indirection, they don't mean OOP. Just the Java ecosystem. #FFS

Crell,
@Crell@phpc.social avatar

@maxalmonte14 Yeah, what that sounds like is bring pushed back on is over engineered OOP.

Crell,
@Crell@phpc.social avatar

@calinpristavu @maxalmonte14 OOP that's build in a functional way rather than a procedural way.

Crell, to random
@Crell@phpc.social avatar

The one and only thing I like about Macs is that they're not Windows. Other than that, I despise these things. The UI has always been awful.

Crell,
@Crell@phpc.social avatar

@ntha I just want to be able to switch between windows without bringing the entire app to the foreground. Like, switch between my browser and IDE without all my browser windows coming up and covering the IDE. Like, this is basics. Mac has been wrong about this for 40 fucking years. And they refuse to admit it.

Crell, to random
@Crell@phpc.social avatar

"Imagine if Congress was elected by proportional representation"

Structural problems require structural fixes.

https://democracysos.substack.com/p/imagine-if-congress-was-elected-by

bart, to random
@bart@moth.social avatar

Seriously pissed about this. Offering $10,000 in seed funding for a Deviant Art alternative built on ActivityPub. Q&A below or email your pitch to info@moth.social. https://slate.com/technology/2024/05/deviantart-what-happened-ai-decline-lawsuit-stability.html

Crell,
@Crell@phpc.social avatar

@derickr @MisterMoo @bart What's the meaningful difference? (Really, I've almost never used either.)

Crell,
@Crell@phpc.social avatar

@zeruch @derickr @MisterMoo @bart That doesn't tell me much...

Crell, to random
@Crell@phpc.social avatar

I hate mocking libraries...

Crell,
@Crell@phpc.social avatar

@psycodepath Exactly the problem. They create inscrutable tests, and are a crutch to support sloppy code.

Crell,
@Crell@phpc.social avatar
Crell, to random
@Crell@phpc.social avatar
grmpyprogrammer, to random
@grmpyprogrammer@phpc.social avatar

This past week I had a problem at DayJob that would’ve been easier to solve if we had adopted the use of repositories that create immutable value objects. Since this is a Laravel project, I was overruled. My first implementation ended up being wrong (found out via production testing) and the fix ended up involving Eloquent mutators.

I still think value objects are the better solution but my boss both disagrees and trolls me about it.

Crell,
@Crell@phpc.social avatar

@grmpyprogrammer You're right. Laravel is wrong. The boss needs to learn this.

Crell,
@Crell@phpc.social avatar

@SenseException @scottkeckwarren @ramsey @grmpyprogrammer That is most code review these days...

maxalmonte14, to random
@maxalmonte14@indiehackers.social avatar

So many "democracies" have been reduced to choosing the lesser of two evils. In many cases (stupid) people are even blatantly deceived to pick the worst of those two evils — I bet you can think of a couple of examples yourself — so needless to say, this shit ain't working.

Crell,
@Crell@phpc.social avatar

@maxalmonte14 Democracy is the absolute worst form of government, except for all the others.

(Churchill, supposedly.)

Crell,
@Crell@phpc.social avatar

@maxalmonte14 The main alternatives are monarchy and oligarchy. Democracy seems better.

Democracy's main weakness is its tendency to devolve into the other two rather readily.

Crell,
@Crell@phpc.social avatar

@maxalmonte14 Socialism is an economic system, not political system. People forget that.

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

@tress777 I'm not assuming. I'm quoting. The GOP has been very open about opposing various deals just to avoid giving Biden a "win". Trump has specifically told them to, in public. Trump is also well documented as being compromised by Putin, so there's the potential treason, too.

Meanwhile, Russia continues to commit war crimes and genocide in Ukraine, daily.

Crell,
@Crell@phpc.social avatar

@tress777 As for "keeping the politics off the platform," no.

We're whole people. Dismissing concerns about injustice because you're not interested in them is a sign that you don't care about injustice. The tech world especially desperately needs to understand and care about injustice, especially the injustice it actively causes. "Tech without politics" is the politics of exploitation.

If you can't handle me at my political, you don't deserve me at my technical.

Crell,
@Crell@phpc.social avatar

@tress777 Also, I'm a Free Software advocate. That's tech and political, by definition.

https://peakd.com/programming/@crell/free-software-is-political

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