Tuesday, April 05, 2005

CRW_2397867So, my recent drink of choice is also Robert Scoble's.  I found it to be one of a very small number of diet drinks that I can stand.  Among them are Diet Dr. Pepper and Diet Dr. B (a knock-off).  I find Diet Mug Root Beer to taste almost exactly the same as the regular version.

Robert, just don't leave it in the freezer and forget about it.  I wanted a cold one and the cans we're cold yet, so I thought a little freezer time would speed things up.  So, I forgot about it.  It was a mess.  It was pretty cool though.

posted on Tuesday, April 05, 2005 7:08:55 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Monday, April 04, 2005

This is what happens if you break your XBox communicator and still want to play.  Dave broke the plastic part that rests on your ears, so he's using a headband to hold it onto his head.  He said he was really hot after playing a while. Hilarious. 

posted on Monday, April 04, 2005 7:41:37 PM (Pacific Standard Time, UTC-08:00)  #    Comments [2]

4th of July FireworksWell, it's a new month, and you know what that means.  That's right, another 1GB of photos to upload to Flickr.  Most interesting of the uploads this week is my full set of 4th of July fireworks pictures.  These are from two sessions of fireworks launching.  One out west of Belton with my brother and his in-laws, and another with Jen and Dave's family out in Copperas Cove. During the later session, we were much better prepared for taking photos, so they turned out really good.  My new digital processing techniques really brought out alot of detail as well.

I have now loaded all of my pictures back to the point where I got my Canon 300D, so next comes the flood of older pictures from my old Sony DSC-S70.

posted on Monday, April 04, 2005 7:51:42 AM (Pacific Standard Time, UTC-08:00)  #    Comments [3]

I had two projects over the weekend.  One was to get my bathroom ready to install a new bathtub.  The other was an experimental coding project.

The bathroom preparation went fairly well.  I ripped out all the cabinets and countertops.  I'm glad my brother showed up unexpectedly because that countertop was incredibly heavy.  We also got alot of the carpet ripped up.  I'm going to be putting down new flooring as well.

On the coding front, as an experiment in adopting new features in Whidbey, I implemented a binary file parser for Standard Test Datalog Format (STDF) files.  These files make up 99% of the data we work with at work and that fill our many-terabyte test result database.  We have a fairly complex parser and db loader framework, implemented in C# on 1.x.  It works very well, but it was written early on in our adoption of .net with little knowledge of what the CLR could do for us. So, my experiment was basically to see how new features in Whidbey, along with my now deep experience in .net, could make the parser better.

STDF is record-based.  The spec defines alot of records, and leaves room for user-defined records.  The new parser reads chunks of the file based on the record headers and produces "unknown records".  I define the record layouts using attributes on record classes.  Then, the parser uses LCG (lightweight code generation using DynamicMethod) to generate converters to read the content of the unknown records into the concrete record classes (based on the attributes).  The benefit of using LCG is that record types could be registered or removed on the fly and the GC could collect the generated code.  I could have just as easily implemented it using on-the-fly interpretation of the attributes.  I'll measure and see how the performance works out.  The parser is pull-based, meaning that you ask it for records, or alternately just "foreach" through them using an iterator-based IEnumerable implementation, which is pretty sweet.  On top of the pull-based parser, I built an event-based "processor" where a consumer can register to receive certain record types.  This is the model used in our current parser, but after the XmlReader vs. SAX discussions, I thought exposing the pull-based approach was the right thing to do.

I had a few challenges, which I think represent work for the next version of the CLR:

  • Endian-ness - To my knowledge the framework does not have any mechanism to work with binary data with non-native endian-ness.  The STDF is written in whatever endian-ness is native to the platform, so the parser must adapt.  This was a simple enough problem to solve, but now that most of the other gaps have been filled, endian-ness represents a hole in what the framework provides.
  • Generics' proliferation - Generics are great, and saved me tons of code, but they have not made their way into the rest of the platform where they could be leveraged.  For instance, if I create a RecordField, there's not a simple way to do something like BinaryReader.Read() to actually get one, so I was forced into tons of ifs and switches, and passing Types around to get the work done.  It just didn't feel right.
  • LCG debugging - From what I understand, this was cut from Whidbey.  The workaround for me was to have two generation paths.  One would do LCG, and the other would do traditional Reflection.Emit that could be debugged and PEVerified, etc.  The problem with this was the argument were not aligned between the two.  When doing the traditional Reflection.Emit, ldarg.0 would give you the "this" instance, which didn't exist in LCG.
  • Handler registration (Generics compatibility) - Ideally, record handlers should work with concrete record types, but the way generics work a Converter is not assignable to a Converter even though Mir : StdfRecord.  Of course implementing that would complicate many things.  Interestingly, delegate(UnknownRecord unknownRecord) { return new Mir(); } will satisfy both delegate types.  So, this was just frustrating that Generics didn't help me out in solving my record handler registration problems.  There may be a solution that I'm not seeing here because of my approach.  Any ideas?

Oddly enough, I spent about equal time on both projects, but I seem to have alot more to say about the later.

