this post was submitted on 15 Jul 2023
1226 points (98.9% liked)

Programmer Humor

19551 readers
1067 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] VanillaGorilla@kbin.social 12 points 1 year ago (3 children)

Don't forget the repository methods! getAllByTenantAndActiveAndCreatedAfterAndFirstNameContainsOrderByLastName

[–] victron@lemmy.world 2 points 1 year ago (1 children)
[–] VanillaGorilla@kbin.social 2 points 1 year ago

But the stakeholders said they needed two new filter criteria!

[–] Von_Broheim@programming.dev 2 points 1 year ago (1 children)

Yeah that can get ugly but it's still better than writing native queries because you know it's gonna automatically translate to any db specific sql flavour.

When they get a bit too long and ugly I either write default methods using specifications or I create a more concisely named default method that wraps the verbose monster.

[–] VanillaGorilla@kbin.social 3 points 1 year ago* (last edited 1 year ago)

Or you could rename your fields to single characters! getAllByAAndBOrderByC

Now I feel dirty...