I didn't use VS for quite a long time, but doesn't it highlight unnecessary parentheses with gray color? Rider does it, and I could vaguely remember something like that in VS too.
There's a difference between syntactically unnecessary parenthesis, and semantically unnecessary ones. I think FlashSFW is referring to the latter. I agree.
Depends how you setup resharper/Rider it migth be addinh ridiculous amount of braces for long bool operations.
There's a setting where you can list when the order is not obvious, and you can set it so that Rider inserts brace between every bool operator, or at least much more than are striclty necessary.
I can't move any data from my work machine to anywhere, and that includes screenshots. If the OP was in the same boat, it makes sense to take a picture.
Worked on a project where every SQL query returned a datatable from where they got data, and where random data was arbitrarily converted to datatables to pass as arguments to stored procedures. It was painful to read that code
I don't know how "old school" you mean, but you would use .net data contracts to fill-in your class-based data models from a sql query to make things significantly easier to work with.
Very old school, like OG .net 1 and 2. In v1 there were no generics and generic lists which are basically required for an a plug and play ORM to work, so you either wrote your own for your data or made a giant mess of things.
I've worked on codes based going back to the mid 00s, a few data tables came up but damn near everything was direct mapping to a class via auto mapper and entity framework
I worked with a legacy code base where the only known data structure was DataSet. Fuck, this is not even a general-purpose data structure but it was used instead of arrays, dictionaries, objects...
You're supposed to give a descriptive name in the context of the function so unless it's a very low level generic function it should reference the kind of data that will be stored : apples, students, clientInfos, etc.
Your example is bad because you commented what it was doing which is obvious from context and you included an extra declaration and assignment that provides no further context.
Nothing wrong with a class that just has helper functions to glue other pieces of code together.
Also: I'm no saying it should have like 20, 100, or some ridiculous number of methods. Mine has 5 and they are mostly string manipulation and 1 for registry checks.
29
u/NotQuiteLoona May 06 '26
I'm afraid of imagining how a full line would look.
71
u/FlashSFW May 06 '26
I'm willing to assume those are not necessary
21
u/darthgoat May 06 '26
My condolences to anyone maintaining whatever fresh hells are in that codebase.
12
u/SohilAhmed07 May 06 '26
DataTable is real horror here.
10
u/Atulin May 06 '26
The guy working on it yearns for Lisp
6
u/Lone_Coating May 06 '26
There’s a pot of bugs at the end of the rainbow
11
u/dyvotvir May 06 '26
Alright, enough Reddit for today
4
u/jakubiszon May 06 '26
clsArchCmnFncs - someone just kept hitting the keyboard with their head to come up with variable names.
4
u/chocolateAbuser May 06 '26
cmnfncs to you too 🌈
4
u/zigs May 06 '26
Common lisp in reverse-reverse polish notation
3
u/LordYeahNah May 06 '26
I'm going to remove my eyeballs now
2
u/Weary-Dealer4371 May 06 '26
And of course it near something to do with dates.
Very on brand
2
u/TheDevilsAdvokaat May 06 '26
Oh hell no. I don't think I've ever had more than about six nested parentheses.
2
u/efferkah May 06 '26
I feel like this should be illegal.
2
u/Dragonfire555 May 06 '26
Dear lord
2
u/RagoonMannn May 07 '26
When the new dev sees this in the codebase https://www.youtube.com/watch?v=dpIS4RelIo8
2
u/mark_likes_tabletop May 07 '26
Oh, no. Oh, no no no no no. No.
3
u/akoOfIxtall May 06 '26
Goddamn onion, it's THICC
1
u/TritiumNZlol May 06 '26
What a horrible day to have eyes.
lmao this is great. I'm going to print this photo out and put it next to my desk when i need a laugh.
1
u/GOPbIHbI4 May 06 '26
Just check the number of open braces on the previous line. Compared to that even nulling the datatable seems not that much of a deal :)
1
u/JustGabriel May 06 '26
Double rainbow all the way
1
u/occamsrzor May 06 '26
Disgusting. The braces have lines all to themselves. It's like you're trying to back the line count for a book report due tomorrow.
1
u/mustang__1 May 06 '26
oh god
1
u/RedJelly27 May 07 '26
So magical 🌈
1
u/Lord_Pinhead May 08 '26
At least it's pleading to your eyes lol
1
u/BigDukaDuka May 11 '26
Are we Lisp now?
(nil)
1
u/041Da May 18 '26
これは書いた本人でさえも分からないものになっているだろう。解読をしている間に赤ちゃんが学校に通いだしているに違いない!
1
u/potatoworldguy2 Jun 01 '26
oh my god
1
u/godzilla184 Jun 04 '26
I don't even want to think about what that entire line looks like ...and 46ms you'll never get back 😂
1
u/Stevoman May 06 '26
Why does it seem like Hungarian notation is always a dead giveaway that a code base is going to be a train wreck?
1
u/unholy453 May 06 '26
Someone doesn’t understand core principles of programming at all…
1
u/Bluehawk2008 May 06 '26
Screenshot key broken
0
u/OutlandishnessFar56 May 06 '26
FFFFFF
-1
u/jcradio May 06 '26
Gives me nightmares of codebases I've seen with over 200 else ifs.
0
u/[deleted] May 06 '26
[deleted] — view deleted comment
112
u/[deleted] May 06 '26
[removed] — view removed comment