2) Look at the docs (of which I always keep a local copy), and the source code (of which I try and keep a local copy).
I want to understand not only how to solve the problem at hand, but what caused the problem. Not understanding the cause of the problem will lead to a solution which will only sometimes work, because it misses some other leak in the abstraction.
I believe that a big reason why I work this way is that I started programming when the internet was still in its infancy, and the official documentation and my coworkers was pretty much all I had to work from.
Now then, this isn't always possible, but when I can't figure it out (and my own coworkers can't figure it out - they're my second resource), I find that the SO answers are some combination of wrong, under-documented, out of date, or just have questions with no answers.
As much as I prefer to continue with 2, I do appreciate Google and its ilk when I come upon some really sticky problems - but it only really occurs a few times a quarter.
EDIT:
> are there optional parameters in .len()?
Official docs will answer this very quickly, no IDE required. Of course, having an IDE can be quite useful.
For Python - Standard Library - Built In - length()
For Javascript - MDN -> Standard Objects - Array - Array.length
And so forth.