Tuesday, December 20, 2005

The Daily WTF

A co-worker just sent me this URL. I had a good chuckle looking at some of the code posted on this website so I figured I'd post it here for posterity. There's an RSS feed too so you can keep up to date with the latest WTFs.

Sunday, December 18, 2005

RadRails

I decided I would try downloading the latest milestone version of Eclipse 3.2M4 and set up an IDE without all the Java development tools and just the RDT (Ruby Development Tools) that would start up faster and let me do some Rails development with less clutter. Then somehow I stumbled upon the RadRails Eclipse plugin (gotta love surfing the web). So far it seems really quite good. I can run the WEBrick server, view my PostgreSQL database, hit the web application all within Eclipse! And it also gives me a colour coded RHTML editor and better code completion than RDT. I even just subscribed to their Podcast. I haven't used it extensively yet but so far I'm quite impressed.

Thursday, December 15, 2005

Rails 1.0

Well I obviously haven't been using my Mac for a couple days (where all my Ruby RSS feeds live) because I missed the 1.0 release of Ruby on Rails. I just went to the new flashy Ruby on Rails page and checked out one of their videos about creating a flickr front end. Holy moly! It may be an old video for all I know, but that is one very cool demo. Mmmm, AJAX and Ruby on Rails good!

Tuesday, December 13, 2005

Revolution

I was just listening to the Beatles' Revolution... Very appropriate lyrics for software development don't you think?
You say you want a revolution
Well, you know
We all want to change the world
You tell me that it's evolution
Well, you know
We all want to change the world

But when you talk about destruction
Don't you know that you can count me out
Don't you know it's gonna be all right (3x)

You say you got a real solution
Well, you know
We'd all love to see the plan
You ask me for a contribution
Well, you know
We're doing what we can

[...]

Monday, December 12, 2005

Buying Mac Software

With the popularity of the iPod, the fortunes for the Mac have been looking brighter too and with that, more retailers are carrying Macs. In Calgary, BestBuy and London Drugs are recognizable chains that carry the Mac. So with that in mind, I went shopping for a game for my son for Christmas. Well it wasn't a terribly pleasant experience. While the shelves are loaded with software for Windows PCs, Mac software is far more difficult to come by. BestBuy was the worst. They had NOTHING. London Drugs faired a little better but only had a few titles like "Mac OS X Tiger". I went to these stores first because their locations are more convenient to my place of work.

But in the end I went to WestWorld Computers on Centre Street in Calgary and was greeted with a recently rennovated showroom. There was lots of hardware and software on display and some knowledgable salesmen walking around. I immediately found what I was looking for and made my purchase. My lesson? Forget the big box stores and go for the focussed reseller.

PS: iPods are very hot Christmas items. People were buying them at all three locations.

Thursday, December 08, 2005

RoR & Foos together at last

Even as my spare time dwindles with the responsibilities of hosting the family Christmas celebrations at our house this year, I still try to find the time to continue my Ruby on Rails education. In 2005 I looked at a lot of technologies but RoR is one of the first to actually have me interested enough to do more than just read a book. Let me explain...

At work we have a foosball ladder which consists of a white board and a dry erase pen. While refreshingly low tech I thought "here's a problem just waiting to be automated with software!". Okay it doesn't really need software but it's a complex enough problem for me to get my feet wet with Rails. I unabashedly looked at the ladder options already on the web and (ahem) borrowed some of their ideas. I need to store information about players, teams, the ladders themselves, matches and the games in those matches and then I can go onto bells and whistles like enabling online challenge negotiations, the ability to mark a players status, and showing player/team stats.

So already I have several tables in a PostgreSQL database with a variety of relationships between them and I'm slowly figuring out what I can do with RoR's ORM tool ActiveRecord. So far I've been pretty happy with the support for optimistic locking, one-to-one (belongs_to & has_one), one-to-many (has_many), and many-to-many (has_and_belongs_to_many) relationships, dynamic finders, and transaction support.

I especially like being able to just play around in Ruby. I can mess with the tables, add and remove columns, change names, etc and then quickly see my changes take shape in my Ruby object model by running a simple Ruby script to create some objects and save them to the database. And no requirement to compile, or generate ORM XML mapping files has me feeling quite empowered.

Wednesday, December 07, 2005

Testing

I came in to work this morning only to listen to a QA lead and a senior developer discuss the almighty importance of tests (specifically unit tests). "They are the specifications, blah, blah, blah". But you know what I didn't hear, the importance of the actual software itself! Agile-development, test-first, test-driven, whatever-process-comes-next are all well and good but don't get so damn attached to it that you don't focus on what's really important, the software. Don't get me wrong, tests are important but they come a distant second to the system under development.

Thursday, December 01, 2005

Work's a drag

A few Pragmatic Programmer tips are:
  1. Provide Options, Don't Make Lame Excuses
    Instead of excuses, provide options. Don't say it can't be done; explain what can be done.
  2. Don't Live with Broken Windows
    Fix bad designs, wrong decisions, and poor code when you see them.
  3. Be a Catalyst for Change
    You can't force change on people. Instead, show them how the future might be and help them participate in creating it.
  4. Remember the Big Picture
    Don't get so engrossed in the details that you forget to check what's happening around you.
And I try to live by that... But with so many developers heading in different directions trying to prove how smart they are, I feel like I'm riding in an out-of-control freight car. The momentum is too huge to overcome by myself.

During some informal polling among other developers I get a pretty divere set of opinions. Some agree with me (but not on the same remedies), others are apathetic, and others feel that everything is just fine. So naturally I don't feel that comfortable pulling the handbrake. I just hope there isn't a sudden stop and a loud bang associated with this ride.

I guess there's a reason they call it "work".
Remarkable developers use remarkable technologies to do remarkable things.
[...]
If you don't have passion for software development you will not become a remarkable software developer, period.
- Chad Fowler

Tornado Foosball


We got a new foosball table at work about a week ago, a Tornado Whirlwind. Now I can fully indulge my addiction to this fun but difficult-to-explain-to-your-wife game. The Tornado tables are very solidly built and are designed for a controlled game. So while we still have some slaptastic players whose style of play is better suited to the "speed-ball" rules, most are coming around to trying to intentionally score a goal rather than just smacking it as hard as you can and hoping something good happens.

Digital Cameras

iPhoto on the Mac was first released in January, 2002 and nearly four years later I've finally joined the party by buying the Canon PowerShot SD450 digital camera. I learned that size is a pretty big consideration when buying digital devices and generally the smaller the better. The less of a hindrance it is to take with you, the more likely you are to use it. That's certainly been my experience with my iPod shuffle. I sometimes wish I had the features and storage of the larger model but the size is perfect. The feature I like best about my new camera is its ability to rotate the image according to orientation of the camera when I'm playing back existing shots. Very cool!