Text is everywhere. From the content of webpages to the output of system commands, from keyboard input to data formats like XML and JSON, much of the data our programs interact with is, when it comes down to it, text.
Knowing how to get the most out of code that processes text is therefore essential not only to being a productive developer, but essential to efficiency elsewhere too — from helping you monitor servers to getting insight into your business and its metrics.
TPWR examines how the Ruby programming language's robust text handling capabilities can be used to quickly and painlessly deal with large datasets, to write shell one-liners, to extract fields from delimited data, and much more.
Working from the foundations upwards, TPWR examines how data actually gets into your program — from keyboard input to streaming large files — and how that data can be read efficiently. It looks at how you can extract information easily from both computer-generated files and passages of human-written text, and shows you how you can use regular expressions to identify patterns in text, extract them, and manipulate them.
It also shows you how you can use scraping techniques to extract data from even the most badly written web pages, allowing you to get data even where there isn't an API available.
Aimed at the novice-to-intermediate Ruby developer — someone who's perhaps comfortable writing Rails apps but has recently found themselves branching out into writing command-line tools, or a data scientist who enjoys Ruby but isn't the most experienced developer — this book requires little previous experience with handling text in Ruby. Even experienced developers, though, will find that there are some dark corners of Ruby's elaborate text processing abilities that they weren't aware of.
Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks. We process the refunds manually, so they may take a few days to show up. See full terms.
If you buy a Leanpub book you get all the updates to the book for free! All books are available in PDF, EPUB (for iPad) and MOBI (for Kindle). There is no DRM. There is no risk, just guaranteed happiness or your money back.