chrisdaniel.net

  • About
  • Photos
  • I am currently looking for employment in the Portland area. See my resume in PDF, OpenDocument, or MS Word formats.

    Thursday, January 24

    Build ulcer-free webapps, please

    Filed under: Rants ::

    Recently, I’ve been heavily involved in moving the database / web application infrastructure of the company I work for; we have been migrating our production systems over to a new IP space and new physical space in a colocation center. In an ideal world, this would be a simple matter of changing IP addresses, updating DNS records, and then at least physically moving the servers (but probably bringing up second instances of them in the new location, then switching DNS and keeping the old ones in place for overlap for any public-facing applications). Well, in the real world, a small company like mine ends up having tons of old, poorly designed and poorly written web application code that has things like public IP addresses of database servers hardcoded — which means that, in addition to doing the ideal-world things, I get to sift through thousands of lines of hellish ASP code to make sure I get all the database configuration changed.

    Let’s talk about avoiding this situation.

    First of all: DNS is there for a reason — use it. Whatever you do, don’t depend on a public IP address (or any IP, really) to remain the same forever. Especially with web applications — there is quite likely a nice layer of caching between your application and the actual DNS lookup to minimise any possibility of DNS lookups slowing down your application, so just don’t worry about it. If there isn’t, you can add it. Later on, when someone’s moving the database server, they’re going to be pissed at you if they have to go into your application to change things instead of just making a single change in DNS (and maybe pointing the old record to the new server). Another reason for this problem is DNS admins who suck — create CNAMEs for services that point to A records for hosts (e.g., database.example.com is an alias for myhotdbserver.example.com). Implement things using the CNAMEs. Then, when you have to replace your decade-old database server because it keeps falling over under load, you only have to change where the CNAME points.

    Second: Don’t repeat yourself. How do programmers not get this? In my company’s case, we have a whole lot of little duplicates of the same application, each of which has some small difference (organisation identifier, branding, perhaps some very small difference in behaviour), but whose working information is stored in the database in the same format as all the others. Putting aside for the moment the fact that one application with many variables should have been used here … each little duplicate also has its own include file, which contains that information mentioned above that differentiates it from the other duplicates. What else does the file contain? Database connection information. That’s right, we’ve got tens of duplicates of the same web application, all completely intended to work off the same database, and each has its own database connection configuration. Why didn’t the programmer(s) of this thing take a few minutes of their time to simply create a global include file? I don’t know. I really can’t fathom it.

    So, I got to make changes in many, many files. Now, at least, they’re pointing to a DNS name that can be changed. Just, please, don’t inflict these evils on your sysadmins, gentle reader. Use DNS wisely, and put your configuration in one place.

    Thursday, January 24

    Announcing the MacBook Snare

    Filed under: Rants ::

    First, Apple made the iPod.

    The iPod was very pretty and easy to use; it became Apple’s biggest seller in short order, causing other portable music player makers to beef up their own products’ lacking areas in attempts to compete. Overall, the iPod was (and is) a very good thing for the portable music player “industry” — today, thanks to its competition, better alternatives abound. The iPod’s feature set continues to suck fantastically, but every once in a while it gets some new, shiny, marginally useful “feature” or upgrade (or new model that’s better suited to your jogging / casual listening style / whatever) … and Apple see absolutely no reason to improve its feature set. They have users nearly locked into their little world with iTunes, “MP3 player” is now completely interchangeable with “iPod” in the lexicon, and the iPod’s style and ease of use have overshadowed any lack of fetures or stability that might exist.

    It’s a perfect world for Apple — comfortable companies tend to show their bad sides quickly. We’ve seen Apple’s bad side showing more and more as they have grown.

    The PowerPC to Intel move … yes, there was a technical limitation of the PPC architecture that meant continued growth in the portable market was next to impossible; on the other hand, one of Apple’s huge selling points before the Intel migration was that the hardware was higher quality. Now, after the Intel change, you’re getting the same or similar hardware that you could buy from XYZ Computers on the corner … for the same quality Apple price. Why would I pay Apple’s price for PC hardware when their OS will run just as well on equivalent market-priced hardware? Support? I can get a decent warranty on just about any hardware out there. The pretty case, I guess?

    Then there was iPhone. Shiny! Easy! Full of shit. iPhone is the hardware equivalent of Windows Vista. That is, it’s lacking in every area — except the shiny — and just as locked down as anything Microsoft ever thought about building. I won’t even discuss the price. Thinking about getting an iPhone? Think a little more.

    Before I go any further, let me just say one positive thing about Apple: Mac OS X is a quality desktop OS. In my opinion, it is the only thing Apple has going for them right now. Its interface is clean, snappy, beautiful, and its core is solid. Operating systems can do better than OS X, but not in the usability department.

    The MacBook line is already tainted by the fact that the ‘books contain what is essentially commodity hardware at a higher price, as I already mentioned. But, Apple has to have a laptop line, and MacBook fills that need. I have yet to meet a MacBook owner who is dissatisfied with the product (I frequent a particularly “hip” coffee shop, so I have met a lot of MacBook users). The OS apparently more than compensates for any perceived ripoff in the hardware department. So far, so okayish.

    The announcement of the MacBook Air makes no fucking sense. Is your MacBook not small and light enough for you? Here, spend eight hundred dollars more for something underpowered and featureless.

    • It’s got MULTI-TOUCH! This is going to be truly useful when it is on a touch screen, and not before.
    • It’s got a SOLID-STATE DRIVE! Yawn. Call me when you’re at 120GB, less than $1000, and better than five hours’ battery life …
    • Oh, wait! It’s small! So it must be “ultra-portable,” whatever the hell that means. Seriously, if the MacBook isn’t portable enough for you (MacBook Air is actually wider and deeper; absolutely the only improvements are in thickness and weight), you’re doing it wrong.
    • Targeted at new Mac users? Really? Those people who are used to having optical drives? Those people who are used to spending $1000 on equivalent laptops?
    • It’s targeted at Mac fanbois? Now that I can believe.

    IT’S A TRAP.

    Wednesday, January 23

    Generalisation requested

    Filed under: Uncategorized ::

    “Women vote their ______; men vote their ______.”

    Generalise, please.

    Wednesday, January 23

    Wordpress!

    Filed under: Uncategorized ::

    I’ve finally taken the plunge. Welcome, and say goodbye to all those old, horrible posts.

    Yes, I’m using a random Wordpress theme. No, I don’t really care; this is actually quite nice.