Are there courses that take well architected, well written codebases and explain the design principles, coding principles etc of such codebases?
1. How Caddy web server works: https://sourcegraph.com/notebooks/Tm90ZWJvb2s6MTM2Nw==
2. How TypeScript ESLint works: https://sourcegraph.com/notebooks/Tm90ZWJvb2s6MTA2OA==
The goal is to write these as if we were onboarding new contributors to the codebase. If there are maintainers of projects that'd like to be featured, please hit us up: https://discord.gg/SQCbGe6zTn. And you can subscribe here: https://tourdesource.substack.com.
Effective Java by Joshua Bloch has code snippets that are very well-written, as are the examples in The Go Programming Language by Donovan et. al. I read practically all the code in Effective Java, and a lot of the examples in The Go Programming Language (I keep dipping into this book every now and then as I have to learn some aspect of Go, which I use at work; I think I may actually sit down and read this book cover-to-cover and perhaps play with most of the examples).
If you know C, you may want to give the examples in The C Programming Language by Kernighan et. al a go. The examples are written in a bit of an archaic dialect but still very clear.
Another book of note that is funny and engaging (but of course not something that has professional value) is If Hemingway Wrote Code by Angus Croll: https://nostarch.com/hemingway. I think I have read all of the code in this book.
A broader but less detailed approach for casual readers are the books "Beautiful Code" and "The Architecture of Open Source Applications".
Not a lot of that, tbqh.
Check the PostgreSQL codebase. One of the cleanest big codebases around. Here's a list of resources for devs: https://wiki.postgresql.org/wiki/Developer_FAQ#What_informat...
Also, what are your goals? Understanding ugly written, barely working, and badly designed codebases is a much more useful skill.
- xv6: https://pdos.csail.mit.edu/6.S081/2021/xv6/book-riscv-rev2.p...
- tensorflow (google translate can do PDFs): https://github.com/horance-liu/tensorflow-internals
"Project Oberon is a design for a complete desktop computer system from scratch. Its simplicity and clarity enables a single person to know and implement the whole system, while still providing enough power to make it useful and usable in a production environment. This website contains information and resources for exploring and using the system. The project is fully described in Project Oberon: The Design of an Operating System, a Compiler, and a Computer — written by the designers, Niklaus Wirth and Jürg Gutknecht."
codebases written in functional languages are also good. in general, when there's a higher barrier to entry, higher quality work is more prevalent.
consider spending some time teaching yourself how to find the best codebase that solves a particular problem. not only does that give you leverage for more learning down the line, it also helps you to develop the much more directly valuable skill of selecting good technology (and detecting crap before it's too late).
Here is a list of similar tutorials from the same blog: https://viewsourcecode.org/snaptoken/similarTutorials.html