# Thursday, 22 June 2006

I’m a huge fan or runtime code generation.  I think it solves a lot of common problems in modern applications.  However, the .NET implementation of runtime code gen, a.k.a. the CodeDOM, is viciously difficult to learn and use.  I think that’s holding many people back from implementing good solutions using runtime codegen. 

For example, it takes all this

CodeConditionStatement ifArrayNotNull = new CodeConditionStatement(

    new CodeBinaryOperatorExpression(propertyRef,

    CodeBinaryOperatorType.IdentityInequality,

    new CodePrimitiveExpression(null))

    );

CodeMethodInvokeExpression convertExpr = new CodeMethodInvokeExpression(

    new CodeTypeReferenceExpression(typeof(Convert)),"ToBase64String",

    new CodeExpression[] { new CodeCastExpression(typeof(byte[]),propertyRef)}

    );

ifArrayNotNull.TrueStatements.Add(convertExpr);

to make this

if(myObject.Property != null)

{

    Convert.ToBase64String(myObject.Property);

}

Not only is it a lot more code using the CodeDOM, but it’s certainly not the kind of code that you can just pick up and understand. 

There must be an easier way.  Refly helps a bunch, but last time I tried it I found it to be incomplete.  It’s certainly a step in the right direction.  It’s certainly a model that’s much easier to understand.  I wonder if, in the end, it’s too limiting?  There may be a good reason for the complexity of the CodeDOM.  Or there may not be.

Thursday, 22 June 2006 16:32:32 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  | 

Next Wednesday evening, I’ll be talking about the wonders of source code control at this month’s PADNUG meeting.  If you’re currently using SCC, you might get some tips for making better use of it.  If you aren’t, you’ll find out why you should be, even if you work alone.  I’ll be focusing on the role of SCC in agile development and continuous integration.  I’ll also talk about some of the many version control systems available, and which one(s) may be right for your environment (as well as which ones you really shouln’t be using:  you know who you are…). 

And there’s pizza!

Thursday, 22 June 2006 15:33:23 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
I hope not.  But since it seems to otherwise be a good recording, I fear it’s so.  Check out Hanselminutes 21, wherein Scott interivews Jeff Atwood and I about the relative merits of Subversion vs. Team System.  Taking the show on the road was a great idea, and all the segments came out very well.  I’m amazed that he and Carl were able to clean up the audio to the point that you hardly hear the other 7–8000 people in the room with us.
Home | TechEd | Work
Thursday, 22 June 2006 15:28:15 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [1]  | 
# Monday, 19 June 2006

On Saturday, Vikki and I participated in this year’s NW Emergency Response Team Rodeo, and had a blast!  This event is for ERT groups from NW Oregen/ SW Washington to meet each other and practice their skills.  We got assigned to mixed-jurisdictional teams, each team about 6–8 people, including one radio operator.  Each team then rotated through 10 stations where we got to practice triage, cribbing and extrication, first aid, victim transport, fire supression, SAR, etc.  Big fun. 

This year it was hosted at TVF&R’s training facility, so we got to put our car fires, search a 5 story building, look for victims in the dark, and extricate victims from under actual rubble.  Best of all, we had instructors from fire departments all over the area who were coaching and teaching us (most of them on their own time, thanks guys!).  Disneyland for safety nerds!

We’re actually running another rodeo this year, in September, so if you’re on a local CERT team, come out and play.  If you aren’t, go get trained

Monday, 19 June 2006 11:33:51 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 

TechEd is over, and I’m starting to get back into being home.  I think I’m still on Boston time, so I was up at 5:00 this morning, but other than that it’s coming together.

I think my two biggest takeaways from TechEd, as compared to the last time I went (2003) are that there were way more women at TechEd (good) and the inconsiderate cell phone use was at an all time high (bad). 

Other key learnings:

  • the food was terrible
  • the TLC concept was much cooler than the “cabanas” last time
  • it’s very easy to write good tooling in VS 2005 + GAT + DSL
  • WCF and WF rock

I had a great time meeting new people, and it was very entertaining standing in the shadow of the great man. :-)

TechEd | Work
Monday, 19 June 2006 11:26:46 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, 15 June 2006

Slowing down now.  Me, not TechEd.  Very long days starting to take their toll...

That aside, I've seen some very groovy stuff over the last day or two.  WF as the controller in an MVC architecture, using rule-based activities in WF, WCF talking to an Oracle system over standards based web services (with security, reliable messaging, MTOM, et al).  Shy Coen did a good chalk talk yesterday on publish and subscribe patterns using WCF which gave me some good ideas.  I'm looking forward to seeing more about the Service Factory tomorrow morning.  Meeting lots of very smart people. 

