DEV Community

Cover image for Search GitHub instead of Stackoverflow when in trouble
Bruno says ✍️
Bruno says ✍️

Posted on • Originally published at Medium

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:

I SHOULD GOOGLE IT!

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

Top comments (0)