In Podcast 53 of Stackoverflow, Joel and Wil Shipley mentioned a term called "page fault programming" or "parrot programming".
In Joel's words: "The page faulting is I try doing something, I see something, maybe in a piece of sample code, I go to Google and I say "What is..."
Basically, it's learning while you're doing, and doing the research when you need it, as opposed to learning from a book.
In my experience, this happens a lot and I think this is similar to going for an exam and "winging it". The code you produce isn't stellar. It's usually copy and pasted and lacks good software architecture. However, it gets the job done as long as you know programming fundamentals (this applies to the test analogy too: you can pass if you know the bare minimum).
My question is whether the SO community thinks this is a bad habit. Also, can it actually help you learn something compared to learning from a book? I'm thinking if it's something where a deep understanding is needed (ex: C++), then you're better off reading a book first. If it's just another MVC Framework and you're not producing production code, I would learn like a parrot.