ITU-T E.164 or How Phone Numbers Ruined My Day

thumbEveryone knows that we’re not supposed to reinvent the wheel, but there are certain wheels that everyone uses that we’re all forced to reinvent, reengineer, and/or re-implement.

Phone Numbers

Phone numbers are easy.  Area Code + Prefix + Line Number + Extension.  (555-555-1212 x105).  Oh but wait, what about those pesky foreigners?  They’re always throwing a wrench in our ethnocentric cogs with their Unicode and their right to left reading.  I jest, but supporting international users introduces a huge set of intricacies. Especially when their phone number is 19-49-89-636-48018 (A german phone number dialed from france, or so google tells me).

Are there any standard libraries or approaches to doing this?  None that I could find, so off I go to reinvent the wheel.

Names

Formatting and storing names is also annoying, and I have found no standard approach or library for doing so. Ok I have First, Middle, and Last name, but since everyone hates their middle name, I have First Last and Middle Initial. So I want to display the Name: "James R. Thigpen". Oops, I didn’t fill out my middle initial, so suddenly it’s "James . Thigpen".  That’s bad.  Well what if I have a name like Leigh Ann Douglass Roberts.  My first name field can have spaces now, apparently.  Oh and just try to auto capitalize McCoy.  I dare you.

Addresses

Do the lines of an address actually have a name?  I’ve only ever seen them referenced as Line 1 and Line 2. So I have a city, state and zip.  But my zip codes are either 5 or 9 digits. Unless you’re another pesky foreigner, then all bets are off.

These are just a few examples. Why are some of the most common bits of data in our lives the hardest to deal with in computers, and why hasn’t someone figured this out yet? The only reasoning I can come up with is that this information pre-dates computers and people’s awareness of how data format affects computability.

All I know is that writing another table that converts TX to Texas in my database will send me into a fit of rage.

(Totally awesome image courtesy of RubelCreative.com)

Agent of Change: Show, Don’t Tell.

At the Alt.Net Seattle, there was lots of talk of being an “Agent of Change”, an activist in your organization, evangelizing “The Way” where “The Way” is a whole truckload of TLA’s (Three Letter Acronyms) such as TDD, DDD, IoC, MVC, ORM, and practices such as Agile, XP, Scrum, Crystal, etc.

I had been trying to do this already, to show my team and company the value and benefit of these technologies and techniques with varying degrees of success. I think a critical point for me in my role as an Agent of Change (AoC?) was the dinner the Seattle Alt.Net Group (which was borne out of the Alt.Net Seattle Conference) had on April 30th. I drug my boss and one of my developers along with me (they were eager to go actually) and they got to meet some of the people at the dinner and, I think more importantly, see them interact. People discussing and evangelizing a lot of the same things I had been bringing to my team.

This dinner had a huge effect on them. The dev I brought was energized, and more than a little peeved that his newly acquired CS degree had never required a class in which phrases like “design pattern” or “Inversion of Control” were ever mentioned. All three of us came away energized and eager to learn.

I think when you’re a lone voice in your organization harping about this giant bucket of TLAs describing these relatively abstract concepts, it’s hard for people to take you seriously. If you can get that same audience, your team, into a group where people are discussing these things and their benefits, working out design problems and just discussion issues they’re passionate about, that in itself will be more valuable than a month’s worth of bitching about how much time you could be saving by using an ORM instead of stored procedures and ad-hoc SQL statements.

Put your team in an environment in which they are the minority, get them out of their spaghetti code comfort zone, and show them people whose work and lives are enhanced by the principles and practices that Alt.Net evangelizes.