My old team had this one test which ran a linq query over a dictionary.
We spent *days* trying to figure out what it did and in the end, we just disabled the test - the author of the linq statement was more clever than all the rest of us combined.
Linq is not the worst offender because rich expressions go naturally with functional programming. If you want to *really* upset me, make super complex expressions with side effects.
Most abused feature: mutable static properties & fields. Soooo many applications that use mutable statics to store state, then the web app falls over dead when it has to process TWO (gasp!) simultaneous requests.
Most unintentionally abused feature: that arithmetic is unchecked by default. 💀
I'd be curious if Microsoft did a scan of GitHub for the most commonly implemented extension methods to identify candidates of functionality that should be moved into the core runtime. 🤔
Comments
We spent *days* trying to figure out what it did and in the end, we just disabled the test - the author of the linq statement was more clever than all the rest of us combined.
But I try not to smear my coworkers in public.
And bluesky is a family friendly forum.
Except for @parkplusplus.bsky.social, right? You can't take away all the fun.
He told me so himself.
I’ve been known to abuse `TryParse`-style expressions in `if` conditions, but that’s @omg.squire.wtf’s problem now.
public static string Serialize(this object obj);
}
Is my favorite.
Most unintentionally abused feature: that arithmetic is unchecked by default. 💀
They are useful, but I’ve seen code bases where code is so distributed sprinkled into something nobody can describe or maintain.