The worst I have experienced:
A 30,000-line .cs file.
A giant monolithic program tangled together by Singleton abuse, 6-deep nested if/else blocks, and the list goes on.
There are too many to count. And this is a sight I see every single day.
This is the exact landscape I encounter at many companies when I go in for maintenance work.
Encapsulation completely shattered as a direct reflection of the subcontracting power hierarchy, among other things...
Code that completely disregards collaboration, utilizing outdated algorithms in the name of "optimization" and making it utterly unmaintainable for anyone else.
We learn about ADTs, Result-first approaches, Composition Roots, and code hygiene, yet at some point, code that simply "works" becomes what ships to production.
Communities advocate for building "good software," but the reality in the field is that most of it is "code written just to clock out for the day." I hear "it works, so don't touch it" in dozens of different variations.
The quality of an open-source project contrasts sharply with that of delivered enterprise software. People settle for the "if it works, it's fine" mindset because in open source, the code itself represents personal reputation, whereas in contract deliveries, meeting the deadline is ultimately the core objective...
It feels like the world is always polarized.