Trying out Ruby on Rails

I made it one of my resolutions to learn Ruby this year, so I took a bit of time yesterday and today to try and get something working on my work laptop running Windows XP. I’d used the one-click Windows installer for Ruby a week before, so I was able to use RubyGems to install Rails. I put the latest version of MySQL on the laptop as well, since the tutorial I’m following uses it.

Instead of building the cookbook application the tutorial describes, I’m trying to build an app that serves a database-driven RSS feed. My reason is that we’ve done this for a client project with some old ASP code and I wanted to compare architectures and level of effort. So far, I like the way Ruby on Rails works. You can create an empty web app just by typing ‘rails ’ at a Windows prompt. The application directory structure follows the model-view-controller design pattern, so there’s no wondering about where to put certain types of code if you’re familiar with the concept. Generating stubs for controllers and models is also simple (“ruby scriptgenerate controller ” and “ruby scriptgenerate model ” in the web application folder respectively).

Development Ruby on Rails seems to go fastest if you follow their naming conventions for code, and the table names in MySQL. When the model name is singular form of the database table name in plural form (recipe–>recipes or podcast–>podcasts), using “scaffold :” in your controller definition autogenerates the CRUD operations against that table in the database. Making changes then becomes a simple database change exercise. Once a column is added, moved, or removed from a table, just refreshing the browser shows the changes.

I’ll probably go back through the cookbook example and follow it step-for-step before going back to the podcast example, just so I have something stock that’s working. The other thing I plan to do is to replicate my work on the Mac mini I have at home.


Who got money from Jack Abramoff

The entire list is here. It includes how much he gave and when.


Goals for 2006

Improve My Health

  • Exercise 3 times a week
  • Cook 3 times a week

Maintain My Hobbies

  • Shoot 36 film and/or digital exposures a week.
  • Post 3 shots on the photoblog each week.
  • Start re-learning the piano.
  • Go skiing once more (or snowboarding twice) this winter.

Strengthen My Faith

  • Read the Bible every day
  • Pray every day
  • Help out with a church activity once a month

Improve My Career

  • Work on a business plan once a week.
  • Learn Ruby
  • Attend one technology conference this year.
  • Attend one business conference this year.
  • Write a technical blog post once a week.
  • Contact a different person in my network once a week.

Teaching the Clinton Presidency

I admit it–I’m a C-SPAN junkie. The purpose of the open phones topic this morning was to air people’s opinions on how the Clinton presidency should be taught in middle and high school history classes. As is usually the case with these shows, the callers didn’t so much answer the question posed as bash George W. Bush or Bill Clinton. The calls I found the strangest were the ones that blamed Clinton for the current Bush years and for how divided the country currently is. Those opinions aside, my own is this: teach Clinton’s successes and his failures–all of them.

I voted for Clinton both times. Despite that, I don’t consider him the best president ever, or even a great president–merely a good one. In the success column: NAFTA, welfare reform, the economy. Perot said plenty on the “giant sucking sound” of jobs leaving the U.S., and that’s true. But that has as much to do with companies not doing what was necessary to modernize as it does with lowering tariffs. I remember being disappointed that Clinton signed the welfare reform bill, but in retrospect, it did get a lot of people off the welfare rolls. Clinton should get credit for mostly staying out of the way as the economy recovered from downturn under the first Bush. He should also get credit for increasing taxes on the highest earners in this country. That contributed a lot to the government going from deficit to surplus. I would count Clinton’s actions on Bosnia as a success too, if only because he helped get NATO involved in stopping the slaughter of Muslims there.

In the failure column: healthcare reform, Rwanda, impeachment. The failure of healthcare reform is perhaps the one with the most consequences for the present day. The voices who said there was no healthcare crisis when Clinton was trying to get this passed are probably the same ones who passed the narrow, expensive and poorly-planned prescription drug benefit. While Clinton isn’t the only one to blame for the genocide in Rwanda (the whole world stood by on that one), as the leader of the greatest military power in the world, his government’s inaction was very disappointing. Impeachment ranks as the worst of his failures from an opportunity cost perspective, not just the moral one. A lot of time was wasted that could have been spent doing far more useful things (like chasing al-Qaeda for example). It allowed people to question his motives for trying to do what was ultimately the right thing.


Windows Live Beta vs Google Homepage

My office gives us the day off tomorrow, but it’s pretty much a ghost town already. I had a bit of time today to play with the Windows Live Beta. I was curious to see whether it was a step up compared to my.yahoo.com or google.com/ig.

At first glance, live.com looks like a clone of Google’s personalizable page (though live.com is even more streamlined). It’s easy to add content to the page, whether it’s “gadgets” (the Google homepage calls them sections) or individual RSS feeds.

