I tend to overcomplicate my projects and would like to see how good codebases solve practical problems, especially how they choose their tools and architecture. Where should I look?
Recommendations for free programming books would be welcome too.
I tend to overcomplicate my projects and would like to see how good codebases solve practical problems, especially how they choose their tools and architecture. Where should I look?
Recommendations for free programming books would be welcome too.
Pick a specific question before opening a big repository. How does it handle configuration? Where are errors reported? How is a feature tested? Follow one path through the code rather than trying to understand the whole thing.
VS Code is one example to browse, though its size can make it overwhelming. Redis is another option if you want to study a C codebase. Neither is a template for every project, so look at the problem each decision is solving before copying it.
For architecture, try The Architecture of Open Source Applications. It's available to read online for free and discusses the design of actual projects, so you get some context alongside the code.
That context matters. A large project's structure may make sense for its own history and requirements but be unnecessary for a small student project. Comparing the reasons for a decision is more useful than just copying the folder layout.
Start smaller. Build a couple of little projects, then combine parts of them into something medium-sized. You'll get a clearer sense of which abstractions help and which just add work.
For ideas, Instructables has Arduino projects with concrete use cases. They can be a useful starting point if hardware interests you.
Don't assume the most popular repositories are automatically the best teaching material. Older or archived projects can be worth a look too. Just keep in mind that an archived project may use outdated tools or practices.
For your own stack, try starting with one language and a small set of tools. Add another only when you can explain what problem it solves.
For books, check a school or public library if you have access to one, including its digital collection. You can also search for programming books that their authors or publishers make freely available online.
And if you can find experienced programmers to review your work, asking why they would simplify a particular piece can be more useful than reading a huge codebase without a goal.
Answers are reviewed before publication.
Related Discussions