rc3.org

Strong opinions, weakly held

Month: September 2005 (page 3 of 6)

Rails for everyone

I’m in the process of reading Agile Web Development with Rails, the introduction to Rails written by Dave Thomas and Rails creator David Heinemeier Hansson. I plan on writing a full review once I’ve finished, but I wanted to go ahead and start talking about it because both Rails and the book have prompted a lot of thinking on my part.

I’d recommend that every Web programmer read this book, even if you’re never going to install Rails, just because it will give you some ideas on how to make your own applications better. Rails does the best job of codifying the best practices for Web application development of any framework out there today, regardless of language, and once you read the book you can bring some of those practices to the platform you use and become a better programmer.

Right now I’m reading the chapter on testing Rails, and I’m just blown away by the number of ways that Rails makes it easy to test every layer of your application. The affordances provided for writing tests are comprehensive and more importantly, completely natural to the environment. The thing is, these affordances could just as easily be created in Java, it’s just that nobody has done it yet. I was impressed with the testing features of the Spring framework, but Rails takes things several steps further. I’ve written build scripts that regenerate my database schema and a unit test that stocks the database with test data. That stuff is built into Rails. As are base tests that provide the kinds of assertions you need for testing Web components and model components. You can write that stuff yourself (I have), but it’s nice to see it standardized. I’m not even going to get into the fiendishly clever test runners that are built in.

Anyway, both the book and framework are inspirational, and you don’t really need to know Ruby to get a lot out of it. If you know Perl or PHP, you can probably infer what most of the code in the book does, because truth be told, most of the examples just call various parts of the Rails framework. Check it out.

Your friend the footer

I’m going to incorporate this idea into the next iteration of my Web site.

The line noise excuse

Cory Doctorow reports that he’s been told by DRM experts that line noise could not cause the copying restrictions that people are seeing with their Tivos. The restrictions are part of a Macrovision copy protection scheme, and Tivo claims that the protection is being tripped by data errors, as opposed to being enabled purposefully by broadcasters. I’ll be following this story as it develops.

Keep an eye on Tivo

Some disturbing news from Tivo-land bears scrutiny (if you’re a Tivo user anyway). Tivo provides a feature to content providers that enables them to dictate the terms under which it can be recorded. They can specify that a show can only be stored for two weeks, or that the person who recorded it can’t copy it to another device. This feature has come with assurances that it will only be utilized by companies offering pay-per-view content or video on demand over Tivo. It seems like usage of the feature may be leaking out, perhaps by accident.

Batch file usability

Of all of the interface elements on an application that I’ve built, the one that users have the hardest time with is batch uploads. This system, which processes transactions, can accept transactions in batches. The system is very simple, the batch files are CSV files which can be easily created in Excel. There are no optional fields and the order of fields isn’t flexible.

Even for this relatively simple use case, people have an awful time trying to use it. Even people who use the batch facility frequently often upload files that the batch processor cannot deal with. Being a programmer, my first temptation is to blame the users, but in the end it’s my responsibility to make the application easier to use.

I think that a big part of it is something that should be a basic law of user interface design:

The bigger the input, the more likely that users will screw it up.

When you ask users to enter their first name, almost everyone gets it right. Ask them to enter their street address, and typos become more common. Ask them to prepare a spreadsheet with thousands of transactions and export it as CSV and upload it, and you’re flirting with disaster.

The most important step was writing a killer batch file validator. At first, uploading a batch file was a pass/fail exercise. Either all of the records were imported, or an error message was returned indicating that the import failed. Needless to say, users were having a hard time figuring out that the reason their upload failed was a missing value on line 583 of a batch file without any guidance. The validator makes it much easier for users to fix problems with their batch files themselves.

Unfortunately for me, it’s time to add some new features to the batch upload facility. Figuring out how to add complexity without causing even more problems for users is going to be blast. Maybe I can apply the “convention over configuration” maxim from the world of Ruby on Rails to come up with something creative.

Google blog search

Google has released Google Blog Search. Technorati only had so long before the gorilla showed up.

Update: Worth noting — Google indexes feeds rather than weblogs, so sites with full text feeds are at an advantage in terms of being reachable.

Katrina donation matching offer

The Omidyar Network is matching Katrina donations dollar for dollar. The matching program is delightfully low-tech. Just make a donation and note it on the Wiki. (Via Ramit Sethi.)

iTunes 5.0 problems

Here’s the first weblog entry I’ve seen on problems with iTunes 5.0. However, I have read posts from a number of people who have had problems upgrading iTunes, all of them Mac users. I upgraded one of my PCs and everything went without a hitch. If I were a Mac user, I’d hold out until Apple posts an update. (I don’t think people are losing their music, rather their computers are left in a state where they can’t run iTunes, and all of their metadata appears to be gone.) Macintouch has a page about iTunes 5.0 as well.

CCD sizes in digital SLRs

Nelson Minar posted the answer to a question I had planned on researching recently, explaining how the smaller CCDs relate to lens size on SLRs. I have an old school Nikon SLR and have been interested in purchasing a digital SLR, and was wondering whether my lenses would work as I expect. Here’s the answer:

But inexpensive digital SLRs don’t shoot a full 35mm frame. Instead they have smaller sensors. The 350D has a “1.6x crop factor”, which basically means your pictures look OK but your lenses are more telephoto than you’d think. A 35mm lens acts like a 56mm lens. If you want a wide angle 28mm shot you have to buy a 17mm lens. Really wide angle lenses for these small sensor cameras are very dear.

This makes me much less enthusiastic about potentially buying a digital SLR anytime soon.

Now that’s what I call fast

I downloaded and installed Firefox 1.5 Beta 1 today because there’s nothing I love better than the beta version of a Web browser. You can read about all the cool new features in the release notes, and what the browser offers developers in an article by Simon Willison, but what you really want to do is install it and try using the back and forward buttons. I had no complaints about the back button previously, but it is now instantaneous. I’m eager to see how much better the popup blocking is as well — advertisers seem to have caught up wtih the current release of Firefox to a certain degree.

Older posts Newer posts

© 2024 rc3.org

Theme by Anders NorenUp ↑