I work best from examples, and find learning computer languages from documentation very hard.
OTOH, I'm very quick at looking at examples, generalising behaviour, finding edge cases and then looking at the docs to understand those edge cases.
One of the best programers I know is the polar opposite. He will spend days reading every. single. piece. of documentation on something, and then 5 minutes writing a perfect piece of code.
Do you end up writing perfect code when you learn from examples?
Just like you, I learn from examples rather than by reading documentation... and I suspect that just like me, you don't end up spending 5 minutes writing perfect code. If true, to me, that means your friend's method is superior.
After the same amount of time I'd say our code is of the same quality (ie, after say X days working on something new).
I'll have written lost of lesser quality versions first and slowly approached an optimal solution. He'd never write anything until he understood it well enough to write the optimal solution first time.
Sometimes getting lesser quality versions done quickly is a good thing - certainly I was much more useful at getting a quick messy mostly working solution done (and sometimes that's all that is needed).
OTOH, if there is job big enough to amortise that startup cost and important enough that it had to be of the highest possible quality then I'd often give it to him.
I work best from examples, and find learning computer languages from documentation very hard.
OTOH, I'm very quick at looking at examples, generalising behaviour, finding edge cases and then looking at the docs to understand those edge cases.
One of the best programers I know is the polar opposite. He will spend days reading every. single. piece. of documentation on something, and then 5 minutes writing a perfect piece of code.