Looking for a code samples that present a code fragment in plain English, Perl, Python, and Ruby. Here's an example of a whole mini-solution present in that format, but I'd rather just have the code present in a fragment-by-fragment basis.
A good place to look would be Project Euler where (after solving the puzzles yourself) you get access to solutions by other people in all kinds of programming languages. Of course, sometimes there will be atrocious solutions, so you'd have to look at the answers carefully.
Rosetta Code currently has 449 tasks, of which some 349 languages are covered, though the site does not (and cannot) promise to have solutions to every task in every language.
NOTE: aaronasterling posted Rosetta Code as a comment to the question, but never as an answer. After 24-hours, posted it as an answer myself, since I'm not planning on leaving my question open forever, and it's an answer to the question. Feel free to up vote the comment, and not this answer; if aaronasterling post it as an answer, I'll delete this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With