One thing I always find interesting as a programmer is to take a peek at other people’s source code. Sometimes this happens out of curiosity, to see how they solved a particular problem, or if their implementation kicks more ass than the one I thought of. Or simply to learn something new and excitingly different.
When I’m looking for a piece of open source software that I’m planning to use, and possibly will be making some changes to myself I always take a look at the source code to see how well it’s written. This is one of the major factors in making my choice actually, because I’ve learned that if you don’t feel comfy snooping through the code, or see stuff that you find not-so-well-programmed, you will end up spending way too much time digging through the sources to find that particular feature you want to change or add.
By doing this I ran into some source code that was IMO particularly well written. Clean, slick, and using the language to the max, allowing you to dig into it and run into things that make you go “WTF!? Never thought of doing it like that myself!”
These are the ones that are worth using, and frankly, just “reading” bits of code from. Once you’ve picked up an idea from those beautiful lines of technological poetry, your mind has been stretched, and will never be the same again. Your own code will reflect this, making you a better programmer.
But enough already, lets get down to it, so here’s some source code I find worth reading:
- WordPress : it rocks, really. It’s nice to see it’s so clean coded. Their plugin system is definitely worth checking out IMO.
Did you read any inspiring snippets of code lately? Feel free to let me know in the comments!