Skip navigation

Monthly Archives: August 2008

Great page on what version control (source control) should be able to do and if it’s a fit for you.


I recently had a code problem I didn’t believe I would ever solve. I’m not the most agile programmer so a problem such as the following tends to intimidate me. However, with some help from a friend and PHP’s built in string functions, I came up with a solution.

Problem: Our dies had location codes based on an alphanumeric system such as “AA13”. After getting to “ZZ14”, we decided it was long past time to switch to a numeric only system. I needed to transform the old locations to reflect corresponding numbers (A = 1, B = 2, AA = 27, etc). Easy enough in text, but seemingly daunting in code.

Solution: Using an array of the alphabet, some string functions and some friendly advice, I came up with this:

Looking back, the solution seems much easier than I thought it would be. I suppose that’s how it goes.