I normally think of the tools and steps needed for my problem and then Google the exact method names or how they should be used. I think in some cases where you have a problem that's unique to your app, it makes sense to try it out yourself, but as a reasonably experience developer it mainly costs time, since you'll most likely be familiar with the general concept and are just looking for the best solution in terms of performance or readability. Also, I'm pretty sure that when I first started out, I did a lot of things without knowing how they work, but it was fun and that kept me learning and eventually I figured out what I was doing. If I had tried to understand everything and not just googled for things of all kinds, I'm sure I'd have quit programming long ago.