Use GitHub Search for Learning

Published Wed Jan 24 2024

Lately we are all searching for ways to cope with the declining quality of internet searches. AI content spam has made the already awful content factories start churning out even more SEO spam. I am one of the many that appends “reddit” to Google searches often.

GitHub has an amazing search, it works very fast and show highlighted results from public code. Here’s a quick example: I am currently reading some of the Neovim documentation to learn how I can create floating windows. The docs aren’t fully clicking in my head so I need an example. This is a great place to use GitHub search!

GitHub search results

A single quick search and now I can pick from hundreds of examples! Adding a language filter to the query guarantees relevant results for most of the searches I do. Since this is committed code, there is a very high likelihood it works. No hallucinated api usage unlike when I talk to ChatGPT.

One of my goals is to become more familiar with open source software. Using GitHub codebases as a learning resource helps build some of that comfort while I work. I suggest you try it out next time you need help understanding a new language or library. Remember that you aren’t the first to tread here.