Michael Anhari

Searching for answers in open source on GitHub

Photo of monitor with GitHub.com loaded in a web browser.

GitHub has some pretty great tips for searching code. I primarily use this as a second-to-last resort when documentation isn't completely clear and I'm about to reach out to pair with someone.

I tend to use the path and filename helpers the most.

For example, I've been teaching myself ember.js the past few weeks, and the other day I was struggling with creating records for nested models. I started searching for existing examples with queries like the following:

path:app/routes filename:new.js createRecord

The search results included several ember repos I could poke around in for learning purposes. Remember that you are usually not alone in what you are trying to do.

Newsletter

I'm working on sending out a weekly newsletter. I'll make it as easy as possible to unsubscribe at any time.