May 2008 Archives

Coupling: Bill and Steve

Long ago, I was pointed to a most insightful post about coding culture at Microsoft (Bill's company) compared with Apple (Steve's company). They observed that at Microsoft, there is a tendency is to use trees as the preferred data structure. Trees are certainly convenient and appropriate for many underlying representations, and are generally easy to manipulate. At Apple, on the other hand, there is a tendency to use hash tables.

Trees tend to impose a hierarchy, enforcing a one-to-many structure (regardless of natural relationships). Hash tables are a looser form of association, which don't necessarily impose structure. This distinction tends to reflect a subtle but significant difference in the underlying philosophy and approach to problem solving and architecture.

Feet to the fire...

No, I'm not talking about lazy Winter evenings on a rug... I'm talking about the responsibility of journalists to investigate, analyse, ask difficult questions, and cut through the hype and hyperbole.

So when a Senior Editor of eWeek sits down with a Microsoft SVP to discuss the recent deal with Novell, you would expect some thorough Q&A on this highly significant development. Instead, you get what reads like softball questions and slick pre-prepared answers.

iPhone musings

It's amazing how many articles about the iPhone have been produced online and in print over the last year or so, dedicated to covering the minutiae of Apple's big splash. Frankly, not owning one, I'm getting a little tired of seeing articles about it everywhere I look. So, I figure if you can't beat them, join them - and if every single other blog can have an opinion on the iPhone, so can I. (This was actually written a few months ago, and I cleaned it up for publication in an attempt to catch up on my backlog of half-written articles.)

STL Iterators and Performance

| 3 Comments

The Standard Template Library (STL) for C++ provides a set of powerful and flexible templated container classes. Never again will you have to hand-craft a doubly-linked list (and get your pointer arithmetic mixed up) -- just use std::list<T>.

Now most of the idiomatic C++ code I've read that uses STL iterators uses the prefix operator++ to move the iterator forward. And so I had long ago adopted this too, with a vague recollection of having read somewhere that it performed better. But why? Good question... (Updated: fixed formatting, got numbers the right way around.)