Search GitHub instead of Stackoverflow when in trouble

Usually when we wan’t to try new things (new libraries, new framework, new language), we’re not quite sure how the code would look like in the end, or what is necessary to configure it correctly.

We follow the documentation, but suddenly there’s one step missing and you’re stuck. Or the documentation authors assume you know enough, but you’re sitting there, feeling dumb and then it comes to you:


Hoping for that first result, including Stackoverflow question. But then comes describing your own problems. So you try one thing, and the results are promising but 0 value. You return and modify search query, but the same outcome. So you know the answer is so close, but you just can’t formulate your query to map it 1:1 to your problem. And you feel even more dumb, because you can’t solve a problem of unique username in a new framework, although YOU KNOW HOW TO GOOGLE IT, but it still don’t give you desired results.

So, instead of trying descriptive approach, where the result depends on how well can you describe your problem or express yourself, why not try direct approach. Copy one line of code that you think other should’ve written in their projects before and search for them in GitHub. Now the result depends more on what you’ve copied, not how did you express yourself. And it’s less likely to be “misunderstood”.

You’ll bee amazed about the results. You’re probably not the first person implementing something, and you’ll often find hundreds of thousands repos where others had implemented the same thing. And it’s probably working code, since people USUALLY keep their repos working.

Often, you’ll find another approaches. Some of them are not expected at all. Maybe you have one idea in mind, bot someone solved the same thing in totally different way. Maybe one line in some side configuration that you weren’t aware of at all.

So, be quick in finding your answers, be productive!

Follow me on @brunoraljic

Chris Bongers's photo

I only search GitHub for APIKEY people forget to remove from public packages...

No all jokes aside, GitHub is a valuable source, even if you go through closed issues on a repo.

Show +1 replies
Bruno Raljic's photo

Peter Thaleikis

Thanks for sharing

Chris Bongers yeah, closed issues are also valid source

Peter Thaleikis's photo

I kinda started looking more into infosec, quite an interesting area Bruno Raljic

Corey O'Donnell's photo

Whenever I am working with a new package or framework, I always look for open-source projects on GitHub using it.

You can learn some nice tricks and maybe some best practices.

Danny Steenman's photo

Same here! It’s a great method to find similar projects that want to solve a similar issue like yourself!

Bruno Raljic's photo

Corey O'DonnellDanny Steenman

yeah, you can really see some cool things other devs did

and we're surely not the first one encountering those same problems