The question doesn't specify any language, so FWIW, I first learned "serious" programming by reading the sources for GNOME Glib, about 18 years ago.
The fact is someone programming languages - either by design or culture - just encourage unbelievable crap. Obviously, any code can be written well, but if one has to look for a needle in a haystack it's not worth it.