Programming Language Examples
Posted 2005 Aug 24Whenever I use a new language or framework I always want to do things the canonical way. So, a lot of times, this involves spending a lot of time hunting for good examples. I certainly think this is the best way to do things, as I always want to exploit a language to its fullest. I mean, it doesn’t make any sense to just write a C program with Ruby syntax!
This is probably old news, but I found PLEAC, the Programming Language Examples Alike Cookbook. It takes common tasks and provides language-specific examples in a “cookbook” style. It has examples in Ruby, perl, python, C++, haskell, and so on. All of the examples are commented and syntax-colored. Very helpful!
For Ruby, another fun one is Ruby One Liners. Though, some of them are a little esoteric. Surprise, surprise.
I know it isn’t a language, but I wish they had an entry for Cocoa! Instead, try CocoaDev.