|
May 2006
May 24, 2006
Know Your Syntax
I'm married to an English teacher, and in fact I was an English major in college, myself. So I'm WAY more familiar with the rules of English grammar than I'd like. Like most folks, though, I slip occasionally. That's okay on the odd blog entry, but not so good when compiling code.
You see, the human mind is a lot better at dealing with ambiguity, unclear antecedents, and subject-verb disagreement than is a compiler. Pete Becker brings this point home in his piece Living By the Rules. It's about more than simple syntactic or semantic rules—these rules can combine in subtle ways, just like words in human languages, to layer on new levels of ambiguity and imprecision. Study the way these rules interact, and you'll just instinctively write better code.
Posted by Kevin Carlson at 02:40 PM Permalink
|
May 10, 2006
Editor's Note
Richard Vaughan's article, Hares, Tortoises, and the Decorator Pattern compares and tests overhead incurred in dynamic vs. static creation of decorator chains: sequences of objects of identical type but diverse function.
Vaughan proposes that, perhaps contrary to intuition, use of recursive templating to create static decorator chains offers the same advantages as dynamic approaches, plus several additional benefits, including simplified optimisation and reduced use of pointers; and can, in many cases, produce tighter code.
Posted by Kevin Carlson at 05:19 PM Permalink
|
|