Conway’s Game of Life Viewer

Later this month I’ll be joining dozens of other coders at Ruby DCamp, where we’ll spend three days talking, coding, and camping. The first day is usually code katas (exercises), and often one of them is the implementation of Conway’s Game of Life. By design, there’s not enough time to do a complete implementation with […]

class_eval, instance_eval, eval

A couple of days ago I attended an interesting discussion of metaprogramming by Arild Shirazi at a meeting of the Northern Virginia Ruby User Group. Arild showed how he used metaprogramming (class_eval in particular) to generate functions whose names would only be known at runtime. His talk was very effective at reminding me that I […]

Design by Contract, Ruby Style

I recently encountered a situation in which I was writing data to a key/value data store. There was a code layer that insulated the business logic layer from the data store internals. I wanted to be able to unit test this business logic without needing access to the data store. I could mock the data […]

Android GUI’s — The Case Against GUI Builders and Data Driven GUI Configuration

GUI builders are great, but for building anything more than a trivial solitary application, without discipline and diligence, the duplication can create a productivity and quality quagmire. In addition, XML is a human-hostile configuration language. Copy and Paste – Bad! As the number of windows increases, the natural tendency is to copy and paste. For […]

Singapore and Its Red Dot RubyConf

The Conference On April 22-23, 2011 was the first ever regional Ruby Conference in Southeast Asia (, Twitter tag #reddotrubyconf). (Conference links and resources provided by @cheeaun are here). It was really cool seeing people from so many different countries in the region unite around their appreciation of the Ruby language. In additional to the […]

Sun Java Coding Conventions Revisited

The Sun Java Code Conventions document, written in 1997, and available at, continues to be a valuable resource for Java programmers. In addition to the nuts and bolts of formatting and the like, it includes some great wisdom, such as: The frequency of comments sometimes reflects poor quality of code. When you feel compelled […]

Bangspace — Bangkok Hackerspace

One of the manifestations of community among IT professionals and enthusiasts is the hackerspace (see Wikipedia article at A hackerspace is a place where hackers (in the loose sense of the word, that is, benevolent software and hardware enthusiasts) can meet to talk, learn, and work together. A recent addition to the hackerspaces of […]

GPartEd – Free and Open Source Disk Partitioner

GPartEd ( is a free and open source software tool that does disk partitioning like its commercial counterpart, PartitionMagic. Although GPartEd is cursed with a boring name, it is nevertheless a superstar product with both looks and brains. (For the looks, see The name GPartEd is an abbreviation for Gnome Partition Editor. Although I […]