@SenseException@phpc.social
@SenseException@phpc.social avatar

SenseException

@SenseException@phpc.social

Still being human even after over 20 years of coding. Speaker, advicer & complexity tamer. PHP, .NET, JS, Go, HR and more. Part of the Doctrine team.

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

localheinz, to random

Just published: Avoiding empty() in PHP.

https://localheinz.com/articles/2023/05/10/avoiding-empty-in-php/

SenseException,
@SenseException@phpc.social avatar

@localheinz Information like that needs to be repeated from time to time. There are always newcomers to PHP. 👍

ramsey, to random
@ramsey@phpc.social avatar

Problem: I have two DB tables, and I’m trying to select from the first table for records that do not exist in the second table. Over time, as I process each record, I’ll write to the 2nd table, and then those records will be excluded on subsequent queries.

Pretty standard stuff. The queries are easy to write, and there are several ways to write them (e.g. left join where is null, where not in subquery, where not exists subquery).

1/2

SenseException,
@SenseException@phpc.social avatar

@ramsey If there's a chance to update to MySQL 8 it would improve performance a bit or greatly. Without knowing query and schemas: What happens if you enforce that index that MySQL doesn't want to use? It's rare and non-existent on simple queries but sometimes does MySQL choose the wrong execution plan.

Schrank, to random German
@Schrank@phpc.social avatar

People answering support emails. Do you like it, if a customer replies to the last email with a "thank you" or are you annoyed, the damn ticket got open again? 😅

SenseException,
@SenseException@phpc.social avatar

@Schrank Closing a support ticket instead of letting it get auto-closed after some time is helpful too.

SenseException,
@SenseException@phpc.social avatar

@Schrank I referred to support tickets in general. If you can't close it as the creator of the ticket, then there isn't much you can do by yourself. Some ticket systems write reminder if the problem was solved.

SenseException, to random German
@SenseException@phpc.social avatar

The only career choice I'm (and many capable people are) allowed to. There's no punchline.

SenseException,
@SenseException@phpc.social avatar

@ralfwause The future is pretty bleak when you worked in the HR area and withnessed the choices companies made.

danluu, to random
@danluu@mastodon.social avatar

Interesting to see the rise of ChatGPT-enabled Github spam.

The screenshots below are from one account, but if you search a bit it's very easy to find other examples.

