Saturday, December 15, 2007

Quick Tip: Update Yum to Avoid kmod-nvidia/kernel Conflict

A useful tip to prevent some minor headaches: There seems to be a bug with dependency resolution in YUM on Fedora 8 in some versions prior to yum-3.2.8. On my x86_64 dual core AMD box using kmod-nvidia (newly a default package in F8 I believe) it manifested itself in the following way for me:

[sgibbons@localhost ~]$ sudo yum update

Setting up Update Process
Resolving Dependencies
--> Running transaction check

... ( A lot of depsolving )

Error: Missing Dependency: kernel-x86_64 = is needed by package kmod-nvidia-

At first I though this might be an issue with the repo, but it appears to actually be a yum bug. It was quickly remedied by updating yum and then doing the system update:

[sgibbons@localhost ~]$ sudo yum update yum
[sgibbons@localhost ~]$ sudo yum update
Hope this saves some forum digging and repo cursing.

Sunday, October 28, 2007

Scheduled Downtime

It was 3am on Sunday night and, for whatever reason, I wanted to see if my landlord had cashed a recent rent check. I pulled up my online banking with Citizen's bank and was greeted by this far-too-common message:

Online banking is down for scheduled maintenance.

Ryan S and Eric V, co-posters on this blog, happened to be present for this and each of them suggested we check their respective online banks: TD Bank North and United bank. They were down for "scheduled maintenance" too. Getting a bit worried about the nation's banking infrastructure we checked a couple more banks: Bank of America and Sovereign Bank. Both, from what we could tell without accounts, thankfully were up. Now this was by no means a scientific survey of uptime for online banking at 3 am on a Sunday (though I'd love to see one - it would likely be quite illuminating) but 3 out of 5 banks, all of them fairly major, having online banking downtime at the same time is unacceptable.

Online banking should never be down for scheduled maintenance. Really, no serious public-facing service should have scheduled downtime. There's just no reason for it. Load balancing, redundancy, rolling upgrades - there's no need to take down a whole service. At worst, there should be a performance hit during maintenance. There's no big trick to avoiding scheduled downtime: you just need a decent infrastructure with decent people managing it. It's really not that hard.

A company's public facing web services are easily as important as a flagship branch in meat-space. In fact, I would say that a company's web-based location should be considered the international flagship branch. Every single customer has the potential visit the web-based location - that cannot be said about any physical flagship location for a global, national, or even large regional organization, no matter how optimally it is located geographically. If companies aren't spending equal or more money and effort on their web-based locations as they are on their most premiere physical locations they are making a critical error. Scheduled downtime is a clear sign that they are making this error - it is simply shoddy workmanship of the sort that would never be tolerated at a physical flagship.

Saturday, October 20, 2007

Pentax K10D DSLR Hands-on Review

I had been waiting a long time to try out the Pentax K10D digital SLR camera and finally got some hands-on time with one. I owe it to you to first say that I'm not a big Pentax fan, having played with the *ist D, *ist DS, K100, K110, and a slew of their Optio point and shoots. I have yet to be really impressed by any of their cameras, including this one. That said, if I was going to buy a Pentax DSLR, this would be the one, hands down.

Weather sealing.

I'm the kind of photographer who probably beats on his camera more than most. I like to throw my camera over my shoulder and rock out with it, not worry about it. The weather sealing was the main reason I wanted to check out this camera. You get most cameras in its class even a little moist and they'll choke on you. I've got to say, the K10D is pretty rugged for its price. It's got a nice big feel to it unlike its brothers who feel too light and plastic-y. It's much beefier and has many more features. I'm convinced that the K100D/K110D are far too stripped down and babyish to be useful. The K10D feels like a real camera with plenty of settings right up front via a switch or dial.

The battery door, memory card door, and cable connection door all have rubber seals to keep water out. The cable port door doesn't have a positive lock, meaning it can be flipped open pretty easily. All in all I was hoping the weather sealing would be a little more substantial. The rubber seals are only about 1mm wide and don't seem to be very soft. I was expecting the rubber to "give" like a common o-ring would.
All of the buttons and switches on the K10D are supposedly sealed behind the body too.

Controls layout.

In a word, the K10D made me a little uncomfortable. Barring the shutter, every button, dial, and switch on the entire camera was tougher to push, twist, and click that I expected. I do like the color-coding they've used on this camera a lot though. More on that in a minute.

