HTML Canvas Test
Posted by John on December 28th, 2008 | 1 comment
Posted by John on December 28th, 2008 | 1 comment
Posted by John on December 12th, 2008 | 1 comment
My good friend and partner Adam Williams has just finished bolting the doors on his new YAML-fixture-killing Rails plugin: Dataset. Dataset is the next generation of a plugin that Adam and I wrote last year called Scenarios.
Why the need for a new plugin? The Scenarios plugin was originally built inside of a Rails application that we were working on. At the time we threw it together rather haphazardly. There were few tests (if any). The main thing was to prove that the idea was good. Scenarios worked so well for us that we soon extracted it and used it in our next application. A friend added support for Test::Unit. Pretty soon the implementation our “simple” fixture replacement plugin had grown quite complex. It was becoming hard to maintain.
This year Adam and I have been working on a rather large Rails application. The run time for tests in our application had almost become unbearable. In an effort to speed up those tests and fix some of the outstanding issues in the Scenarios plugin, Adam decided to start from scratch and rewrite the plugin from the ground up using the test first approach.
We have christened the rewrite “Dataset”. It is virtually a drop-in replacement for the Scenarios plugin. Our initial tests suggest that it is significantly faster than its predecessor.
Folks our experience with it over the last year leads me to believe that Dataset is the solution to the Rails fixture debacle. If you haven’t tried it out yet give it a try!
Posted by John on December 2nd, 2008 | 0 comments
Just in case you missed the news we are planning another Radiant Sprint on Saturday, December 13. Several prestigious members of the Raleigh Ruby Brigade plan to attend along with some of the more questionable characters (like me!).
The plan is to continue working to implement the next version of the Radiant UI and bring some of the internals up to snuff. Radiant has recently been upgraded to use the more modern RESTful approach, but there are still plenty of tests to write and other improvements to be made.
This is the perfect opportunity to gain a little insight into the Radiant development process and get up to speed on some of the tools we have been working with (RSpec, HAML, Serve, Spec Integration, and Dataset, to name a few).
It will be hosted at Red Hat here in Raleigh. We’ll get started around 9 am and continue until about 6 pm that evening. RSVP if you want to come along for the fun. Everyone is welcome to attend, even if all you want to do is heckle.
Posted by John on July 17th, 2008

Over the past couple of months I’ve been working on a little library for a client that allows us to create Facebook-like popup windows with ease. It’s called popup.js. The library depends on Dan Webb’s excellent Low Pro and comes complete with it’s own behavior for easy unobtrusive use.
So how does it work? Well, once you have the proper plumbing in place you can declare a simple popup window like this:
<div class="popup" id="test" style="display: none">
<h3 class="title">Popup Window</h3>
<div class="popup_content">
<p>Hello world!</p>
<p><a href="javascript: Element.closePopup('test')">Close</a>
</div>
</div>
This markup assumes that you are using the included facebook.css stylesheet, but the only thing that is necessary to have a functioning popup window is a div with an ID attribute. You should also set style=”display: none” to ensure that the div is not visible when the page loads.
Popping up the window is as simple as linking to it:
<a href="#test" class="popup">Popup</a>
Links with the class of “popup” get the Popup.TriggerBehavior which will trigger the popup when clicked. Note that the href should be set to the ID of the element to popup. If you prefer you can set the href to a URL that returns the HTML for the popup and an AJAX call will be made to that URL.
For more information about this little lib, see the README in the GitHub project:
http://github.com/jlong/popupjs/tree/master/README
And investigate the test project:
http://github.com/jlong/popupjs/tree/master/test
Special thanks to Five Points Solutions for their help with debugging this library. They have contributed several Internet Explorer bug fixes in addition to funding much of the initial development.
Posted by John on October 26th, 2007
This may be old news for some of you, but the Pragmatic Web Site got a face lift a couple of weeks ago. I was thrilled to have the opportunity to work on the site with Mike, Dave, and Andy. Most of the design work was done this summer, while the finishing touches on programming and the data import pushed the launch date back to the beginning of October. (Site credits here.)
If you haven’t seen it yet, I’d encourage you to head on over to the site and buy a book or something!