• Complain

Steve Pugh - Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems

Here you can read online Steve Pugh - Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2008, publisher: No Starch Press, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Steve Pugh Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems
  • Book:
    Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems
  • Author:
  • Publisher:
    No Starch Press
  • Genre:
  • Year:
    2008
  • Rating:
    4 / 5
  • Favourites:
    Add to favourites
  • Your mark:
    • 80
    • 1
    • 2
    • 3
    • 4
    • 5

Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

Wicked Cool Ruby Scripts is a compendium of scripts that will make your life easier by saving you time and solving problems. If you find yourself wasting effort and time on a task a trained monkey could do, its time for Ruby to come to the rescue. Wicked Cool Ruby Scripts provides carefully selected Ruby scripts that are immediately useful. Learn how to streamline administrative tasks like renaming files, disabling processes, and changing permissions. After you get your feet wet creating basic scripts, author Steve Pugh will show you how to create powerful Web crawlers, security scripts, full-fledged libraries and applications, and much more. With each script youll get the raw code followed by an explanation of how it really works, as well as instructions for how to run the script and suggestions for customizing it. Wicked Cool Ruby Scripts will save you from the tedium of repetitive tasks and give you back the time it would take to write scripts from scratch.

Steve Pugh: author's other books


Who wrote Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems? Find out the surname, the name of the author of the book and a list of all author's works by series.

Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Wicked Cool Ruby Scripts

Table of Contents

Wicked Cool Ruby Scripts
Useful Scripts that Solve Difficult Problems
Steve Pugh
Editor
William Pollock

Copyright 2009

For information on book distributors or translations, please contact No Starch Press, Inc. directly:

No Starch Press, Inc.

555 De Haro Street, Suite 250, San Francisco, CA 94107

phone: 415.863.9900; fax: 415.863.9950;

Library of Congress Cataloging-in-Publication Data:

Pugh, Steve.
Wicked cool Ruby scripts : useful scripts that solve difficult problems / Steve Pugh.
p. cm. -- (Wicked cool ...)
Includes index.
ISBN-13: 978-1-59327-182-4
ISBN-10: 1-59327-182-4
1. Macro instructions (Electronic computers) 2. Computers--Access control--Passwords. I. Title.
QA76.7.P84 2008
005.13'3--dc22
2008042965

No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark.

The information in this book is distributed on an "As Is" basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it.

No Starch Press


Dedication

To my loving wife. You're a true gem!

FOREWORD

One of the great joys of using Ruby is that the language is engineered to make for easy and effective procedural, script-style programming. Wicked Cool Ruby Scripts , as its title suggests, shines the spotlight on the scripting side of Ruby.

It's nice to see attention going in this direction. People often describe Ruby as a "scripting language," but that misses the point. Ruby is a general-purpose, object-oriented programming language that happens to offer a rich syntactic toolkit for scripting. I won't try to define the latter rigorously, but it has something to do with a procedural approach and with an acknowledgment of the fact that short programs that don't spin off library modules can be okay too. I believe that this kind of programming is one of Ruby's sweet spots, precisely because the value of allowing for it was not an afterthought in the design of the language.

Steve Pugh has been on a journey through a varied, many-faceted landscape of scripting tasks and solutions, and he has parlayed that journey into an engaging, illustrative, instructive travelogue. He's got us encrypting files, parsing RSS feeds, adding users to our systems, developing network exploits (but on the side of the good guys), scraping images, making phone calls, quicksorting arrays, solving Sudoku puzzles, and plenty more. Steve's delight in Ruby's versatility is contagious; when I look at Wicked Cool Ruby Scripts , I'm reminded of the power of the "Wow!" factor in Ruby and of Matz's dictum that Ruby is optimized for programmer pleasure and fun. Writing scripts is, moreover, an extraordinarily useful form of fun.

So enjoy this book. You'll learn a lot of Ruby, find lots of techniques to borrow and tweak, probably get a lesson in an algorithm or two that you're rusty onand have a chance to delve into one of the strongest areas for this wonderful language.

David A. Black

Director, Ruby Power and Light, LLC

North Brunswick, New Jersey

November 2008

ACKNOWLEDGMENTS

First and foremost, I would like to thank my family, who supported me during the authoring of this book. I definitely wouldn't have finished it if not for their patience and support. My wonderful wife, Shannon, who puts up with me being a nerd, gave valuable insight into the English language. It turns out that I'm better at writing code than English sentencesthe spellcheckers can only take me so far.

I would be remiss if I did not thank the man who introduced me to RubyLim Vu. Without his guidance and friendship, I doubt I would be involved in Ruby today. I still remember our conversations about Ruby when I'd pick his brain to find out more about this new language.

I also have to thank David Black for constantly answering my questions, giving solid advice, offering honest critiques, and challenging the syntactical slip-ups that are inherent to writing code in many different languages. Some of my scripts originally looked more like Perl than Ruby, so many thanks to David for keeping me accountable and giving wonderful guidance. The guy truly has the heart of a teacher.

Finally, I would like to thank the entire team of people at No Starch Press for publishing this book on Ruby. Bill Pollock has put together a remarkable group of people who make authoring a book a wonderful experience. Thanks to Tyler Ortman, who put up with my random phone calls, questions, and ideas, while still managing to keep the book on point and readable. His gentle words of encouragement and motivation were great. Finally, I owe Megan Dunchak many thanks for putting the copyediting phase on auto-pilot. If it weren't for all of the people above, I wouldn't be writing these acknowledgments, and you wouldn't be reading them.

INTRODUCTION
So youve read a few introductory books about Ruby you have a good feel for - photo 1

So you've read a few introductory books about Ruby, you have a good feel for the syntax, and you've written "Hello, world!" about 20 different optimized waysnow what? This book is intended to give your mind an exercise in Ruby as a scripting language.

Scriptingthat is, automating repetitive tasks you're not prepared to do yourselfis one of those things that a good language must be able to do. Perl and Python are two of the most widely known scripting languages, and their popularity has a direct correlation to their usefulness for scripting. Writing utilities should not be a cryptic task, nor should scripts take an inordinate amount of time to create. It is in that spirit that Ruby was born.

The designer of Ruby, Yukihiro "Matz" Matsumoto, had an overall vision to create a language that would be easy to use in everyday tasks. He felt the language should be fun to write so that more energy could be put toward creative processes with less stress. When they aren't distracted by the peculiarities of a language, programmers can focus on writing better programs. When you need to write a script, the last thing you want to worry about is weird syntax and compilers interpreting your code. Ruby is written in such a way that the syntax and programming flow is natural. I have found Ruby to be comfortable to work with because of its natural syntax, wonderful community, and simplistic view of how programming should be. As you will see throughout this book, Ruby makes scripting a breeze!

A command of scripting in Ruby is an invaluable skill to have. You will find that by automating repetitive tasks, you will free up much of your time to do more important things like writing other wicked cool Ruby scripts. I hope this book helps you see the many uses of Ruby and makes you a better programmer.

Wicked Cool Ruby Scripts

What differentiates a wicked cool Ruby script from an ordinary script? A wicked cool script is something that is useful, challenging, and, above all, educational. Not educational in the schoolmarm sense of the word, but rather as a stimulus to use Ruby to its full potentialto push the language to its limits.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems»

Look at similar books to Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems»

Discussion, reviews of the book Wicked Cool Ruby Scripts: Useful Scripts That Solve Difficult Problems and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.