@chrastecky@phpc.social avatar

chrastecky

@chrastecky@phpc.social

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

chrastecky, to RegEx
@chrastecky@phpc.social avatar

Lo and behold, fellow mortals of the programmer variety! I find myself embarking upon a most arduous quest.

One that shall test the mettle of my coding prowess... Yes, thee heard right.

I dare to dance with the elusive and powerful entity known as... the #regex #email #validation!

chrastecky,
@chrastecky@phpc.social avatar

@heiglandreas Sure, that's the theory. But string like "hello there!" is not a valid email and I see no reason to send an email to "hello there!".

And the most important thing - the client who pays for this thinks so as well.

ramsey, to Matrix
@ramsey@phpc.social avatar

It’s so difficult (and expensive) to run a #Matrix #Synapse server for my own domain. Is it worth it?

I started out wanting to support Matrix, and I've set up a number of channels for my community on Matrix, but everything happens on Discord and IRC right now, and we have a bridge between Discord and IRC, but we can't bridge to Matrix at the moment, so is it even worth it to keep maintaining a separate Matrix presence?

If not, I’m just gonna shut it down. I don’t want to spend the money.

chrastecky,
@chrastecky@phpc.social avatar

@ramsey What struggles are you facing? I'm running my own and everything's fine. And what's the problem with bridging Discord? I'm doing that as well and it works fine.

tjventurini, to random
@tjventurini@mastodon.social avatar

VS Code or PHPStorm? 🤔

chrastecky,
@chrastecky@phpc.social avatar

@outofcontrol @tjventurini PHPStorm for everything PHP related, VS code is more configuring than coding.

sarah, to php
@sarah@phpc.social avatar

I have a FREE book on object-oriented programming available for you to download and enjoy. It's my way of giving back to the community. Check it out: https://masteringobjectorientedphp.com

chrastecky,
@chrastecky@phpc.social avatar

@sarah Giving back by harvesting personal data, what a great way to do that!

matdevdug, to ai
@matdevdug@c.im avatar

One thing that’s funny about and is I keep hearing the same thing. “Oh I use it for generic snippets, just common tasks and functions”.

The amusing thing about that is when I first started working with a app years ago there was already a solution to that problem. It was called “the PHP Cookbook” published by O’Reilly. I was told “oh we buy you a PDF copy and you just search for whatever you are trying to do and use that code. It saves a ton of time for junior programmers.”

Not only was it true, it did save me a ton of time and headaches, but we didn’t need to steal anything. The authors got paid, it worked offline, it didn’t require scraping the entirety of human knowledge to write or nuclear power plants worth of energy to distribute.

It also helped me learn. Since I would have a solid foundation to the solution, I felt more confident experimenting. I always had a known-functioning standard library solution as my base. So when something broke I knew where to start debugging.

Just an incredible thought that instead of paying $20 for a pdf once we decided this was the way to go.

chrastecky,
@chrastecky@phpc.social avatar

@matdevdug I mean, pretending that CTRL+F and an AI are somewhat equivalent is not the argument you wanna be making.

Sure, reading a book and learning stuff is good and everyone should do it. But some problems are really specific and no book will have an example that you can find within few minutes.

thomastospace, to rust
@thomastospace@phpc.social avatar

I'm learning some the last couple of days, mostly since it looked very complicated to me.

First thing I'm learning: All variables are immutable by default.

I'm a very happy programmer right now.

chrastecky,
@chrastecky@phpc.social avatar

@thomastospace That would probably help with the dirty feeling I have whenever I reuse a variable.

preinheimer, to random
@preinheimer@phpc.social avatar

I didn't realize it until I came upon it in a podcast.

I view people calling twitter "X" without mentioning its former name a negative signal for how much I want to interact with that person.

chrastecky,
@chrastecky@phpc.social avatar

@preinheimer I dislike that egoistic piece of shit who bought Twitter as much as any sane person, but forever clinging to the name Twitter when it has clearly been renamed is more of a negative signal to me.

Though it's tolerable now, since that idiot hasn't changed the URL yet.

jdecool, to php
@jdecool@phpc.social avatar
chrastecky,
@chrastecky@phpc.social avatar

@jdecool Some would even argue it never did and it was always a great language for its use-case. Titles like this suck, though.

maegul, to fediverse
@maegul@hachyderm.io avatar

Lemmy is experimenting with plugins.

https://lemmy.ml/post/15187879

Still in experimental prototyping stages it seems, but cool to see. Hope it gets worked on and works out well.

Could be an interesting experiment for the Fedi in general?

It’s using rust’s extism, so webaasembly for plugins.

#fediverse #lemmy #rust #extism

chrastecky,
@chrastecky@phpc.social avatar

@maegul While nice to have it natively, the current proposal is seriously lacking. I've been using my own LemmyWebhook package and unless they seriously rework the proposal, it's gonna be the winner when it comes to capabilities.

Though I'm looking forward to actually deprecating it in favor of a native solution, if that time comes.

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

Good grief I hate nulls...

chrastecky,
@chrastecky@phpc.social avatar

@Crell Why? Nulls are really great.

chrastecky,
@chrastecky@phpc.social avatar

