Apart from lazing around Lienz it has been a productive few days and I’ve more or less got most of the pieces of my code generators and infrastructure working in T4 now. Although the DSL Tools provide the graphical editors, and Visual Studio the hosting environment, it still amazes me how much stuff you need to do to get the code generation infrastructure into place: what to generate? How to generate it? Where to generate it too? How to automate that as part of your build? How to add the generated artifacts into Visual Studio? Or remove them?! How to support multiple users across models? How to manage and report errors in this process? How to manage symbols of generated code that is not checked in? etc.
“Process Issues”
I found the same thing with a code generation infrastructure I wrote a few years ago at my last company. Generating code is probably the easiest problem you have to solve! How you manage that code throughout the lifecycle and how you crowbar that into your infrastructure, build process and development environment is much harder.
I guess this is to be expected. We’ve been writing software the same way since day plonk: write code, check it in (maybe!), back it up, build it every night… as soon as you generate code or use modeling, you touch every part of the process that the old tool chain was written for and require it to work a slightly different way. Unless that old tool chain can be adapted you will fight it every single step of the way. Trust me, I know!
But new tools and techniques such as modeling and code generation require new ways of working and although the above process issues are not solved as part of Visual Studio or the old tool chain just yet, I’ve found I can just about solve them at least one way by driving the VSX API’s directly. This is excellent news! As code generation is adopted and these process issues are solved, standardized through consensus and experience, and integrated into the tool chain over the next few years, software is going to be a fascinating place to be!
(As you can probably tell, this field excites me!).
That aside, this has been my “office view” for the last few days… and yes, I am showing off
