When less is more.
Synchronicity is crazy. We are so singular and egocentric as people (*maybe it's just me*), and even in the face of instantaneous communication in this global village we are sure that our thoughts are unique
at least for today. I wonder, just with 5 billion people on the world (or maybe just amongst the population of connected blogging programmers depending own your own .NET-y version of the Drake Equation) why ideas come and go like waves in the general populous. Perhaps Im just looking for and seeing the patterns I want to see.
Ive been working on some Domain Objects for a project
fairly tedious, but they really aim to abstract away a lot of complexity. Theyre mostly data holders more than objects with lots of of behaviors. They are hiding icky data and presenting property accessors and data validation
mostly making life easy. But there's LOTS of them. Im seeing more and more points of intersection amongst a larger family of objects Im working with. Each object family is unique, but the spec for these objects really just defines its own grammar
why not just define 99% of it in my own throw-away XML grammar and generate the code? Code generation of course, not being a new thing by ANY stretch, has been on my mind. Hell, Ive been dreaming about it, and waking up the following morning and running to the computer. Id known of Gen<X> from Chris Sells, his office was down the street from my house. I've worked a chunk with the CodeDom. Lately I've just used XSLT which has served me quite well - I create code via makefiles as a part of the whole build with just my XML grammer and a bunch of stylesheets. This week, I'm also really grooving XCode.NET from Shawn Van Ness.
One day, I wake up and look around and John Lam is having epiphanies about code generation
what a fantastic world this is that I have access to others ideas this way. One might say that Code Generation is "on the collective conciousness." I dont have to wade through the flamewars of the USENET, I dont have to have a huge network of friends I email and chat with daily. Ive syndicated the minds of John Lam, Chris Sells, Clemens Vasters, and a whole bunch of .NET, OOP, Web Services, XML, patterns thinkin' people. Im really enjoying the ride.
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. I am a failed stand-up comic, a cornrower, and a book author.
Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.