The mode dial is actually one of the better ones for cameras in this class. Most of the time you've got like portrait mode, landscape, sports--stuff like that right on the mode dial. Not on the K10D. Instead there's "user" mode which takes care of those. There's sensitivity-priority which is a welcome mode. You set the sensitivity ad the camera automatically sets the aperture and shutter speed. Then there's "green mode" which is something Pentax has been doing for a while. This is sort of like a combination of program and automatic modes. There's also a "green button" to the left of the top display screen, I couldn't really figure out what it was for. Exposure, focus, and stabilization all have a green setting too so you can whack any setting into "auto" at a glance. You can click over to bulb exposure or 'X' mode on the dial too. I didn't really experiment with these other than to find out that the camera will fire without a lens attached.

AF and exposure-compensation buttons are within thumb reach on the back. I really like it whenever any camera has an alternative to auto-focusing other than just half-pressing the shutter button. You can customize the AF button's job in the menus. Moving your thumb from the back scroll wheel to these buttons takes an extra second to get used to, but I like how they're separated by a ridge of plastic.

Around the mode knob you'll find the exposure mode dial. As with the other controls, its pretty sticky. If you change between full frame, center-weighted, and spot metering a lot you might wish this option were more readily dialed in like on the Nikon D200. On the other hand I can understand that this is probably the least-used dial on the camera so putting it out of the way on the top left is probably okay for the casual shooter.

Drive mode button: my favorite control.

Thank goodness they put a drive mode button on the back to the left of the viewfinder. I've come to expect this button on DSLRs because I shoot a lot more bracketed shots with digital. Pressing it pulls up an on-screen menu to change between drive continuous shooting options, bracketing, and self-timers. I regret not having tested the K10D's bracketing options more thoroughly but I like having the control at the touch of a button.

The Menu, Trash, Info, and Playback buttons are all what you'd expect. Pentax DSLRs make use of the Fn (function) button on the bottom right side of the screen. In the cheaper models, this has been your go-to button for making adjustments to common options. If you're coming from one of those, it's probably right where you expect it. If not, you might think its dwarfed by the nearby D-pad and stabilizer switch. If you ask me, the Fn button is too small and too out-of-the-way for such a powerful control. If all of the buttons were the same size (1/4" diameter) as the AF and exposure compensation buttons, I would have been a lot more comfortable. Since the K10D is a competitor to cameras like the Nikon D200/D300 and Canon 30D/40D, I really would have liked Pentax to make the periphery buttons a little bigger.

My shooting style doesn't use an auto-focus lock to often but if I did, I'd feel cramped. The AF-L button is pretty out of the way at the top right corner. It feels like this was the last button they designed into the camera and didn't give it at much thought. If you have different hands maybe this will be more comfortable. It's still fine for occasional use since they put it on the corner of the body.

Image stabilization.

Probably the best thing about Pentax's SLR line is that you can take any K-mount lens ever made and it becomes an image stabilized lens on this body. Of course you know it comes with an 18-55mm kit lens. The image stabilization on the K10D is pretty good. I don't think I would even consider buying this camera if it didn't have it. It makes a nice competitor to the Sony A100 and A700, which have sensor-shift image stabilization also. Probably Sony lets you shoot a fraction of a stop slower though. The anti-shake on/off switch looks like lever-type power switches I've seen on Canon and other lately. For some reason I have to wrestle with these angled levers once in a while. Personally I like the K100D/K110D IS up-and-down slider switch better.

Power to the depth of field.

For whatever reason, Pentax has a differet approach to the depth of field preview (DOFP). The shutter button is surrounded by an on (left)/off (center) switch like many other cameras. But unlike others, this one includes a DOF preview when you pull the power switch right. There's a little stopped-aperture icon to remind you. I think I like this DOF preview method button better than having a button anywhere else on the body--all too often they are positioned too strangely for me.

The other thing about the DOFP on the K10D is that it really works! Strange to say right? Well if you've used the K100D/K110D, you know they use a really weird method. In those cameras, pulling the DOFP actually takes a picture and shows it to you on-screen, not through the viewfinder. This image is just for previewing; it is not stored. The problem is this is incredibly slow and distracting. You set your aperture, pull the DOFP, it clicks a picture, and shows it on the screen so you have to pull your eye away from the viewfinder. The K10D doesn't do any of that nonsense; the DOFP stops down the aperture so you can preview your image through the viewfinder like any other SLR.

Focus area dial: my least favorite control.

