There’s a number of things we can should take into account when writing code — boundary cases, etc., that can make or break a programme. Yes, testing is important, but I think that developing good defensive programming practices is even more important. That said; I present the following, fragile, code. Just about every line has …
Tag Archive: ruby
Aug 22
Ruby’s ObjectSpace: Subclasses
One of the (imho) lesser used pieces of the Ruby language is ObjectSpace. In this article I’ll show one of the things you can do with it — get all the subclasses of a class.
Aug 18
7 Ruby tools which are gems and why I like them
Rubygems, those magickal behind-the-sceneslibraries we all use without thinking too much about them deserve some love. I’m singing the praises of 7 rubygems out of those installed on my laptop (this isn’t to say that I love them more than others). What are some of y’all’s favorite gems?
Aug 17
.irbc contents
I think that irb is one of the most useful tools in the rails toolbox. It allows me to quickly determine how something works, sample results (for putting into blogs, don’tcha know) and makes me a more effective ruby developer. One of the nice things about irb is it’s .irbrc file where you can place …
Aug 13
The trouble with injection
Ruby’s injection is very useful, but if you don’t remember one key fact, you’ll shoot yourself in the foot.
Aug 12
O_RLY? A Ruby/Rails implementation of snowl (Part I)
Recently Mozilla Labs released a prototype of snowl, a rss/atom/twitter feed reader. It is a firefox plugin and provides two views of messages — a “traditional” message view, as well as a “river of news“. I thought that this could be easily “redone” as a rails application. The rest of this article steps through the …