Significant projects I am working on or have worked on
- wxRuby GUI Bindings, a library that allows ruby programs to use wxWindows, which is a mature, cross-platform, native widget GUI toolkit.
- Redwood email client. Redwood is a very simple email client that only has the few functions that I personally find critical. I used the original version of Redwood as my only email app from December 2000 until about April 2001. Now, I am rewriting it from scratch with wxruby, and built on top of nmh. Here are screenshots of the main screen, composing a message, and viewing a message more or less full screen.
- Space Monkeys game. Space Monkeys is a conquer-the-galaxy game based on original rules by Stephen W. Glenn, with his permission. I've mirrored a copy of the rules. I originally wrote it for Ruby/GTK, then ported it to Ruby/FLTK, and recently created a wxruby version. It is released as GPL software. Here is a screen shot of the FLTK version.
- Ruby-FLTK GUI Bindings. This is a library that allows ruby programs to use FLTK, a simple, lightweight GUI toolkit. Takaaki Tateishi is the lead on this project, and after an initial flurry of activity (mostly design and documentation), I have not been very involved. I still like FLTK, but have shifted to wxRuby because I want to use native widgets, because they are easier to make accessible to blind users and other people with disabilities.
Test-First Design (TFD) ExperimentsEach of these projects was coded purely test-first, in Ruby. That is, I would write a line or two of test code, and then write the actual code that would make the test pass. In the first two cases, the design that evolved was not even close to the design I had anticipated when I started. Unfortunately, I didn't have a pair available, so they were coded solo (XP-for-one).
Roman Numeral Converter. Convert between integers and roman numerals. This was inspired by a post on the XP list. Initially I wrote integer-to-roman. Later, I added roman-to-integer, and was surprised how it fell into the same pattern. Here is the ruby source code and here are the unit tests
Bowling scorer. This was inspired by a mention on the XP list about this ObjectMentor article. Here is the ruby source code and here are the unit tests
BigHoleFinder. This was inspired by a posting on the XP list asking how one might use TFD to solve this problem: Given a grid, with cells that are "full" or "empty", find the largest contiguous group of empty cells. Continguous means connected horizontally, vertically, or diagonally. Perhaps this is related to a Go game. My solution is straightforward, but not particularly efficient. The problem as stated didn't have space or speed constraints. Here is the ruby source code and here are the unit tests
Refactoring ExperimentsI love to refactor. Simplifying code, removing duplication, and making it clearer...ah, those are just so much fun.
Here's how I refactored a string parser in Ruby.