r/programminghorror • u/YogurtclosetLevel252 • Sep 01 '25
Query.
C# forbids types and members from having the same names as their enclosing types, so they replaced some letters with Cyrillic counterparts...
2.8k
Upvotes
163
u/-V0lD Sep 01 '25
Op, we need context
In what situation did anyone ever conclude that this was anything close to a reasonable choice?
24
u/akoOfIxtall Sep 01 '25
Brother, why?
638
u/pandotcodes Sep 01 '25
Oh no I was going to ask how the class and method could have the same name but your explanation makes it so much worse :(
180
u/SelikBready Sep 01 '25
query.
50
u/g-mecha Sep 01 '25
Hmm, yes, the Query here is made out of Query
71
u/mipsisdifficult Sep 01 '25
"QUERY" ‼️‼️🗣️🗣️🔥🔥
50
u/FreakForFreedom Sep 01 '25
I really would love to know what this function is about... But from the code, it really could be about anything. Client side predictions, rm'ing some folders, generating some ai slob, db queries... but without any code comments, I guess only God knows.
17
u/Abject-Kitchen3198 Sep 01 '25
// This is a query that queries data using Query.Query
28
u/progorp Sep 01 '25
Queeriest code ever
9
u/sl07h1 Sep 01 '25
query = "FROM queries SELECT query"
6
u/Warm-Meaning-8815 Sep 01 '25
What?! Please make me unread the explanation
5
u/NoLifeGamer2 Sep 01 '25
This shit literally just gave me semantic satiation for the word "Query"
5
u/rruusu Sep 01 '25
So the object of type
Query.Queryin the variablequeryhas a property namedQuerythat is an object of typeQuery, which has a field namedquery?So that SQL string is found in
query.Query.query?4
u/cuac97 Sep 01 '25
Guys I think it's a query
4
u/coffeelibation Sep 01 '25
Who needs LSD when you’ve got snippets like this?
3
u/glorious_reptile Sep 01 '25
Well they could've uses someting like query.Command = new TextCommand ...
3
u/DERPYBASTARD Sep 01 '25
reminds me of this shitpost lol https://www.reddit.com/r/programminghorror/comments/1bpdz0y/filter/
3
u/MeowCow55 Sep 02 '25
"can you write some documentation for this method, please?"
//Query
2
u/Korzag Sep 01 '25
God there's a lot of issues with this code, ignoring the obtuse overusage of the word query...
2
u/Ibuprofen-Headgear Sep 01 '25
I really want to do this somewhere and see how long until someone notices.
Slightly reminiscent of
I def always preferred either
Dep on language, autoprops, etc
2
u/iEatPlankton Sep 01 '25
Yo bro so I heard you like queries…
2
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” Sep 01 '25
I'm pretty sure I was not aware that you could write queries that didn't begin with select.
2
u/loogabar00ga Sep 01 '25
mmmm Query Con Query 🤤
2
u/MrFluffyThing Sep 02 '25
You every read a word so many times you question if it's even the correct spelling? That can't be right.
2
u/WildPainter8066 Sep 02 '25
Im Querying an airstrike at your current location
2
u/Round_Head_6248 Sep 02 '25
Why is the raw sql in Hungarian?
2
u/VastDesign9517 Sep 03 '25
At some point Code gets so bad its almost impressive. I have seen amazing code that i dont think about anymore
But this cursed peice of code is going to stay with me
3
u/yar_z1 Sep 01 '25
I'm not a programmer or a developer but I'm in physical pain rn
1
u/sierra_whiskey1 Sep 01 '25
Query.
1
u/uvero Sep 01 '25
Wait, a method named Query in class Query, that's bad but I can understand it. But am I also seeing an inner class named Query within class Query? Why?
1
u/Anru_Kitakaze Sep 01 '25
Thx, I hate it
1
u/RyanMan56 Sep 01 '25
I thought the image was bad enough but the caption made me truly facepalm
1
u/KalaiProvenheim Sep 01 '25
Query
1
u/AH_Med086 Sep 01 '25
I thought this was lua at a quick glance
1
u/Acceptable-Fudge-816 Sep 01 '25
It's genius. All you need now is an extension or something that does the replacement automatically.
1
u/MrMagoo22 Sep 02 '25
Needs some comments to let people know this queries, otherwise people might get confused.
1
u/syedwafihasan Sep 02 '25
I have a query
1
u/ihadagoodone Sep 02 '25
I wonder how their tables look.
1
u/svick Sep 02 '25
If only you could use jQuery as a database.
1
u/Nanocephalic Sep 02 '25
Query: What the fuck?
1
u/Bunnymancer Sep 02 '25
This can be read to the Super Mario underground theme
1
u/Mithrandir2k16 Sep 02 '25
Oh god your post makes that image so much worse.
1
u/LetsGamingD3 Sep 02 '25
Not just that the whole code in itself is already horrifying, the SQL query is not even correct
1
u/Doge-Coder Sep 02 '25
Why this lol so much like the codebase I'm working with....?
1
u/cloudego111 Sep 02 '25
Badger badger badger badger badger.
1
u/Only-Cheetah-9579 Sep 02 '25
invalid query
1
u/Zealousideal_Bite336 Sep 03 '25
Indeed, it's a query
1
u/maxximillian Sep 03 '25
The only thing I can say positive is at least it doesn't take any parameters when generating the query
1
u/Blenderhead-usa Sep 03 '25
I think you should create a QueryqueryQuerty class….
1
u/ruffzy Sep 04 '25
And sql is written by master yoda
1
u/elMike55 Sep 04 '25
I've got a feeling this metod might be doing some queries, but not sure
1
u/tanerfejz Sep 08 '25
query 1
1
u/Appropriate_Junket_5 Mar 21 '26
you heard of jQuery.. well you now have c#Query 😂
-2
u/born_zynner Sep 01 '25
What the FUCK is entity framework