One particularly nice touch live.com has that I haven’t found on Google yet is a way to import an OPML file. To test it, I exported an OPML file from my bloglines account and imported it into live.com. Very quickly it showed up under “My Stuff” as “Subscriptions”. From there, it was very simple to drag and drop individual RSS feeds onto my live.com home page. I didn’t realize right away that “>>” meant content would open in a new window, but once I did, I liked the functionality much better. I wouldn’t use this over bloglines right now, but I’d be very interested to see if someone could come up with a slick gadget for newsreading.

A second convenient feature live.com provides is the ability to add the results of search to your home page. It’s like the News Alerts feature at Google News, only instead of sending you an e-mail, you see the results right on your page.

live.com seems to work equally well in Firefox or IE. If I had to choose between google.com/ig and live.com right now, live.com has a slight edge in functionality.

If you’ve already got a Microsoft Passport (and/or a Hotmail account), live.com is worth trying out.


Busier Ads from Google :-(

This article from the NY Times (free subscription required) tells us that those of us who use Google will soon have to contend with graphical ads. I suppose it was only a matter of time, but I’m still disappointed by the news. There are areas when simpler is better, and search is definitely one of them. We can only hope they’ll be small and tasteful (or that CustomizeGoogle will still allow us to remove them).


Acquired

Last Friday, just before the end of the day, I found out that my current employer had been acquired. The buyer: Lockheed-Martin, the multi-billion dollar defense contractor and member of the Fortune 50. It’s the second time I’ve been part of a company that was acquired.

When I first heard the news, I thought back to previous employers. At Ciena, we were the buyer. I was there when they bought Catena Networks, Internet Photonics, WaveSmith, ONI Systems, and Akara. I worried less when we were the buyer because it usually meant that any “redundancies” would favor Ciena employees over the acquired company. Our managers and execs would always have meet with us to put the most positive spin on these moves. The acquisitions were revenue plays of course. When I left marchFIRST to join Ciena, it turned out that I had merely traded the Internet bubble implosion for the telecom bubble implosion. We merely delayed the inevitable layoffs a bit longer.

MarchFIRST (the former USWeb/CKS) was a different story. We got to be on both sides of the equation. While I was there, we acquired a strategy firm, and sold out Whittman-Hart. While it was spun as a “merger of equals” by the old CEO and the new one, it was as much a merger of equals as the DaimlerChrysler hookup (and even more of a failure, since not a shred of the combined firm exists anymore).

Since Aspen is so small (1700 employees to Lockheed’s 130,000+), I feel plenty of uncertainty as to what will happen next. Do they value Aspen as a single entity or will we be broken up? Is this acquisition simply a purchase of people and contract vehicles or something more? In the e-mail we got from our CEO, he said everyone would keep their jobs. But I have my doubts that we’ll keep two HR and accounting departments for any length of time. What happens after those duplicated positions go away is what I wonder about. I think it’s likely that after 3-6 months, the best technology people will be cherry-picked for other spots in Lockheed-Martin IT. I’m not sure what that means for me, but I feel better about sticking around to find out than I might have otherwise.


Skiing

Yesterday, I got on a pair of skis for the first time since 8th grade. A friend and I went to Wisp to enjoy their cheap rentals and lift tickets (part of their 50th anniversary of operating). It’s a little weird to be an age where I can say I haven’t done something in 15 years (it’s actually 17 years, but who’s counting).

Skiing is a bit more terrifying than I remember, but ultimately a fun experience. After some initial awkwardness (ok, falling), I was able to get down a green run and a fairly challenging blue run in one piece.

There was one spill though, that introduced me to a new term: yard sale. Apparently, if you crash on a ski slope in a way that separates you from both skis, both poles, and a hat, it’s called a yard sale. On a run named “Boulder” (which should have been renamed Steep Sheet of Ice), I missed a yard sale by hat. Thankfully, I didn’t have more than a headache after, and there were no cameras.

For a more in-depth definition of yard sale (of course one exists), check out this link.


Microsoft doesn't get Test-driven Development

That’s what Scott Bellware contends in this blog post. He does a very thorough job of explains what test-driven development in meant to accomplish and how Microsoft missed the mark. In my own experiences with test-driven development over the past couple of years, I’ve found it to be extremely helpful. The code I’ve written using this practice was quite a bit better than code written without it. The primary objection I’ve seen to using it is deadline pressure. Some developers I’ve worked with find it easier to develop test pages, since that’s what they’re used to. The idea of writing code to help them design the finished product (instead of merely testing it) doesn’t seem to appeal to them.


Gmail signature graphic

I came across an application that generates signature graphics for Gmail, Yahoo, and other e-mail providers courtesy of this blog entry.


When clients (and bosses) go bad ...

I came across this article via the Signals vs. Noise blog. While the entire piece is 100% on target, this passage really spoke to my current situation:

But the worst are the ones that become slaves to their clients--often driven by the fear of losing one.

And fear leads to underbidding. And underbidding leads to… pulling all-nighters to make an impossible deadline on too few resources. (And the dark side is in there somewhere.)

It’s more fuel to do things differently when I (finally) start my own business.


Bush's Latest Appointment: Harriet Miers

Trying to find some information about Bush’s latest appointee to the Supreme Court, I found two comments especially troubling:

"The reaction of many conservatives today will be that the president has made possibly the most unqualified choice since Abe Fortas who had been the president's lawyer. The nomination of a nominee with no judicial record is a significant failure for the advisers that the White House gathered around it. However, the president deserves the benefit of a doubt, the nominee deserves the benefit of hearings, and every nominee deserves an up or down vote." — Manuel Miranda, chairman of the conservative Third Branch Conference
"This is a smart move. You try to pick a nominee that Democrats won't be able to criticize as much because they are a woman or minority. This is a classic Clarence Thomas strategy."

— Artemus Ward, Northern Illinois University political science professor.

For other reactions, see the full version of the article (free registration required).

They are minority opinions to be sure, the bulk of the comments so far range from polite to unalloyed praise for Harriet Miers. Still, I shudder at the mention of Clarence Thomas in connection to anything at all. Few things in politics have made me more angry than his nomination and confirmation to the Supreme Court. Thurgood Marshall’s record as a lawyer, his tenure as judge on the 2nd Circuit Court of Appeals (none of his 98 majority decisions was ever reversed), and his record as solicitor general of the United States (winning 14 of 19 cases he argued before the Supreme Court), stand in stark contrast to Thomas' brief and unremarkable tenure as an appeals court judge. Thomas was notable only for being a black conservative (and his alleged conduct while head of the EEOC). To replace a lion of civil rights like Thurgood Marshall with someone so opposed to what he’d fought his whole life for was has always disappointed me.

What’s sad is that Artemus Ward is probably correct. Miers won’t have enough of a paper trail for anyone to effectively oppose her–unless a significant amount of conservative reaction falls along the lines of Mr. Miranda’s commentary.


Debugging

With two of the projects I’ve been working on finally out the door, I’ve finally got some downtime at work. To make use of the time, I’ve started reading Debugging Applications for Microsoft .NET and Microsoft Windows by John Robbins. One recommendation he makes that’s very useful is to treat warnings in managed code as errors. I followed that advice for our in-house bug tracking tool (a customized version of the IssueTracker starter kit) and it revealed at least a couple dozen instances of methods that needed to be overriden, unreachable code, declared but unused variables, etc. I wonder how much of the code we’ve written since last year needs the same treatment?


$44.92

That’s how much it cost me to fuel up the Volkswagen Jetta I drive today. $3.59 a gallon, and only because I drove past stations charging nearly $4 a gallon for premium. Buying the same amount of gas in continental Europe or England would have cost me at least double that amount though, so I won’t complain. But telecommuting regularly is looking like an even better idea than it already was.


Refugees?

I was listening to C-SPAN on the way into work and one of the callers had an interesting question: why are the people suffering in New Orleans being called “refugees” in the press when people in Florida suffering from hurricane damage aren’t?

I checked out the Wall Street Journal this morning and sure enough, there was that word. Checked the Washington Post, same thing. Was the caller being overly sensitive? Maybe. Was he reading some racial connotation into the use of the word? Probably. But it may also be that the press has been sloppy in how it uses words. Usually you see the word “refugee” in the context of someone fleeing another country from religious or political persecution. The people in New Orleans aren’t running from some dictator, they’re from here. They’re just unfortunate enough to be too poor or too ill to get out of the way of the storm in time.


Taking Time to Think

Came across this blog post via digg.com. The management tips seem quite reasonable in isolation. But when I try to map them to my current workplace, I don’t know if my employer is necessarily ready. Guess it’s one of those “your mileage may vary” kind of things.


A Leap of Faith

I had a chat with a former co-worker at Ciena Corporation yesterday. I was surprised to discover that since one of the layoffs there, he and his family recently moved to Israel. When I asked him where, he said north of Jerusalem. As it turns out, they moved to Kochav Yaakov, in the West Bank. There was a big feature in the Baltimore Sun about it last month.

It certainly puts that conflict in a new light for me, now that someone I know is over there. I respect Glenn for his courage and pray that he keeps safe.


Robin Curry - AJAX and ASP.NET Resources

When my employer moves to the latest version of VS.NET, this article will get a lot more “hands-on” use.


VB.NET Coding Guidelines

My current project is the first one where I had to write a substantial amount of VB.NET code (I chose C# as the .NET language I’d try to learn back in 2001). This article had a lot of guidance I found useful.


4GuysFromRolla.com - Retrieving the First N Records from a SQL Query

Our development team found this article quite helpful during development of a custom portal. Unfortunately, the project is on indefinite hold.