Read this book. All of you. It’s the most accessible and enlightening expression of a personal philosophy I’ve ever read, and good words to live by. The more people who read this book, the nicer place we’ll all live in. A wonder on two wheels. I like D Byrne even more now.
Reloading Classes in Rails

Sometimes you just read a blog post that’s so good, there’s no need to clarify it or anything. I just suggest that you read Witold Rugowski’s post on how to force classes to reload in development in Rails. At the very least you’ll learn something about how Rails works:
Fixing Ruby Rake on Windows

I found a nice article recently which lets you remove the batch files from Ruby when running on Windows, so you don’t get those annoying, redundant cmd messages “Terminate Batch Job (y/n)” whenever you press ctrl-c within Ruby. My version (1.8.6) exits cleanly now – thanks Ruby Rambler!
http://rubyrambler.blogspot.com/2007/10/terminate-batch-job-yn-y.html
My specific steps for fixing Rake are:
- rename “rake.bat” to “rake.bat.orig” (or whatever)
- rename “rake” to “rake.rb”
Continuous Testing and Testing Single Methods in Ruby on Rails 5

Testing in Rails is crucial to effective development. Many people have opted for rspec over Test::Unit for this, but I find that Test::Unit meets all my needs. It’s simple and reliable, which is all I want in a test framework.
I do want two pretty simple features for Rails tests though. I want to manually run a single test easily, and sometimes even just run a single method inside a test. I also want to automatically re-run a test, whenever that test file is edited.
I’ve written some rake tasks to accomplish these basic activities – hopefully you’ll find them as useful as I do.
Continue reading…
Real time Bart schedules for your cell phone
Science knocked out a little Bart train application a couple of nights ago for your pleasure. Bart, for those foreigners, is the inter-city train system which services San Francisco and the surrounding areas.
The application provides you with real time arrival data for any station in the Bart system. It returns data in a format suitable for reading on most web-enabled cell phones.
To use this new application, simply point your phone (or computer) web browser to:
MapQuest’s New API: MQ loses its mind? 2
Readers may be familiar with this site’s GeoX application, which integrates Yahoo, Google, and until the end of January, MapQuest. At that time, MapQuest is switching over to an alternative API system and decommissioning their old api. This seems to be getting a lot of good blog press, but Science is skeptical by nature. As we’ll see, not everything is as it appears.
Changing the number of rings on ATT / Cingular cell phone
I found this recently on an AT&T forum post on how to change the amount of time your phone waits before rolling over to voice mail:
- On your phone, dial *#61# and click Send.
- Some information should be displayed: number that the calls are being forwarded to and the delay before the forwarding engages.
- Write down the number (including +1)
- Dial **61*+1xxxyyyzzzz*11*30# and hit Send. +1xxxyyyzzzz is the number you wrote down previously, 30 is the delay in seconds. The delay can be set in 5 second increments, 30 is maximum
- Dial *#61# to verify that the new settings are active.
The crucial detail is the “+” – you have to figure out how to include the plus in the dialed number. On my (8525) phone, I hold down “0″ for a while and it turns into “+”. I hope this helps someone else.
Web-based Design to Implementation

I’ve been through the process of going from a great graphic design to a website a few times, as I’m sure many readers have also. I was recently asked by a company for advice on this process, and I thought what I told them might be of interest to others more generally.
Continue reading…
Railsconf Resources 8

Some handy links from my rails conf presentation on search techniques in Rails.
The Presentation itself (pdf format) – CRUD isn’t spelled with an S: Advanced Searching in Rails (or original powerpoint format – much larger)
Deep_merge: Ruby Recursive Merging for Hashes 13
Welcome to “deep_merge” – a ruby lib to help merging complex hash structures.
Ruby provides some nice merge capabilities in hash and array. But it rightly doesn’t give us recursive merging, because it’s too poorly defined to standardize. However, recursive merging sometimes solves problems that can’t be solved other ways. Continue reading…