@argv_minus_one @Crell In PHP not everything can be null, null is its own type in the engine, thus it needs to be specifically allowed in the signature.

chrastecky,
@chrastecky@phpc.social avatar

@Crell @argv_minus_one That IMO really depends on your design, nullable type is very helpful if used correctly.

Having to pass null around throughout the whole application does not sound like a good design.

Enums are great, but I don't feel like those and nulls are really interchangeable.

chrastecky,
@chrastecky@phpc.social avatar

@Crell @argv_minus_one Well, I've read it, I still disagree and think nulls are still valid. Of course, enums are great, but as I said, they have different use-cases. Some of them overlap, but fundamentally, nulls and enums are not interchangeable.

regis, to random
@regis@phpc.social avatar

I have a confession: Windows 11 is actually... surprisingly... very very nice.

For the price of a very beefy Macbook Pro, and the third of a price of a Mac Pro, I have an insanely fast machine with an insane CPU, an insanely fast GPU, more RAM than I'll ever need, an SSD 3x times faster than Mac top of the line.

And now, an OS that is really, really nice.
How come I didn't see that?

chrastecky,
@chrastecky@phpc.social avatar

@regis And you've got some spying for free! Seriously, the amount of spying in Windows 10 and 11 is ridiculous.

While I agree that Windows 11 is indeed nice to look at and work with, I'm not touching that with a 10 meter pole because of all the shit they do.

If your hardware supports Linux without any hiccups, you can install some modern distro and you'd be surprised how much faster your laptop/desktop is.

hennell, to ai
@hennell@phpc.social avatar

Reading about people who had chat GPT parsing errors yesterday/today because prod data contains invalid dates 🤣
aifail

chrastecky,
@chrastecky@phpc.social avatar

@heiglandreas @hennell Not "in a", but "in that leap year". Like, it somehow decided that no, this leap year is not leap.

chrastecky,
@chrastecky@phpc.social avatar

@heiglandreas @hennell 2000 was a full blown leap year as well, it's divisible by 400.

steamdeckhq, to Steamdeck
@steamdeckhq@mastodon.world avatar

We are working on our official subreddit to create a place for the community to share news, ask questions, post about your performance findings, and interact with us. Come join us as we get it up and running!

https://www.reddit.com/r/steamdeckhq/?utm_source=dlvr.it&utm_medium=mastodon

chrastecky,
@chrastecky@phpc.social avatar

@steamdeckhq How about a Lemmy community, since you're on the Fediverse already?

thomastospace, to php
@thomastospace@phpc.social avatar

I need some #PHP feedback on a test implementation of jwt token auth:

JWT tokens are valid forever, however we would like to invalidate all tokens when a user changes their password.

We've solved this by saving a random value at the user, and storing this in the token. Whenever the token is used, we check if this is the same. When a password gets changed, we also change this value, which then makes all old tokens invalid because they don't contain this value.

How does this sound to you?

chrastecky,
@chrastecky@phpc.social avatar

@thomastospace Not a bad solution.

ramsey, to random
@ramsey@phpc.social avatar

“Please complete this survey on a laptop or desktop. Some questions may not function properly on mobile devices.”

That’s a good way to ensure I don’t take your survey, since I’m probably only going to take it when I’m staring at my phone, trying to kill time somewhere.

chrastecky,
@chrastecky@phpc.social avatar

@ramsey @sashag Done the survey and honestly can't see it working well without a computer.

baldur, to random
@baldur@toot.cafe avatar

The problem with “people should stop complaining about OSS maintainers getting paid”takes is our economic system. It is biased towards value extraction and promotes harmful behaviour

It’s rational to be sceptical about commercialisation. Experience has told us that, wthout obvious safeguards in place or a business model that’s directly and reliably complementary to the project in question, “hey I got money” is usually bad news in FLOSS

chrastecky,
@chrastecky@phpc.social avatar

@baldur I think it really depends on people involved. I was approached to make one of my libraries an official one for the commercial project and get paid to develop it.

So I'm still maintaining the same project I created and in addition I get paid to do it. I also get an additional exposure for it because it's official. Getting paid is not the problem, people are.

chrastecky, to 3DPrinting
@chrastecky@phpc.social avatar
chrastecky,
@chrastecky@phpc.social avatar

@4lan Nice! Though not my cup of tea, I prefer open source. Where can you get the controllers for $30? Might get some spare ones.

chrastecky,
@chrastecky@phpc.social avatar

@4lan Nothing in EU as far as I can find :/

chrastecky, to fediverse
@chrastecky@phpc.social avatar

Anyone here on using ? The communities there are pretty much dead, which sucks, I was kinda hoping it woule become the Reddit replacement.

chrastecky,
@chrastecky@phpc.social avatar

@strypey I did, but they seemed dead the last time I did. Sadly, nothing replaced r/php for me yet, that's probably the only thing that I miss from Reddit.

chrastecky,
@chrastecky@phpc.social avatar

@strypey It's a weird trend with php itself, r/php is kinda the exception, not the rule. Every php forum (or similar) ever eventually devolved into extreme newbies asking the same stuff over and over (think on the level of "how to do a for loop").

As far as I know, r/php is the only place if you're a professional and want to talk with other professionals.

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