Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Shite code = pressured work || lack of knowledge. There may be more reasons but I am actually wondering what caused this mess 🤔
-
@pacjent3444 in this Case, I would say it was lack of knowledge. Doing the correct way would be faster
-
Why are there break statements if you are just going to return. Why not just return?
Also noted the obvious, wtf is a TO type.
I dunno java -
In slovak language means "To" = it
Check if the person wo wrote this code isn't from Slovakia or Czech republic, maybe he just froget he should write in english 😂 -
It's C# guys. TO is the generic type parameter where it has a constraint that the type you specify must implement the IConvertible interface. You can call it like GetFilterValue<int>() and make it return an int. TO could've been any name. Starting a type parameter with T is the convention in C#. The author clearly didn't know about pattern matching.
Related Rants

Oh sh*t
Everyone always says the previous developer was crap, sometimes you're right
This happens when production issue comes between Onam (Hindu festival) celebration.
Yep, this code is in production....
rant
production
bad code
braindead
c#