Zed Shaw and the Ruby Patch Analysis
Zed Shaw talks about Ruby Vulnerabilities.
Zed Shaw talks about Ruby Vulnerabilities.

I've been reading the book Everyday Scripting with Ruby which was written by Brian Marick from Pragmatic Programmers, originally called Scripting for Testers, for the past couple of weeks and going working through the examples in the book to get a better grasp of ruby. I think this is the first time I've read a book written for programmers from other languages who want to get a better understanding of ruby, while getting to do some cool exercises to learn some more of the ruby magic. None of that nasty PHP way of doing things which rely on having silly settings turned on in your php.ini and that you hope you will figure out why something is not working to realise that you don't have register_globals on for example.
The approach Brian Marick takes is quite different from the various perl, python and PHP books I've read in the past, so that was quite refreshing that he has included various techniques that one can use everyday in your ruby programming. Having previously written some ruby utilities to do simple things the svnannounce, which basically sends commit messages to jabber recipients, I particularly enjoyed the learning how to write the code churn calculator as well as using the watchdog code with having multiple methods of sending messages out which I will look into extending svnannounce to handle sending svn commits to twitter, msn, etc.
The book is divided up into multiple sections starting with The Basics, Growing a Script, Working in a World Full of People, and The Accomplised Scripter.
The ruby facts chapters through out the book, I found quite informative as Brian explains various rubyisms like arrays, classes, booleans, hashes, modules, etc. which I've found cleared up quite a number misunderstandings I had with the ruby language having dived in and just started coding simplish things.
The scraping webpages section was fun. I've in the past written some nasty PHP code to scrape pages for part of a ISP Management console I wrote during where I'd scrape various pages on UUnet, now Verizon, dialup management console to see number of dial-up users online, users session history, etc. And need I mention that you use a lot less code with ruby than with PHP. Learning how to use regular expressions and the ruby xpath library was quite cool. The Xpath stuff sort of reminds me of python's beautiful soup for liquidising webpages.
I'm actually estactic that CSV file parsing in Ruby is so much easier than PHP. Numerous things I do utilise some form of file containing data that needs to be processed or exported. I've started porting a PHP reporting tool over to ruby and using ruby on rails for the web interface portions. Being able to natively write CSV files which export data in the correct order in ruby when working with arrays is fantastic.
It's actually great working through a excellent book for learning a language, having useful examples to learn the language and not just your usual build a basic shopping cart type examples but real world style examples to learn certain nifty features like argument lists for passing multiple arguments to a method without.
Things like learning how to structure your directories when creating a library for ruby and finding out if you'll have name clashes. Things like including modules within other modules has given me some ideas. There is seriously more magic available in ruby which is quite powerful compared to PHP.
A great way to learn how to automate tasks using ruby. Even touches a little bit on rake files, gems, bulk updating gems, and a lot more.
Some interesting links from around the web:
Are Lines of Code really a measure of either success, productivity or popularity?:
The title PHP Eats Rails for Breakfast and subtitle Despite the buzz around sexy new frameworks like Rails and Django, PHP is more dominant than ever initially commits the same fallacy that others have and that is to compare frameworks (Rails and Django) with programming languages. And then the suggestion becomes that one can interchangeably use Rails and Ruby, Django and Python.
In the fine grained services approach that we use at Amazon, services do not only represent a software structure but also the organizational structure. The services have a strong ownership model, which combined with the small team size is intended to make it very easy to innovate. In some sense you can see these services as small startups within the walls of a bigger company. Each of these services require a strong focus on who their customers are, regardless whether they are externally or internally. To ensure that a service meets the needs of the customer (and not more than that) we use a process called “Working Backwards” in which you start with your customer and work your way backwards until you get to the minimum set of technology requirements to satisfy what you try to achieve. The goal is to drive simplicity through a continuous, explicit customer focus.
There is a promo code which gives you the personal edition of Komodo for free ;) As a late Christmas present from ActiveState.
Well worth the effort for a IDE and is built upon Mozilla's XUL framework.
Award-winning IDE for dynamic languages, providing a powerful workspace for editing, debugging and testing your programs. Komodo offers advanced support for Perl, PHP, Python, Ruby, and Tcl. Komodo runs on Linux, Mac OS X, Solaris, and Windows.
UPDATE:
The offer ends on December 31st 2005.