John Lam 1997 — 2026

Sleepless nights and future plans

Thanks to everyone who said hi to Kobe! We can see he’s getting quite the fan club on the web as well!

I’m writing this entry after I took Kobe out three times to go potty. He signaled that he needed to go at 11:30pm, but it took three separate trips down to his spot (and about 1 hour of total time) before all of his business was done.

I suspect that some of the trouble was related to switching his crate from a wire cage to a Vari enclosed crate; this is his first night in his new crate, and there was the expected bit of resistance. However, he’s adjusting a lot better to the new crate than he did initially to his old crate, and we’re hoping that the smaller size and a more den-like feel will help him (and us!) in the long run. Now I have to look forward to the 4:00am potty run … I can’t wait until he sleeps through the night.

The peace and quiet that I get at this hour lets me reflect on future plans. There are two key pieces of technology that figure heavily into my plans: code generation and Longhorn.

I’ve been spending some time recently doing some consulting work on code generation in a large distributed .NET application. The feedback that I’m getting based on our initial week of consultation is extremely positive. I’m going to be spending a lot of time over the next few months working with this company to integrate code generation into their development process. I haven’t been this excited about consulting in a long time; I look forward to seeing my client succeed.

I’m very excited by the promise of code generation as a “force multiplier” in the development process. The abstraction level that you can reach is really unsurpassed by any other technique that I’ve worked with. You can simply generate better code faster using code generation. I’m seriously thinking about putting my ideas down on paper, and building a set of open source code generation tools. The tool I’m using now, gslgen, is a classic 80% tool. It does a good enough job, but there’s a lot of interesting ways that it could be extended. More on this later.

The second key technology in my future plans is Longhorn. However, since, I’m all NDA’d up on Longhorn, there won’t be anything showing up on this web site. The only thing I can say is make sure that you go to the PDC this year. This promises to be the most important PDC since the .NET PDC in 2000.

3 archived reader comments

YBabel (2003-03-13)

Yeah, code generation is great, but I think that, when it’s really useful, it’s equivalent to creating a “custom language”. That’s what Lisp already allow with it’s macro system for example. Other languages have this great feature : Dylan is one on them (it’s the one I prefer since Lisp syntax is “Write Once, Read Never” to me).

John Lam (2003-03-13)

I agree wholeheartedly that the really useful aspects of code generation result from creating a custom problem-domain language. That said, however, it is generally better to grab the low-hanging fruit when introducing code generation to an organization. Acceptance of the technique is key, and most folks that I show this technique to really need to see a good concrete example before continuing. This is why we’re focusing on the easy stuff first - generation of database schemas and the data access layer of the application. However, once they saw the utility of that approach, they readily came up with other suggestions - in the V2 timeframe, we’ll be tackling building business rule abstractions using code generation.

Jonx (2003-03-16)

I can’t wait for you to start working on your code generation tools. I’m actually using an ASP.net simpleworker process run from a command line to be able to write my templates in pure C# code inside a webform. Anyway… When will you start ? John.