I realize my sentences are getting shorter and shorter, and the nouns will probably start dropping out next.  Attendee party tonight.  Nothing I like better than 12,000 drunk nerds all in one place.  With batting cages.  I'll take pictures. :-)

On a completly different note, look to see some major changes to this blog in the next week or so...

Thursday, 15 June 2006 08:37:10 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, 13 June 2006
Scott and I are now done with our TechEd session, and all was well.  Whewww!  It was down to the wire, and I think we finished our slides about an hour before we went on stage, but we pulled it out in the end.  I think it went pretty well, but we'll see what the evaluations have to say about it tomorrow. :-)
Now I'm hanging out at the birds of a feather gathering ('cause, ya know, free beer) and watching Stuart strolling around wearhing a giant parrot on his head.  Not something you see every day.  Unless you work with Stuart.  I'm looking forward to actually attending some sessions tomorrow, since I won't be worrying about how badly I'm going to suck.
I saw a couple of good talks yesterday, my favorite of which was Don Smith and Jason Hogg talking about web services security.  If you care at all about securing web services, check out their patterns & practices book.  It completely kicks the llama's @ss.  They presented an early version of their Web Service Factory, which is a guidance automation toolkit package for building and securing web services, either in Indigo or in WSE 3.0.  Very groovy stuff. 
I also saw a good one this morning by Pravin Indurkar on building state machines with WF.  They've really thought hard about this, and I really think that it's a viable solution not only for building state machines, but for using said state machines for driving UIs.  Pravin had a very compelling UI demo that was mainly driven by the workflow instance itself.  Excellent.
More tomorrow after I've had some time to absorb some new content.

TechEd | Work
Tuesday, 13 June 2006 17:03:00 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  | 
# Monday, 12 June 2006
I'm here in Boston (finally).  I haven't done it in a while, so I'd nearly forgotten how much fun it isn't to fly cross-country.  2 hour delay in Denver (just because), followed by the usual hassles of airports, shuttles, etc.
Anyway, after only 12 short hours, I was here.  I hustled over to the convention center to make it in time for the keynote, only to be pretty disappointed and leave early.  The keynote (at least the bit I staid for) was very buzzword oriented.  I understood all the words coming out of Ozzie's mouth individually, but strung together they didn't make any sense.  So, I opted for dinner and a beer instead.
I ran into Scott in the lobby, and ended up hanging out with an ever growing crowd of clever people in a blur of beer and chicken fingers.  The highlight for me was talking Ruby with the (quite) clever and (highly) articulate John Lam.  There's apparently a lot about my programming environment I don't consider very deeply. :-)
The first sessions are about to start, so I'm off to see if I can learn something. 

TechEd | Work
Monday, 12 June 2006 06:00:02 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
# Thursday, 18 May 2006

My wife (Vikki) finished her CERT training last night with her final excercise.  The rest of the family turned out for victim duty.  I got to be the “wandering guy” who’s wandering around the scene looking for someone.  Always a challenge to deal with.  I can walk around in circles like nobody’s business, so it was the role for me. :-)

We did the “airplance crashed into a crowd” scenario, so everyone got made up really gross with burns and compound fractures.

the crash

the crash

burns

burns

gross

the compound fracture

ouch

that’s gotta hurt

the team

they go to work

VikkiCert

Vikki’s all done!

And now for the plug...
All this training could be yours for free.  Classes are open to anyone who lives or works in Hillsboro (if you don't, look for a CERT program in your area) and are 3 hours, one night a week for 8 weeks.  You'll even get your very own hard hat, safety goggles and gloves courtesy of the city.  The next class will start in the Fall.  Check out the Hillsboro CERT website for details.  If you'd like to support our program, check out our gear site on CafePress.  Proceeds all go directly to the CERT program.
Thursday, 18 May 2006 08:04:39 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  | 
# Tuesday, 16 May 2006
Last night, Vikki and I taught the first version of a class on “survival cooking” for our local CERT program.  We talked about scenarios to plan for, what kind of food to store in case of emergency or disaster, and how to cook it once you find yourself there.  If you are interested, the handout from the class (with references) is here.  The class went quite well, and we got to eat the fruits of our labors. :-)  The biggest learning I came away with is that Datrex brand survival rations are much tastier than I would have thought. 
Tuesday, 16 May 2006 13:49:08 (Pacific Daylight Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  |