

Studying open-source code brings immediate benefits to your own code. - adriand
http://factore.ca/on-the-floor/29-going-to-the-source-of-open-source

======
wallflower
Great example. About a clever technique. And implementing it in the author's
own code.

Check out Dr. Spinellis' Code Reading:

"Code reading requires its own set of skills, and the ability to determine
which technique to use when is crucial. In this indispensable book, Diomidis
Spinellis uses more than 600 real-world examples to show you how to identify
good (and bad) code: how to read it, what to look for, and how to use this
knowledge to improve your own code.

Fact: If you make a habit of reading good code, you will write better code
yourself."

<http://www.spinellis.gr/codereading/>

~~~
hello_moto
Agree, other than books and people, code can be a mentor.

With one _giant_ exception: there are too many bad code out there so be very
careful.

~~~
DSpinellis
There are also tons of good code around. Most large, successful open source
projects have source code full of gems from which we can all learn. Even
better, by participating to a large open source project we can also learn a
lot from the processes used in it.

------
mprime
What I think is important to keep in mind is that reading _good_ open-source
code is what helps. I'd make sure a piece of code was written by a fair number
of smart people and used by others before I started copying their idioms and
emulating their style.

------
barnaby
Two kinds of learning, right? Learning by example (e.g. reading books, reading
others' code) and learning by doing (e.g. experience building things, writing
your own code).

People often do one but forget the other.

~~~
mprime
I agree 100%. I think it usually comes down to confidence: if you're not
confident in your ability, it's all too tempting to try to learn "just a
little bit more" and never take the plunge enough to practice. On the other
end of the spectrum are the audacious "rock star developer" wannabes.

Skillful programming requires a weird mix of both attitudes.

