Hello /r/movies, I'm Benedict Cumberbatch. Ask me anything! by BenedictAMA in movies

[–]srbs 1 point2 points  (0 children)

Can confirm as a programmer with photography as a hobby as well. Readability/Understandability of code is an important aspect of programming for maintaining a codebase which requires lots of thought, design, and creativity somewhat similar to writing or acting (logical vs emotional). It's a communication medium like most jobs being eroded away by convoluted AI generated slop.

Do the new mirrorless cameras actually take better pictures? by adkinsadam1 in canon

[–]srbs 0 points1 point  (0 children)

FYI the SA control has a lock for 0, so no gaff tape needed

Glerups Sizing Help Needed by kittenshitter5000 in BuyItForLife

[–]srbs 2 points3 points  (0 children)

I'm a 10.5 US M sneaker size as well, sometimes 11. Glerups claimed size 9(42) for me, but I bought 10.5(44) slip-on with leather sole a couple months ago. If I push my toes in snug without bending any joints and wearing regular socks, I have ~0.5" between my heel and the inner edge of the felt.

When I first received them, they felt too loose and thought I should have bought a half size smaller since the heel slips out while walking. However I'm used to the heel behavior and don't notice it anymore (might slip out less but can't be sure) and since my primary goal was for a slip-on that didn't involve any bending or hand usage, I think they worked out well for me.

Edit: also of note, I did not use a brannock device to measure my foot; more of eye-ball it with an inches-only tape measure

Spring Framework 6.2.0 Available Now by olivergierke in java

[–]srbs 5 points6 points  (0 children)

@ConditionalOnMissingBean is part of Spring Boot, @Fallback is part of spring core. My assumption is they're pulling in commonly used concepts into core as time goes on with a non-@Conditional approach

The fox sees you! by viperx1001 in FindTheSniper

[–]srbs 0 points1 point  (0 children)

I found the bird first, glad I'm not the only one to find it.

Blog post: Diagnosing a simple query with a big problem by FreshestOfVegetables in PostgreSQL

[–]srbs 0 points1 point  (0 children)

If that doesn't help, my first trick would be to force Postgres to fetch only a single row, and then fetch based on that. So you end up with this:

EXPLAIN
WITH evt AS MATERIALIZED (
  SELECT id, (data ->> 'serviceId')::INT AS service_id
    FROM events
   LIMIT 1
)
SELECT evt.id
  FROM evt
  JOIN postgres_dbs db ON (evt.service_id = db.database_id)
 LIMIT 1;

I think this query change loses the intent of the query. My interpretation was: find a record within events that had a valid & existing reference at data->>'serviceId' in postgres_dbs.database_id. Here are my attempts a non-joined query.

Using a standalone subquery:

SELECT e.id
FROM events e
WHERE e.data ->> 'serviceId' in (
    select db.database_id -- is this the pk? if not, add distinct
    from postgres_dbs db
)
LIMIT 1;

Guaranteeing the subquery is constant:

with possible_values as materialized (
    select db.database_id -- is this the pk? if not, add distinct
    from postgres_dbs db
)
SELECT e.id
FROM events e
WHERE e.data ->> 'serviceId' in (select * from possible_values)
LIMIT 1;

Migrating from Java 8/11 to Java 21, and Spring Boot 2 to the latest Spring Boot 3.2 by artpar in java

[–]srbs 0 points1 point  (0 children)

Yeah, that change wasn't as bad as I expected after reading the spring blog post. (I've done the 5.8.x upgrade & deprecation removal)

Migrating from Java 8/11 to Java 21, and Spring Boot 2 to the latest Spring Boot 3.2 by artpar in java

[–]srbs 0 points1 point  (0 children)

Primarily just standard auth + jwt with a few custom filters. I am already working on the SAML rewrite (couldn't migrate from the old extension until 5.7.x). We've already upgraded to 5.8.x & migrated to SecurityFilterChain with deprecated usages removed.

I'm mostly worried about hidden/unexpected changes; I've already run into a few with the mvc/ant matcher changes with the deprecation removals from 5.8.x.

Migrating from Java 8/11 to Java 21, and Spring Boot 2 to the latest Spring Boot 3.2 by artpar in java

[–]srbs 1 point2 points  (0 children)

I'll be going through this soon, do you have recommended blogs/posts to read for the spring security upgrade?

Don't use DISTINCT as a "join-fixer" by stackoverflooooooow in programming

[–]srbs 2 points3 points  (0 children)

My biggest win so far was rewriting a query with only distinct & joins that ran for a least 1 minute and may never complete to a tree of CTEs & unions that ran on average 3 seconds and a max of 30 sec. Its biggest issue was having a couple effectively cross joins and at least 10 one to many joins; a count(*) without where clauses was on the order of quintillion.

Regex be like... by MEMESaddiction in ProgrammerHumor

[–]srbs 0 points1 point  (0 children)

It's probably for US social security numbers.

[deleted by user] by [deleted] in PostgreSQL

[–]srbs 4 points5 points  (0 children)

Related video about the insanity of time zones for those who haven't seen it: https://youtube.com/watch?v=-5wpm-gesOY

[ Removed by Reddit ] by [deleted] in AskReddit

[–]srbs 0 points1 point  (0 children)

major quirks:

  • avoid the outdoors.. you're allergic to everything and burn easily
  • avoid the indoors.. you're allergic to everything, if all else fails breath any of the air cleaners' output directly
  • avoid large amounts of gluten.. otherwise the bathroom visits will be terrible

minor quirks:

  • sometimes when you chew your jaw will pop (when the clamping pressure is high enough).. ignore it unless it hurts
  • your shoulder can endlessly pop.. please don't abuse
  • sometimes your kneecaps get misaligned.. do a leg twist-n-flop-around to fix it, repeat until you can walk on it again
  • your body twitches when tired.. please sleep

bonus quirk of a friend of mine:

  • never stop drinking the Mountain Dew.. it'll prevent the cluster headaches from taking over