by ainzzorl · 5y ago · 0 comments
I'm working on a slightly similar project motivated by this problem: how do you learn from established open-source projects - most interesting ones are too big, too complex, to hard to get started with.
So I'm compiling a collection of interesting code examples from open-source projects and explaining/annotating them. I'm trying to pick examples that are:
- Taken from popular, established open-source projects.
- Somewhat self-contained. They can be understood with little knowledge of the surrounding context.
- Small-ish. The can be understood in one sitting.
- Non-trivial.
- Instructive. They solve somewhat general problems, similar to what some other coders on some other projects could be facing.
- Good code, at least in my opinion.
I'm planning to share it in a few weeks.
My answer for this has been to scroll all the way through the git history of a repo structurally similar to something I want to do and read each of the first month-or-so of commits.
It's empty for now, but I included a few examples [1] of what I'm going to annotate and add there.
Specifically how they are untarring each container layer and creating a chroot jail to run commands inside is fairly self-contained and interesting.