Friday, July 27, 2007

Ruby on Rails

Well, the new job is a web startup that uses Ruby and the Ruby on Rails web development framework. So far so good. I generated a cheesy little app earlier this week.

Ruby is a scripting language that's sort of like a well designed, objected-oriented perl. Rails is a framework that stresses convention over configuration. This is orthogonal to the current Java and .net frameworks out there. Configuration of a Struts application, for example, is a pain in the butt. Yet Rails accomplishes the same task with almost no configuration. The reason is that with Rails you're expected to lose your ego and follow a few pretty reasonable conventions. For example, all table names are expected to be plural, such as "customers." All tables are expected to have an auto-increment column called "id" which is the primary key. When you follow the conventions, Rails generates workable web pages and Ruby code that create, edit, delete, and update rows in your database. The code produced isn't just hard-coded glop, however. It's reasonable Ruby code with plenty of hooks in it for inevitable real-world modifications.

Most web pages aren't too involved. They really come down to getting data from a database and displaying it and updating data that is already there. At my previous employer, we used an ancient VB3 application to making changes to reference tables (states in the country, transaction codes, etc.) While these rows didn't change often, when it did it was a pain in the butt. The application was flaky and didn't update all the reference tables. Due to auditing rules, we had to jump through hoops and otherwise waste a lot of time to use SQL in production. And there was no time to rewrite applications that were for internal use only! The end result was an permanent time-wasting application that was using obsolete technology, was buggy, and was a partial solution. Rails would have generated the bulk of the application in about 5 minutes.

Now, there are some complex web pages out there. I have not yet done anything really complex in Rails. So the jury is out regarding how much of Rails is just hype. I recall the hype surrounding Visual Basic. The demo was always a rolodex, and it went together quick. (insert oooos and ahhhhhs from the PHBs) Then, after the purchasing VP and his VP pals went out to a victory lunch, the programmers would figure out that when you got off the beaten path, the application framework collapsed and had to be entirely coded by hand anyway.

Here's some particularly egregious Rails hype:

[Rails] was super productive and it was super fun, too! A community of contributors grew up around it to make it even more productive and more fun! Rails has been growing fast. It has capabilities that you have to see to believe!!!

And in the same page, there's a little play, where the savvy programmer shows off in front of the boss:

Boss: Hey, CB ... you say it [Rails] lets you produce code like ten times faster than the tools we're using now?
CB: Yep. It's called Ruby on Rails, and it's at least 10x.

The web is full of statements like this. Maybe they are true. But such too-good-to-be-true comments make me very wary. I've been around the roundhouse a few times!

Here's the article. Actually, if you want learn a little about Rails, it's really good, cheerleading aside.

Sunday, July 22, 2007

Another 10 mile hike

My scout troop got in another 10 mile hike on Saturday. We went to Bernheim forest, just south of Louisville. The weather was perfect. This is the last hike we need to complete one boy's hiking merit badge. This also is his last requirement for his Eagle badge. His Eagle ceremony will be combined with my son's, as well as something for the scoutmaster, who has really gone above-and-beyond.

Here's a link to a topo.

Thursday, July 19, 2007


I'm between jobs now. Actually, my next job starts Monday, but I'm taking some time off before it starts. Just detoxing from the previous job and doing things around the house. The wife isn't lashing me too bad :-)

My son and I worked on the porch some...

Ms. Stormcrow makes lots of quilts and wanted to display one in the kitchen. I designed a quilt rack to her specs. A decade ago, I was going to make a Arts-and-Crafts-style bed, but it never happened. So I had plenty of white oak sitting in the shop taking up space. Much to my dismay, the oak was all still rough cut, so I selected some planks and hand-planed a straight edge on each with a Stanley #8C. Then I cut the lumber to width on the table saw. I planed it to thickness using a planer.

I mention the planer since I love the freedom it gives me. I don't have to accept the standard 3/4" thickness. I left the brackets at 7/8" so there would be plenty of wood for the hanging hardware, thinned the top from 15/16" to 3/4" to save weight, and made the hanger bar at something like 9/16" so it would fit through the brackets easier.

Other that the wood being gnarly, the grain changing directions several times on the edge I was trying to bullnose, everything went smoothly. I finished it with some typical Minwax stain and a coat of water-based poly.

Today I hung it in the kitchen using some really excellent drywall hangers.

She's happy. When momma's happy, everyone's happy.

Saturday, July 7, 2007

The AK-47 turns 60

The favorite weapon of freedom's enemies turns 60 today. It's quite a big to-do in Russia. Vladimir Putin is making a show of it. Why not, it's about the only they ever built that's worth a damn.

Here's an article about it.

Two haikus:

No more retreating
Dreams of farm machinery
Instead, Kalashnikov

(I respectfully beg an extra syllable due to the long Russian name.)

Noble intention
Unintended consequence
Adolph laughs in Hell

Tuesday, July 3, 2007


Empty cubicle
Forgotten papers rustling
Someone took the chair