Archive for October, 2010

Dry Run – a quickie

Tuesday, October 26th, 2010

While I was enjoying all the down time (Kitties Ho!), I reasoned that it was probably best not to end up waiting half an hour every time I run my scripts, especially when I want to just test some small change in logic. I consulted our resident bash expert and he handed me this gem.
(more…)

DataMapper

Sunday, October 24th, 2010

I often find myself wishing for a simple complete code example for a new tool, so here you go. DataMapper is an Object Relational Mapper (ORM) gem for Ruby based projects. It uses the active record design pattern, after which the ActiveRecord gem, popularized by Rails, is so accurately named. I’ll leave the details of what all that means to your own research, but in short, DataMapper is a tool intended to ease the use of databases in your Ruby applications, so you have to spend less time thinking in terms of SQL queries and can spend more time manipulating your objects.
(more…)

CruiseControl.rb

Wednesday, October 20th, 2010

CruiseControl.rb is an excellent tool for continuous integration (CI). It runs a server and tries to build your project whenever you make a commit to your repository, reporting errors when they come up. Here I’ll show you how to get a basic project off the ground.
(more…)

Boolean operators and Set operations

Wednesday, October 6th, 2010

Reviewing some Ruby code recently I came across an operator I hadn’t seen before: &&=. I guessed intuitively what it meant, judging from context and experience, but my Google-fu wasn’t up to the task of confirming my suspicions. (more…)