One Page

Googling for info

June 25, 2019

I’m going to explore two categories of things you might google for, Features and Bugs:

Features

Let’s say you’re trying to find out how to cascade routes in React, or exactly how the share intent sends data in Android. Something specific like that.

Where do you look?

In my opnion, the best place for something like that, is the docs from the source. Not some tutorial on a third party site, right to the source.

There are generally two classes of info in the Android docs. Guides and References.

Guides:

Guides look like this: a screenshot of https://developer.android.com/guide/components/services, it's a description of what Service does and what it uses

API References:

API References look like this and here’s the API reference for the same thing as above: a screenshot of https://developer.android.com/reference/android/app/Service.html it's a listing of functions and what they return

Notice the difference?

The guide is about explaining the purpose of the class, the api reference is a listing of its methods and what they do.

Sometimes you need one, sometimes you need the other but no other resource is going to be as complete as the source.

In cases of unclear documentation you may need to go to outside sources but most of the time, just these and some thinking will be enough!

Bugs

Whoops, you’ve run into an error and you’ve no idea what it means! Here’s what you do.

  1. Actually read the error. I mean it, just read it. You might think you know what it says, but just read it!
  2. Take the first line of the stack trace and google it. Prioritize search results that are Github issues (if the library/framework the bug is in, is open source). Because nothing beats an answer from the maintainer of the code.
  3. If you’re on stackoverflow or similar, NEVER COPY/PASTE A SOLUTION. 90% of the time the solution is wrong for some subtle reason that you won’t know until it blows up in your face later. Take the time to understand how it was solved, then write the code yourself. Disallowing copy paste ( don’t just blindly type it in either) will put you on the path to really understand how and why the solution works, and only then, when you can write the solution yourself and understand what it does and why, you can use it.

Happy coding!

Have suggestions for a topic I should cover? Send me a dm at @AniketSMK or email me at hello@[firstname][lastname].com


Aniket Kadam, author

Written by Aniket Kadam - building useful things. Follow me on Twitter