Sunday, December 24, 2006

A plead to Steve McConnell

I'm a fan of Steve McConnell's writing. But he has to stop working with Microsoft as his publisher if I'm going to be able to convince a high percentage of the people I know to read his books.

I've read McConnell's books, Rapid Application Development, Professional Software Development: Shorter Schedules, Higher Quality Products, More Successful Projects, Enhanced Careers, and a little more than half of, Code Complete, Second Edition. Two of those books are published by Microsoft (RAD & Code Complete).

I rarely disagree with something I read that Steve McConnell says or writes. He's got a new book out, and it's called (on Amazon.com), Software Estimation: Demystifying the Black Art (Best Practices (Microsoft)) (Paperback).

I personally don't have a problem with Microsoft publishing his books. I know that he hasn't worked for MS in a very very long time and MS is (probably) more of a grammar checker/physical distributor than an influencing factor in his writing. But when I hand a developer, Code Complete, they see the Microsoft logo on the cover, snicker, and say, "Oh, it's a Microsoft book. Yeah, I'll read that." (In the most sarcastic voice humanely possible.) There is so much bad software associated with Microsoft that a lot of developers can't take a book about writing software from them seriously.

AND NOW

Steve McConnell comes out with (another) book about software scheduling (that is probably really frigg'n good), but it's got the Microsoft logo on it. What does everyone associated with Microsoft right now? (Other than the XBOX 360.)

The largest "scheduling" debacle in the history of the software industry, Windows Vista.

I'll eventually get his new book, think it's smart, and want to hand it to someone and they'll snicker and hand it back to me.

Steve, for the sake of my ability to hand someone, Code Complete, Third Edition: The dynamic language edition, please find another publisher. (Or maybe I should just rip the cover off the book....)

Sunday, December 03, 2006

Google Docs as Blog Editor

Just an FYI. I wrote my last blog post in Google Docs. It's nice. I like it better than the textbox Blogger gives you! Unfortunately it doesn't send over the "file name" as the Title, I can't get Docs & Blogger to come together with the "Labels" in Blogger (I'm using the new beta), and the formatting output is slightly different. (See the extra spacing between paragraphs in my last post?)

Labels: ,

Pudding with proper URL's

I've finally made the switch to the fancy "subdomain as account key" style of URL's for Pudding. Previously, when you signed up for an account the URL you would work from looked like this:

http://www.ataraxispudding.com/company/yourcompanyname

Kinda ghetto!

The URL will now look like this:

http://yourcompanyname.ataraxispudding.com

I just finished squashing the last of the bugs related to change. I need to make a few more tweaks to the way the application reacts to "www.ataraxispudding.com", but the internals of the app are sound.

A few things about the transition
  • Setting up the server for wildcard subdomains. I've seen the configuration addition for Apache, and it looks dead simple. (It's like 1 line of configuration.) Unfortunately (for this situation) I'm using lighttpd, and the setup turned out to be a little more complicated. Luckily, Graeme Mathieson, has a really good tutorial for setting up OSX with a local name server (Thanks Tyler!), which you then use to work the wildcard subdomain magic. The write up has one small portion that confused me (and caused me to spend a hour scratching my head), so I'm thinking of writing up a super slimmed down guide to getting everything setup.
  • After the server setup, grabbing the subdomain is really easy with Ruby on Rails. I've got this in my ApplicationController:

before_filter { |c| c.subdomain = c.request.subdomains.first }

def subdomain=(value)
@subdomain = value
end

def subdomain
@subdomain
end

I just do my lookup for the user's account with, "subdomain", and it works!
  • Tests are your friend. The controllers that had a descent amount of functional tests (unit tests for controllers) were easy to get working with the new URL scheme - those without were a BEAR! I ended up writing a few tests along the way, which is always a good thing. But the funny thing is, the last bug I fixed was solved by accidentally looking at the command line output of the web server while I was trying to use the app in a browser.
  • Routing and code simplier. Removing, "company/yourcompanyname", from the front of the URL has made my Ruby on Rails routing file a helluvalot simpler! I did a little bit of refactoring with this change, and my URL's in general are easier to work with.

Speaking of refactoring... There is a bunch of refactoring I'd love to do with the code base of this application. This is my first Ruby on Rails app!
Overall, I'm very very very happy I made this change. I think it gives Pudding a more professional feel. It only took 2 working sessions to get everything going (I'm not counting the first session where I read up on HowToUseSubdomainsAsAccountKeys).

Labels: , ,