[UPDATE] I realized that the entry box swallowed some of my generics syntax, so I fixed that, as well as fixing some minor spelling and grammatical errors.

posted on Monday, April 04, 2005 6:57:16 AM (Pacific Standard Time, UTC-08:00)  #    Comments [6]
 Monday, March 28, 2005

My dad got the pictures up of our water heater fiasco from yesterday.  He's got just about the whole process documented in pictures.  I had actually forgotten about using the chainsaw.  Check out the photoset!

posted on Monday, March 28, 2005 6:18:28 PM (Pacific Standard Time, UTC-08:00)  #    Comments [2]
 Sunday, March 27, 2005

Evidently, this is the weekend for floods.  Jeff (Flint) evidently had a flooded basement, and Becky and I discovered our guest bedroom was full of water.  We thought it was our washing machine, but it turned out that our hot water heater had developed a leak and had been dripping for some time.  So, I ripped it out of there and, with the help of my dad, put in a new one.  It was pretty easy.  I bought a torch because I had to sweat on a threaded adapter to make any future work easier.  That was pretty fun.  Thank goodness Lowe's was open on Easter.  Otherwise, it would have been a cold shower for me tomorrow.  Thanks, Dad!

With my mom's help, Becky was able to pull up the carpet and dry things out in the guest bathroom.  Thanks, Mom! (and Becky)

My dad got some pictures.  I would have taken some, but I was pretty busy and ticked off that I was having to spend my Easter replacing my water heater.  When he gets them up on Flickr, I'll link to them.

posted on Sunday, March 27, 2005 6:34:10 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
 Friday, March 25, 2005
Just saw the update on bungie.net! There will be 9 new maps! First 2 coming late April.  That is truly amazing. There are currently 12 maps.  They are almost doubling the game experience.  Check out the article.  It's going to be incredible.
posted on Friday, March 25, 2005 12:57:16 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Wednesday, March 16, 2005

The other day, Don Box announced the availability of the Indigo Community Technology Preview docs.  Now the builds are available on MSDN! (I suppose only to MSDN subscribers)  I've been looking forward to this for a while now.  I'm definitely going to be playing with it this evening.  I suppose I'll have to give up some Halo time.

For those who don't know what Indigo is, it's the unified programming model for building message-based, service-oriented applications.  It abstracts all the trickiness from you.  I won't get too much into it because the documentation does a fairly impressive job of explaining what it is.

posted on Wednesday, March 16, 2005 2:49:50 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
 Wednesday, March 09, 2005

CRW_1896Next in the backwards march through all my old photos is a huge set of photos of our trip to Busch Gardens in Tampa, Florida.  This was my first big trip with my digital rebel, so I was a little trigger happy.  Check out the photoset.

Since I moved to a hosting company, I took down my old photo gallery to reduce bandwidth and disk space. This is significant, because one of the most frequent search hits I get is for pictures of Busch Gardens. Now they can actually see them again.

 

posted on Wednesday, March 09, 2005 5:50:50 PM (Pacific Standard Time, UTC-08:00)  #    Comments [4]
 Tuesday, March 08, 2005

CRW_2080I'm slowly backfilling Flickr with photos, trying not to use up all my bandwidth before the month is over.  The latest is a photoset from last year's Florida vacation where Becky and I met up with her family for her brother Ben's wedding (look for those pictures soon).  We had a great time.  After the wedding, we visited the Florida Aquarium in Tampa.  Check out the photoset!

I've just about got my digital workflow down.  I've got a basic batch job to do the standard things to pictures (auto-contrast using levels, unsharp mask, etc).  I've figured out how to tweak the RAW settings to correct color issues and actually SAVE the settings for when I open that picture next time (which I had to do alot in the aquarium pictures because of the interesting stuff water does to color).  And I've got a process for tweaking individual pictures with things like pulling the details out of shadows (which works fantastically when working in 16-bits per channel).

posted on Tuesday, March 08, 2005 9:54:10 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]

CRW_2778Becky and I spent this weekend in Victoria Texas.  Why you ask?  Becky was playing in the Victoria Symphony!  I was really impressed with the fine arts culture of the small town.  Becky did a great job, and got to play one of the most famous 2nd horn excerpts (Beethoven's 3rd Symphony).  I got a "comp" ticket, and was basically the closest person to the stage.  I had stayed up all night Friday playing Halo 2, so I was overly tired at the concert.  I was enjoying the music quite a bit, but fighting hard to keep my eyes open.  It was very strange.  It was like my brain wanted to shut down all unecessary cycles except for listening.  I never fell asleep, but I did listen to much of the second half with my eyes closed, employing the standard techniques to not look as though I was sleeping of course.  Becky did great.  Perhaps she'll get the permanent gig!

CRW_2784CRW_2783After the concert, we went to the Sonic.  They had a credit/debit card machine built into the menu, which also conveyed useful information like "your order is being prepared" and "your order is being delivered".  It was really useful.  No fumbling coins in the food exchange.  It was sweet.  I hadn't seen those before anywhere, and I didn't expect to find it in a small texas town.  Bravo.

posted on Tuesday, March 08, 2005 9:40:47 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]