- We design and build extraordinary applications for companies looking to make the next great idea a reality.
- learn more
Upcoming Conference: FITC Chicago 2008, June 22-23
Another Chicago area conference coming up: FITC Chicago 2008, from June 22-23 at the Chicago City Centre Hotel & Sports Club, 300 E. Ohio. We're even supporters.
So what is it beyond the platitudinous "design and technology" event?
Obviously there's going to be lots of talk about how to develop Flex and Flash applications. Also how to develop online/offline apps with Adobe Air. Heck you'd think Adobe was a sponsor.
If designing RIA's with Flash/Flex/Air is your thing, you want to be here. It's not free, but based on last year's event, well worth the $125-$250 (depending on which sessions you go to).
Update: If you sign up here with our special ninja supporter code of PATH15, you get 15% off.
Topics: Adobe, Adobe AIR, Announcement, Conference, Design, Flash, Flex, Web/Tech
Welcome To RailsConf
I'm nearly at the end of day 1 of RailsConf, and I can report that it's very, very crowded. The sessions have been great. You can follow along with me and my day at http://twitter.com/noelrap for the minute by minute updates, I've been posting there fairly regularly. I'll do a fuller recap of the conference at the end.
If you are at RailsConf, remember to come up to me and ask for a book, I still have a few to give out. Also, I've scheduled a Birds of a Feather session on Saturday at, I think, 8:30, to talk about iPhone and mobile web application development using Rails, especially to talk about the rails_iui plugin.
Topics: Conference, Ruby on Rails
Agile Development and Testing: Unit or Montecarlo?
I've had a running debate with my colleague John McCaffrey on the question of testing. He is a big fan of unit testing and testing in general that examines the smallest possible units to be tested, then assembles them in every larger integration tests. The idea is that if you get the small stuff right, then the larger stuff has a greater chance of being right too.
Come to think of it, I'm a big fan of this approach too. But there are some times that this sort of strict constructionism is insufficient. There are a few instances that a comprehensive system test is necessary. Some instances that come to mind are:
Topics: Agile Development, Testing
Facebook apps: Not too late to compete on the user experience front
Despite the hype, Facebook's a frontier rather than an established metropolis. There's still room to ride into town on a white horse and save the day, earning yourself a healthy reward in the process. Exhibit A? The so-so user interface standards of the social network's most popular applications.
I recently, belatedly started playing Scrabulous with various friends and I'm shocked at the just-okayness of its UI. The lack of an on-screen legend for the mechanics of the variously shaded bonus squares? Puzzling. The drag-and-drop interface for shuffling tiles around in your tray? Maddeningly persnickety. The mismatch between the word lookup feature, which uses thefreedictionary.com, and the application's own, internal whitelist of valid words? A real bummer.
Scrabulous provides an adequate ripoff of a venerable and justly loved board game. But the rough edges of its user experience suggest that Facebook still has plenty of room for folks who know how to polish a UI till it gleams. Sure, first-to-market advantage gets magnified on social networks. But as these new application platforms mature, I'm convinced user experience design can provide a compelling means of product differentiation.
Topics: Facebook, Games, User Experience
Separating Source and Test Code With FlexUnit and Antennae
In most projects, people tend to separate source and test code into separate directories. However, out of the box, FlexUnit with Antennae is geared toward a single directory which contains all source and test code. I didn't really want to mix everything together like this, so I modified Antennae to work with a separated structure. Here is the quick and dirty on getting it to work (assuming you're using FlexUnit .85 and Antennae 1.2.0)
Topics: actionscript, antennae, Flex, flexunit
Formatting quoted code in blog posts: CSS2.1 white-space: pre-wrap
When migrating our blog posts from TypePad to WordPress, chunks of code presented the biggest problem. There was a lot of variation in how individual authors had marked up their code samples. Then there was the junk markup TypePad had inserted, of its own accord, inside <pre> and <blockquote> elements. In the end, I had get my hands dirty inside individual posts in WordPress. For future posts, however, we'll be standardizing our markup patterns and using CSS to style code quotes consistently. We're still working the kinks out of our stylesheets, so please bear with us when reading older posts.
In the meantime, I stumbled upon an informative post by Lim Chee Aun that offers a one-size-fits-all solution for implementing the CSS 2.1 "white-space: pre-wrap" declaration in today's user-agents. If you're not familiar with "white-sace: pre-wrap," it's a way to honor whitespace and line breaks within preformatted text, yet still allow individual lines to wrap when they reach the edge of their enclosing container. In short, it provides the browser equivalent of the "soft wrap text" option in your favorite IDE or text editor - which in many cases looks better than using "overflow: auto" to create an internal scrollbar on the container.
Using ActiveRecord and Metaprogramming to Define Constants for Enumerated Types
Have you ever stored your application's enumerated types in a database? If you have, you might have also noticed that code will often times "duplicate" this data by defining constants or enums that reference what is in the database. If you're anything like me, this duplication does not feel right.
With the metaprogramming capabilities of Ruby, we can address the maintenance costs of duplication by generating these constants at runtime.
WordPress sucks, but it doesn’t matter
It was with great amusement that I read PHP Sucks, But It Doesn't Matter, a recent post from Jeff Atwood's Coding Horror. Here's an excerpt (emphasis his):
Some of the largest sites on the internet -- sites you probably interact with on a daily basis -- are written in PHP. If PHP sucks so profoundly, why is it powering so much of the internet?
The only conclusion I can draw is that building a compelling application is far more important than choice of language. While PHP wouldn't be my choice, and if pressed, I might argue that it should never be the choice for any rational human being sitting in front of a computer, I can't argue with the results.
With all my recent work on the Pathfinder blog migration, I've been getting to to know WordPress - and, by extension, PHP - pretty well. Now that the experience is (mostly) over, I've got a few observations about WordPress:
- It sucks.
- Its PHP foundation contributes to its suckiness.
- If you're a developer, it doesn't suck nearly as bad as other blogging platforms.
Let me elaborate.
RailsConf 2008 and Free Book Giveaway
Later this week, I'll be attending RailsConf 2008. There will be blog posts here, I'm sure, with any interesting info. If you like your updates in 140-character bursts, you can follow my Twitter feed at http://www.twitter.com/noelrap.
Thanks to the marketing folk at Wiley, I will be armed with some number of copies of Professional Ruby on Rails to do with what I will. I'll also have about 500 marketing flyers -- I have no idea what to do with those.
The books, though, I plan on giving away. Here's the deal:
I'm going to be carrying some small number of books each day (Friday, Saturday, Sunday). The first people to come up to me and ask for one get a free book -- please do give me your name so I can mention you on this blog and so forth. I'll be the guy who looks like the picture to the left. Only in color. And wearing glasses.
Topics: Ruby on Rails
The Blogs Have Moved
After laboring away on Typepad because it was easy and, frankly, we had more important things to do, we have finally made the move to our own in-house blog. It now sits under the web site at http://www.pathf.com/blogs/ and combines our various blogs -- Agile Ajax, UXD, Business Rules and Techdev. You can still access all of the sub-blogs individually through their feeds and category pages.
If you run into any issues (which I'm sure you will, given the contortions we had to go through to deal with Typepad's funky url's), drop us a line at info@pathf.com.
Topics: Announcement
Ruby Internals: Overriding Object.require() to watch files as they are loaded
Recently, on a RoR project, I needed to write a utility in lib folder and corresponding test in test/* folder. I had assumed that anything in folders/subfolders of lib would automatically get loaded as part of environment load. For some reason, it wasn't loading my utility file when I ran my test. The obvious solution would have been to require that file specifically in my test file but I was curious to see if there is a way to figure how rails does its loading magic. Armed with the information that any method that does not act on any object are considered part of "Object" class, I wrote something like this:
class Object
def require(ruby_file)
p "Requiring #{ruby_file} ..."
super
end
end
I put this at the top of my test file, which was the very first file to get loaded, even before the usual line requiring 'test_helper'.
And Woila !!. The next time I ran the test, it showed following:
"Requiring rubygems ..." "Requiring mechanize ..." "Requiring fileutils ..." "Requiring etc ..." "Requiring fileutils ..." "Requiring www/mechanize ..." "Requiring net/http ..." "Requiring net/protocol ..." "Requiring socket ..." "Requiring timeout ..." ...
Next, what I actually needed is to override "load" so that I see only the files as they are loaded as opposed to files being 'require'd (See require vs. load). So, I tried this:
class Object
def load(ruby_file)
p "Loading #{ruby_file} ..."
super
end
end
For some reason that I have yet to figure out, it didn't work. Do you know why?
Topics: Ruby on Rails
HTML + Code Markup: Threat or Menace, Part Two

Last week's post about ERb and other HTML + Markup view languages got five actual comments. By the standards of my recent posts, that's practically a mob.
Most of the commenters wanted me to look at their favorite view tool, which I dutifully did. I then went out and did something completely different.
I covered HAML and Markaby a bit in Professional Ruby on Rails. Markaby I like conceptually, but the concerns about it's structure and speed have kept me from using it more (although the solution I did pick is probably not a speed demon either). I find HAML really opaque, but if it makes sense to you, more power to you. Erector is in some sense an enhanced Markaby.
Commenters also wanted me to look at Kwartz and Wicket, which are both tools where the template is valid HTML, but a special attribute namespace is used to tell the templating system to insert content and logic. I like the idea in theory, but anything that uses XML namespaces makes me break out in hives (to be fair, the Wicket folk say they aren't using XML, just the same namespace syntax). It's a little more high-ceremony then I needed.
Topics: Ruby on Rails
.NET Interface does not allow static/const/readonly fields
In Java, it is perfectly fine to declare an interface with static-final properties as follows:
public interface QuestionFactory
{
public static final int QTYPE_INPUT = 1;
public static final int QTYPE_RADIO = 2;
public static final int QTYPE_CHECKS = 3;
public Question createQuestion(int questionType);
}
This cannot be translated in to .NET as. The following won't work:
public interface IQuestionFactory
{
// won't work in .NET (Err: Interfaces cannot contain fields)
public static readonly int QTYPE_INPUT = 1;
public static readonly int QTYPE_RADIO = 2;
public static readonly int QTYPE_CHECKS = 3;
public Question CreateQuestion(int questionType);
}
The general recommendations in such a scenario is to externalize the const(s) in another class.
public class QuestionType
{
public const int QTYPE_INPUT = 1;
public const int QTYPE_RADIO = 2;
public const int QTYPE_CHECKS = 3;
// disclaimer: I used "const" 'cause I wanted to use it in switch/case.
// However, I assume "static readonly" could have been used as well.
}
Why is this so? The notion seems to be that interfaces cannot have states (they are stateless) and hence do not allow fields. Coming from Java world, I am not entirely sold on this argument though. I prefer one interface with all static readonly/final fields as well method-contracts (that consume those fields).
One may argue use of enum instead of int(s)... but that is a different discussion.
Topics: Web/Tech
All the news that was fit to print
The New York Times has unveiled an archival service called Times Machine which archives the past 100 years of the newspaper of record. Along with the benefit of seeing ads for trusses, we see a very sophisticated and robust interface using HTML + CSS + Javascript of a very easy way to scan large amounts of printed text. There have been so many of these kind of apps, almost always using Flash with proprietary back end processing, it's refreshing to see these sorts of interfaces with the code all public and easy to steal learn from.
In this case, the clever interaction design (and a hurdle for HTML) is to pair the actual article image (spanning multiple columns) with the text summary. The implementation makes scanning the paper a breeze and has a great visual clue of highlighting the image and overlaying the summary text. I'm delving into the markup to see how they managed to dynamically pair the images with the representative text, and seeing what other magic is under the hood.
Another nice feature was the rotating 'share' button, which takes care of not prominently promoting digg or reddit, but subtly reminding users that if they like to vote, here's where to do it. The only bad feature is that this is for paying customers only, but NYT has made free its online articles, hopefully in time this will follow suit, the days of microfilm readers may be numbered.
Topics: User Experience
Making a good choice when using Flex components
Good people of Adobe were so kind to pack a lot of useful components
with Flex Builder. Story goes, they are there to speed up the
development process and in doing so cut production cost while retaining
excellent user experience. There is also a lot of other kind people of
the Flex developer community that made wonderful components for all
kinds of applications and made them freely available.
Topics: Flex
About Pathfinder
Recent
- Dealing With A Legacy
- Big Changes Underway at LinkedIn for Groups
- Four blatant iPhone usability blunders (and one constant annoyance)
- Flash/Flex physics engines and examples
- A Rails Story, Or An Engine That Really Could
- Data visualization and the art of conveying information
- What’s In Your Junk Drawer?
- Selling Git on the Business End
- IE8 Beta 2 Released
- Faster JavaScript for Firefox 3.1 Thru JIT
Archives
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006






