Code Catalog is a collection of instructive code examples with annotations. The examples are:

  • Taken from popular, established open-source projects.
  • Instructive. They solve general problems, similar to what other coders could be facing in their projects. They use patterns that you could apply one day.
  • Mostly self-contained. They can be understood with little knowledge of the surrounding context.
  • Small-ish. One example can be read in one sitting.
  • Non-trivial.
  • Good code! At least in our opinion.

Why do we need this?

When you ask someone how to get better at coding, the second most common response – right after writing more code – is to read other people’s code and learn from it.

While it sounds very reasonable, it’s hard to implement it in practice. So you find the source for your favorite software on GitHub and start reading it. Firstly, for any established and mature product, the codebase is probably huge, complex and very hard to get started with. It’s unlikely that the design is documented anywhere. Even if the high-level architecture is documented, the structure of the codebase almost certainly isn’t. It probably depends on some libraries and frameworks you’ve never heard of. Unfamiliar terms and creative code names are all over the place. Making sense of it can be a challenge even for seasoned professionals. And how do you even start exploring the code? Open a random source file?

It doesn’t mean that you should not try to understand good open source projects. You should, and the experience can be very rewarding. Yet, it’s not an easy way, and the le