Github doesn't appear to be on top of this at all, e.g., the account mentioned in https://github.com/swarna1101/VeChain-Thor/issues/1 has been spamming repos since last year and hasn't been banned (I reported a bad account once and got no response and nothing happened and haven't bothered since).

I hope this message finds you well. I wanted to reach out to you regarding my recent pull request to your repository. I have made several improvements to the code, which I believe would benefit the project as a whole. Firstly, I have included unit tests, added try-catch blocks, and simplified the multimap-by function to enhance the code's reliability and prevent potential errors. I also have added docstrings to make the code more understandable and easier to navigate. Moreover, I have used a threaded ->> macro to simplify the code and replace the println statement with proper logging to improve the code's readability. Finally, I have enhanced the code's modularity and conciseness, making it more maintainable and easier to modify in the future. I believe that these changes would greatly improve the project's overall quality, and I would be honored if you could review my pull request and consider accepting it. Thank you for your time and consideration. ... tonsky Apr 3, 2023 Here you just delay printing warnings, adding extra data structure that’s passed between widths and its call site. That’s one more thing to keep in mind, which makes it harder to follow ... tonsky Apr 3, 2023 Giving name to #{"0" 0 1200} is good. I would’ve move it inside the function with let, though, to keep everything local ... tonsky Apr 3, 2023 I think java will fail and die on trying to open file anyway, giving you adequate enough exception. But the code remains simple ...
What is path-seq? Did you use ChatGPT to generate this path? ... Why would you suppress exception like this? It is kind of important ... ZoneId/UTC does not exist. Is this really ChatGPT? Have you even run this code? ... I did a review, but overall quality is very bad, sorry. Code uses non-existing functions, which indicates you didn’t even run it, and probably generated it with ChatGPT?
KennethCho-CKH commented Mar 25, 2023 I made several changes to improve the code: Defined constants for file names to make the code more maintainable. Used with statements to ensure files are closed properly when deleting them. Used pathlib consistently throughout the code for better readability and to avoid errors. Added comments to explain the purpose of the code and functions. Reformatted the code to comply with PEP 8 style guidelines for better readability. Moved the imports to the top of the file for better organization. It would be very helpful if you could test the code I write, as I am not entirely certain if everything is working as it should. ------ Nifury left a comment I can't find any with statement in the code 😂 ... It's necessary to add this path to ensure filescfg and _common are imported properly. ... - # We need to remove these files, or they'll end up in the zip files that will be generated. Member @Nifury Nifury Mar 25, 2023 I think this comment is pretty important. ...

SenseException,
@SenseException@phpc.social avatar

@danluu I get a 404 on that user profile so it got removed. A search for the title of the pr has no results. I wonder how the user was able to create a pr if this was a private repo.

SenseException,
@SenseException@phpc.social avatar

@danluu What's HN?

Flyingmana, to random
@Flyingmana@phpc.social avatar

anyone by chance knows which birds are still singing in the night?
like, its midnight and I still hear some birds here

SenseException,
@SenseException@phpc.social avatar

@Flyingmana Some birds who usually don't sing at night, but I don't know which species are involved. Humans being mostly silent at night and with a lot of light sources it is the best time to get heared and find a partner.

SenseException, to random German
@SenseException@phpc.social avatar

Symfony's KernelTestCase allows you to call non-public services over a special container that is created as service "test.service_container".

But weirdly enough one of the services is working that way but not the other. Both are in the same service file, none of them is explicitely labeled public. Cache was cleared. Using "test.service_container" directly didn't work either. Setting the service that fails the test to public works. 😞

carnage4life, to random
@carnage4life@mas.to avatar

I had to explain to someone today that the blue check is Twitter’s MAGA hat.

SenseException,
@SenseException@phpc.social avatar

@carnage4life "I never bought that hat." Tweets appeared.

SenseException, to random German
@SenseException@phpc.social avatar

Got my train tickets to in Verona. I have to prepare something for the travel.

SenseException,
@SenseException@phpc.social avatar

It's my first time being in the north of Italy for longer than 2 hours. There were no bigger stops in my childhood when we travelled to the south to visit the family. I won't see much of Verona though.

ocramius, to random
@ocramius@mastodon.social avatar

Why put production secrets in a vault, when Confluence can hide them more efficiently?

SenseException,
@SenseException@phpc.social avatar

@heiglandreas @ocramius When you're not looking for them, then you will find them.

LadyDragonfly, to random

"Welcome to our gander reveal party!"

"Don't you mean..."

"No."

Geese emerge from everywhere. There are no fireworks. Only geese. There are no balloons. Only chaos. There are no genders. Only honk.

SenseException,
@SenseException@phpc.social avatar

@LadyDragonfly This is generic bird stuff. Birds are chaos.

SenseException, to random German
@SenseException@phpc.social avatar

PHPDay will probably be my last international event where I'll participate as a speaker for a while. I dislike long travels even though it's great to visit new places.

SenseException, to programming German
@SenseException@phpc.social avatar

Don't export in that shouldn't be accessible. You can find unused exports with ts-unused-exports.
https://github.com/pzavolinsky/ts-unused-exports

mirjam_diala, to random German
@mirjam_diala@hachyderm.io avatar

Got scolded - pretty loudly - by one of the blackbirds that hang around here because I need to refill the bird feeder.

Rude!!

Also, I love them 🥹

SenseException,
@SenseException@phpc.social avatar

@mirjam_diala That's a daily routine for a bird.

rowan_m, to random
@rowan_m@mastodon.social avatar

I typo'ed "node" and… what exactly have all of you been up to? 🤨

SenseException,
@SenseException@phpc.social avatar

@rowan_m nudejs is a thing.

grmpyprogrammer, to random
@grmpyprogrammer@phpc.social avatar

I used to think I could make a good living as a consultant helping companies fix their PHP code and wrap tests around things and in the process help them get shit done faster.

How naive.

SenseException,
@SenseException@phpc.social avatar

@grmpyprogrammer Theoretically.

SenseException,
@SenseException@phpc.social avatar

@grmpyprogrammer Sounds like it doesn't make sense to become a consultant without friends.

jef, to random
@jef@mastodon.social avatar

May the Fourth be with you!

SenseException,
@SenseException@phpc.social avatar

@jef "You can't take the force from me, Jim."

heiglandreas, to random
@heiglandreas@phpc.social avatar

German is weird. But I think other languages as well...

I mean... Usually you can add a questionmark after a sentence or even a word...

Though it looks like that doesn't work with "coffee"....

I mean...

how can that ever be a question!

SenseException,
@SenseException@phpc.social avatar

@heiglandreas A shortcut for "Where's the coffee?" or "Do we have coffee?"

SenseException,
@SenseException@phpc.social avatar

@heiglandreas When someone addresses me with "coffee?" I'd answer "No, I'm Claudio."

If I get the question "coffee?" While someone is showing me a cup of coffee, I'd answer "I know".

Just like in the Zucker, Abrahams and Zucker movies. 😄

SenseException, to random German
@SenseException@phpc.social avatar

Does it make sense to participate at UGs or unconfs when you can see those talks at conferences?

Absolutely! While UGs also have time boundaries, they're not set as hard in stone as conferences do. Talks develop at UGs which is why you see some slides/knowledge that won't make it into the ones at conferences. There's also the possibility that some talks get altered just for the event like my ORM/SQL one that covered other languages than PHP at @unKonf in 2019.

SenseException,
@SenseException@phpc.social avatar

@gazebo_c @unKonf User Groups. A local community having the same or similar interests and meet to talk about their experiences or new learnings. Mostly having one or two talks like at conferences.

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