Take a glance at the back of the K10D. There's a directional pad like you expect. Around it there's a grippy ring that you'd hope would be a scroll dial. It's not. It's the focus area selector. You've got auto focus point selection (in green), manual selection, and center. I found this ring to be pretty difficult to twist. The tactile feedback is poor because it doesn't have a nice "clicking into place" feeling. After about 10 times changing auto focusing modes I decided this dial is pretty inconvenient. Of course it beats going into a menu though!

Auto-focus mode switch: more sticky, less clicky.

The camera feels like it focuses significantly faster than its more inexpensive brothers. The focus switch offers you AF-S, AF-C, and MF focusing options. I could not figure out how to manually override the auto-focus (i.e. autofocus then defocus the lens manually). As with most of the other controls, the focus switch has a nice shape but it's tougher to move than I'd like. If you compare the focus mode switch to the Sony A700, you'll like Pentax's more. The K10D has more of a "lever"-type switch where the A700 has more of a "dial"-type. When holding the camera up to my eye and changing focusing modes, I found I had to push it fairly hard and double-check to make sure it was where I wanted it. The focus mode switch on many cameras has a positive feel when clicking between modes--that way you know it's changed without looking. This switch was definitely quiet, but at a cost of tactile feedback.

Battery & card compartments: load and lock.

The K100D and K110D both use 4 AA batteries, which is think is awesome. You can pick up a set of batteries at any convenience store in a pinch. But the battery doors on those cameras stink, in my opinion. Plus their battery life blows. The K10D uses a rechargeable battery pack which is probably unavoidable for a camera of this caliber. I had a tough time with the battery door because it has a different opening method than most of its competitors. To open the battery compartment, there is a tab that you have to lift up with your fingernail and then twist to open. If you have small fingers or no fingernails, you will be frustrated. The memory card slot opens in the same way, with the lock on the bottom back right.

Also on the bottom of the camera is a port for connecting the optional D-BG2 battery grip. The port is covered with a removable rubber "plug." I would have preferred to see this connectivity go through the bottom of the battery compartment. The plug is an extra thing to lose and an extra place for moisture to get in (it took me a few tries to push it all the way in for a full seal). By the way, the battery grip also uses this "lift tab, twist to open" method. So there's a total of three spots where you'll see this. I have small hands and reasonable fingernails and these little twisting locks drove me nuts. If you change memory cards often, I'm worried you might miss some shots messing with the card slot door.

The bottom line.

The Pentax K10D has the features (image stabilization and weather sealing among them) and ruggedness to compete in the sub-$1000 DSLR category. If you already have Pentax lenses, get this camera. If you are entering the DSLR market, consider other options--you might be frustrated by the way Pentax handles certain features.

Friday, June 29, 2007

The End Of The Domain

TechCrunch posted a write up the other day entitled "Domain Sellers Party Like It's 1999". And it's true. The domain business is a big business right now.

From the TechCrunch post:

Last week some $10million changed hands at auction for domain sales, with 16 domains being sold for 6 figures. Free Credit & Credit sold together for $3million, although as the DomainTools Blog points out this was at a relatively low multiple of around 7x yearly earnings. sold for $1.8 million and even raised $135,000. The exuberance in the market even extends to the spam infested .info domain, with selling for $17,000.

I guess it's understandable. There's a limited supply of good domains out there, and getting one of them can drive a lot of traffic, which on the current predominantly ad-supported internet, equals profit. The thing is, that's all going to change.

The first steps are already taking place. The Web 2.0 "bubble" is generating tons and tons of new web based businesses and they all need domains. The thing is, there just aren't enough. And nobody is going to let the unavailability of a good domain name stop their "world changing" buzzword laden startup.

So people have started registering jibberish. See basically any real Web 2.0 site for examples of such nonsense-word names. Names that would never have been associated with respectable businesses are now receiving millions in VC on a daily basis. Surely, many would say, these names aren't the result of desperation, but instead new and hip, and thus, marketable.

I tend to disagree with this sentiment. These sorts of names only really became marketable once they were in widespread use, and honestly, I doubt very much that a jaiku or kiko is really very marketable to anyone but mindless Silicon Valley lemmings.

These names, unlike the names of Web 1.0, are certainly not the sort of thing that someone would type randomly into a web browser, like or, so they clearly don't add value by driving traffic that way. But really, the era of driving traffic with random direct URL entry was the first thing to go. Even the most internet illiterate are starting to get it through their heads that the internet is so big that guessing at URLs is not a very effective way to find useful or relevant websites.

