>Do people actually read code? Do you?Yes. I do.
>I frequently see people recommending others to read programs, especially well written programs, but I never hear anyone say that they've just read this great piece of software, come check it out.Any one of the nice one-liners written in APL comes to my mind.
>So I guess the question is, do people read others' code? If yes, is it actually useful? What are some good code to read? If no, why do they recommend doing it? Why are they not doing it? Is it useless, is it too hard?Yes. I do consider it useful, as reading a good book may help an author.
Donald Knuth has written some nice programs. Chuck Moore has also written some nice programs. GNU sources aren't necessarily good, but are educational in their own right.
For Donald Knuth, look at TeX or TAOCP.
Donald Knuth is credited with inventing literate programming, so a literate program is designed to be read and learned from.
For Chuck Moore, observe this implementation of the MD5 algorithm on a GreenArrays chip:
www.greenarraychips.com/home/documents/greg/AN001-141023-MD5.pdf
I found this very educational, but this references many other documents based on the chip and whatnot, so this will be the manner of document you will read, then read again after having read more of the GreenArrays documents. Regardless, it's a fascinating look at how to implement and make parallel MD5 and similar algorithms efficiently on an interesting machine type, as the chips are effectively dataflow machines.
For GNU, look at the GNU echo source and feel strange of it:
http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/echo.c