1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Using PLEAC To Get Up To Speed Quickly


PLEAC, the Programming Language Examples Alike Cookbook is a great tool for those who know more than one programming language. Sometimes it's difficult to keep them all straight in your mind, especially if you don't use them all regularly. PLEAC takes the examples from The Perl Cookbook and implements them in as many languages as possible (including Ruby, of course). So, if you don't know how to do something, just look it up in your language of choice.

Above all, PLEAC is most useful when you think to yourself "How do I do XYZ in Ruby again?" You might just be forgetting the exact syntax of a language construct or the name of a method, and PLEAC will bring you up to speed quickly.


PLEAC is organized by language, so before choosing a task you'll need to choose a language. You may want to choose a language you're more familiar with first, rather than jumping into an unfamiliar programming language without fully understanding what the program is going to be done. So, for example, if I know Perl much better than I know Ruby, I might look at the examples for string manipulation in Perl first, to get a better idea of what the examples do before jumping into the Ruby code.

Once you choose a language, you're presented with a number of chapters. These chapters correspond to the chapters of The Perl Cookbook. The percentages you see after every chapter are the percent of the examples programs implemented in that language. So you'll see 100% on languages like Perl (which spawned this whole project), and lower percentages on less popular languages, which will be missing some examples. Currently, Ruby's overall percentage is about 65%, but the most relevant chapters are 100%.

Once you click on a chapter, you're presented with a number of example programs. These example programs have only a title and often very little comments. If you're reading a language you're not familiar with, you might not know what's really going on. The original text of The Perl Cookbook is not available in PLEAC, and there are no explanations of the programs at all. However, most of the programs are short and straightforward.

Contributing to PLEAC

PLEAC is an open source project. Being open source, it's open to contributions from anyone. If there's an example program that's missing, lacking or wrong, you can send in your program and it will be merged with the current PLEAC code.

To contribute to PLEAC, first subscribe to the PLEAC-discuss mailing list (it's not a high volume list) and talk to the people there. Be sure to also read the Contribute section on the PLEAC homepage and the templates provided there.

See More About
  1. About.com
  2. Technology
  3. Ruby
  4. Beginning Ruby
  5. Using PLEAC To Get Up To Speed Quickly

©2014 About.com. All rights reserved.