I agree with reading open source coding. There is a book by O'reilly on Beautiful Code - but it sucks in my opinion. I would suggest books that I have read to prepare for programming interviews, and that are often suggested (all the links that I have put up are Google Books links:
[Programming Pearls] is a good one (get the newer edition, though the concepts are the same),
[The Practice of Programming] is another classic.
These are pretty practical books with real code world examples
Also, practice writing test code for already existing projects. This tends to help you out by causing you to be forced to understand exactly what the function does. If the results aren't what you expected, you are forced to think about why the person's code doesn't work as you expected for those tests. Browsing around StackOverflow and seeing what people with high reputation have to say always helps too.