The odds of finding truly beautiful code in most production systems seem to be on par with the odds of finding a well-read copy of IEEE Transactions on Software Engineering in Paris Hilton’s apartment. Furthermore, enterprise software, which represents the bulk of code in existence, deals mostly with forms, reports, etc., which – one might argue – seldom require much thinking or cleverness.- Albert Savoia in a post on O'Reilly's Beautiful Code blog
It's not just enterprise software - you find bad code in lots of startups, where there is an exclusive focus is on getting things done rather than doing it correctly. In fact, even lots of open source code bases are full spaghetti code. A great hacker even recommends FreeBSD code over Linux code.
Sadly, a lot of Linux and Gnome open source is poorly written.- Trevor Blackwell in response to 'How can I become a better programmer ?'