dwink i owned a company and all i got was this stupid blog

5Dec/070

The Shoulders Of Giants

Yesterday I took advantage of an opportunity to meet Scott Meyers and listen to him give a talk on one of his current pet projects, which involved the use of some creative C++ template meta-programming tricks to, as he put it, "generalize const".

The talk was a lot of fun for a number of things: one, it got me thinking about the continuum between a code segment's state of being ( having this feature ), through documenting that state as intentional (it *should* have this feature), to explicitly enforcing the requirement of that feature. Another was that it was very heartening to see the author of Effective C++ and Effective STL bang his brain against the complexity of Template Metaprogramming -- now I don't feel quite so bad when I'm digging in the bowels of boost::python or boost::mpl and end up staring at the screen and drooling -- Scott's been there too.

It also got me thinking about how iterative technology really is. Truly 'revolutionary' technology isn't technically revolutionary -- it's an incremental improvement from the previous technical iteration. What makes it revolutionary is what it enables in real life. I write code all the time that uses things like std::sort, which is a relatively simple thing in itself, but it depends upon all the other things -- the containers, the memory allocation, the memory manager, the bit order, the instruction set, and so on and so on down to the bare transistors simply behaving as expected. Good ol' std::sort wouldn't be very useful without that stuff -- and each of those things were minor revolutions of their times -- we've built on them and created meta-stuff, with meta-meta-stuff to specialize the meta-stuff.

So today I can do template magic to make the compiler do some extra work for me, and object-orientation to make my programs reflect the real world better, and I didn't have to figure out all the details of how to make those things happen. I just had to learn how the giants before me organized it so I can reuse it.

Someday, perhaps, something that I build will be like that for someone else, a problem that I poke and prod until I come up with a solution will become another std::sort for someone to grab onto and turn a task from impossible to possible, and from possible to simple.

Whenever that happens, though, it'll still be standing on the foundation laid by the giants who came before.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.