There are really only a few reasonable entry points to the Web:
  • Google or other search engines (there are other search engines?)
  • RSS Readers
  • News syndication services like Slashdot, Digg, or any old blog
  • Social bookmark-sharing and discovery services like or Magnolia
  • Perhaps an email or IM conversation link
Both news syndication services and social bookmarking services boil down to rss feeds, so that can ideally all be handled by an RSS Reader. This means there's essentially 3 entry points to the web (somebody let me know if I'm missing one here): Search Engines, RSS Readers and Email/Chat.

Of course, Google just so happens to run the most popular web-based versions of all of these applications. And of course, they can all be embedded in a customized Google home page. So really, there's only one word that people ever need to type into their browser, and that's Google. Really, at this point, setting Google as a home page is obvious, because it is the only starting point.

I suppose that the only other possible entry point would be through a bookmark, handled by the Firefox extension ideally; no need to enter a domain name there.

So, there's no reason to enter a URL ever, or even see one, in order to start browsing the web. Of course, once browsing on the web, the way to get from place to place is via links. Period. Any movement over the web is done by accessing a link. No entering a domain name here either. Ever.

So, why again, do we even care about domain names at all? There's no need to enter them, and as a result, no need to ever even look at them, except maybe, to check for a .ru or .ro extension as a warning of a phishing attack (though that's slightly less of a concern with OpenDNS). Why is everyone shelling out millions of dollars for things that there is no reason to look at or care about?

Domains are an archaic and ugly branding method, a holdover from the early days of the internet. It's going to take a little while longer for it to happen, but in the not too distant future people are going to start to realize that domains are not only irrelevant: they're worthless.

Tuesday, June 19, 2007

Acts_as_versioned simple walkthrough

Acts_as_versioned is a plugin for Ruby on Rails that adds simple versioning functionality for any of your ActiveRecord models.

To install the plugin :

Navigate to your home directory and install with the following commands:

ruby script/plugin discover
ruby script/plugin install acts_as_versioned

The acts_as_versioned plugin allows you to easily make a model save each version of itself in a special database table with version identifiers that can be used to show or return to previous versions of that data.

Lets call the model that you want to version "Product", giving it the singular name used for models, knowing that the database that will be created for it will be called "products." To create this just run:
ruby script/generate model Product

To tell your program that you want this model to be versioned by adding to your model a single line:

class Product <>

This is single call to acts_as_versioned takes care of a huge amount of work for us in the background.

Now that we have the model that you want to version, it needs to have a 'version' column.
The easiest way to do this is to edit your migration for this model to include a column called version with attribute integer.

class AddProductAndVersionedTables <>

Your migration is also going to need to create a versioned table for this model. You do this by adding two lines #{model_name}.create_versioned_table and the associated drop function #{model_name}.drop_versioned_table to your migration

class AddProductAndVersionedTables <>

If you have already created your model and want to make it able to be versioned, you are going to need a new migration, this will add the version column to your model, and create a versioned table for it:

class AddVersioning <>

Now just run
rake migrate
to apply the changes, and this takes care of setting up everything we need for the database.

Anytime that our model is saved, it will store a copy of itself in the versioned database, in our case called product_versions. We are provided with most of the functions we need in the acts_as_versioned plugin.

Some useful methods are:

find_version(version) - Use this to find a specific version of a model.
find_versions(options={}) - Use this to find versions of a model. Takes an options hash like find
revert_to(version) - Use this to temporarily revert to a previous model. (doesn't save)
revert_to!(version) - Use this to revert and save to a previous model.

Some examples of how to use these methods:

To add a link to revert to previous versions and view other versions:

In your view:

<% for version in @product.find_versions.reverse %>

Version <%= version.version %>
<%= link_to '(revert)', { :action => 'revert_to_version',
:version_id => version.version,
:id => @product},
{:confirm => "Are you sure?" } %>
<%= link_to '(preview)', :action => 'show',
:version_id => version.version,
:id => @product %>
<%= version.comment %>
<% end %>

Obviously this code uses two methods which are not defined here, but in the controller

def revert_to_version
@product = Product.find( params[:id] )
@product.revert_to! params[:version_id]
redirect_to :action => 'show', :id => @product

def show
@product = Product.find(params[:id])
if params[:version_id]
@product.revert_to params[:version_id]

Thats all you need to have for a basic setup for acts_as_versioned, have fun experimenting more on your own.

For more information look up:
A good tutorial on using acts_as_versioned at

The acts_as_versioned documentation

Another good tutorial can be found at