Friday, August 12, 2005

This is awesome.  Joe Duffy reveals what I had suspected.  A change to the CLR that will fix the issues I've previously discussed about nullable types in version 2.0!  From his blog:

The core of this change is that the IL box instruction has been modified to recognize Nullable<T>s. For non-Nullables, behavior remains the same; but upon seeing one, it inspects its HasValue property. If HasValue is true, box peeks inside the structure, extracts the T value, and boxes that instead; otherwise, box simply leaves behind a null reference. Obviously, unbox has also been changed to allow nulls to be unboxed back into Nullable<T> structures. This had a rippling effect in the CLR codebase and also required changes to late-bound semantics to mimic the static case.

This is fantastic, and reveals just how strong Microsoft's commitment is to the development community.  I gave my feedback on this before.  I felt it was a problem that aware developers could understand and live with, but I felt that novice developers would struggle with it, and ultimately it would make the feature, and the platform less understandable and approachable.

As you can tell from my earlier post, I had pretty much decided that MS would be unable to fix it at this late stage in the game, and that would be a shame.  But, thanks to some good decision making, they've done it.  Also, the solution was quite similar to my suggestion, I'm happy to say.

Be sure to follow through and read Somasegar's post on the subject.

posted on Friday, August 12, 2005 10:04:23 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
 Thursday, August 11, 2005

We're migrating an app to 2.0, and I've come across a rather bizarre behavior.  Basically, after running for a while, the app will begin taking up 100% of one CPU.  Perf counters would indicate that the process is in GC (% Time in GC is very high).

Now, some background.  This is an ASP.net app. We've got very aggresive caching such that the static memory footprint is about 600MB. When things first get going, everyting behaves wonderfully.  Then, at some point, the GC gets hungry or something and starts chewing up cycles.  The heaps never go down.  No allocations are being made.  Nothing tangible seems to be going on.

When requests comes in, they are handled normally, and the GC seems to "get out of the way".  (DB wait time is accompanied by 0% CPU) But after the request is completed, it's back up to 100%.

This app worked fine under 1.1.  And I guess there's an argument that says it still does.  It just doesn't play nice with anything else on the system.  I'm just kind of writing this to get this problem out there in case anyone else is seeing it and is searching for a solution.  I'll probably also ping a few folks at MS to see what they have to say.

[UPDATE] Check out this update.

posted on Thursday, August 11, 2005 10:46:20 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Friday, August 05, 2005

I finally got around to upgrading the ol' blog. I was just getting too much trackback spam.

Sometime I'll get around to customizing this new theme. I was getting tired of the old one.

posted on Friday, August 05, 2005 4:00:20 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Tuesday, August 02, 2005

A few months ago, I had an entry that showed how to easily get to 32-bit explorer land within 64-bit WindowsXP using Internet Explorer to navigate the file system.  This makes it possible to use 32-bit shell extensions.  In Vista (and possible the IE7 beta on XP), this behavior appears to have changed.  Navigating to the file system simply opens up a new explorer window in the current explorer process rather than loading it within the IE frame.  This is the only gripe I have so far on Vista, and it's probably an IE change, and probably by design.  I'm sure this was changed to reduce the surface area for possible phishing schemes I can think of, but it sure is annoying.

I've seen some possible workarounds on TweakVista and elsewhere, but none that I found satisfactory (I don't want to run the 32-bit explorer as my shell).  So, I may see about throwing together a little app that can host a 32-bit explorer process so I can use my shell extensions like TortioseSVN.

posted on Tuesday, August 02, 2005 9:50:55 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
 Monday, August 01, 2005

As if I didn't have enough fun stuff to play with, the first Windows Vista beta was released last week.  I put it on my little laptop first, where it ran very well, but I was disappointed that the new visuals didn't run on the crappy video card it has.  So, last night, I put the 64-bit version on my PC, which has a recent ATI card on it.  Everything runs great on it and it's quite beautiful.  Both installs I've done have been utterly trouble free.  It brought back pleasant memories of installing the 95 beta and waiting with anticipation through the "Starting windows for the first time" screen, which always reminded me of that cereal commercial..."taste it again... for the first time".

This evening, I'll be putting my apps back on the PC, so we'll see if I run across any problems there.

posted on Monday, August 01, 2005 10:06:07 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]

Becky's dad came down this weekend and we caught a Round Rock Express game.  It was really fun. I got me a huge hot dog.  We were on the third base foul line, but didn't get any balls near us.  They were playing the team from Colorado Springs.  The "Sky Sox" I believe.  Then, on Saturday, we picked up Becky's mom from the airport and headed to my favorite restaurant, P.F. Chang's.  After taking Becky's dad to the airport Sunday afternoon, Becky, her mom, and I headed to Belton, where we met up with my parents and ate at the new Roadhouse (warning, link plays annoying music) in Temple, where I finally got to pay for some food.

posted on Monday, August 01, 2005 9:59:38 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
 Thursday, July 28, 2005

Sorry for the sparse updates.  I've been head-down on quite a few projects recently, so most of my ramblings have taken the form of internal blog entries and emails.  For the last several months, I've been pushing my co-workers to think about migrating to Whidbey (The next version of Microsoft's .Net Framework, the CLR, whatever you want to call it) sooner than later.  Most people know I'm an early adopter of new technology, and always take my suggestions as the ravings of someone infatuated over new things.  However, we're finally moving that direction for one of our biggest tools as a result of some performance optimizations I was able to do with new features provided in 2.0 (namely generics, iterators, and some new asp.net goodness).  The performance opportunities alone are return enough for the investment.

Rico shares with us an overview of these opportunities, and it's a good enough list that even a manager can see the benefits, many of them handed to you without any additional work.

posted on Thursday, July 28, 2005 6:53:41 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Monday, July 18, 2005

I had occasion to build a shell extension the other day to add a column to explorer's detail view.  I was getting all mired in the interop between the Win32 interfaces and such until I found this CodeProject sample.  Big props to it.  It's one of the finer CodeProject samples I've seen.  I thought this entry might send some more Google juice its way for other people looking to do shell extensions in the managed world.

Anyway, it was pretty easy after seeing a working version of all the interfaces and structures for the interop.  There's alot of tricky legacy stuff in there like interesting byte packing schemes.  Hopefully, with WinFX, this will be much simpler to do from managed code in the future.

posted on Monday, July 18, 2005 9:06:52 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
 Friday, July 08, 2005

Heath and CourtneyWow, I can't believe it's been 5 days and I haven't made an entry about the 4th of July fun.  We spent the weekend in Belton with my family.  On Sunday, we hooked up with Heath and Courtney Robinson and their two sons, Gage and Soren. Ski-ball!It was quite fun to catch up with them and see how big their kids are getting. We took them to the mall and into the arcade that I think used to be Eckerds.  Watching them play ski-ball and air hockey,  with Soren barely able to see over the edge of the table was a blast. Here's the photo set of our meeting.

Bean Bag TossOn Monday, the 4th, it was time for the annual Miller 4th of July Olympics!  Usually, my mom comes up with a bunch of crazy games, and we play them and declare winners and such.  This year, Andrew wanted to be in charge of the games.  He did a pretty good job.  We started with the bean bag toss, where you try to knock wooden blocks with animal pictures on them off a saw horse from across the yard. CastingThen, we set up the casting competition, where we used a standard fishing pole equipped with a foam ball and tried to cast it into a pool.  This was quite challenging.  I got some pretty good shots of the moment when the ball hit the water.  After that, we attempted to drop quarters into various sizes containers which were submerged in water.  We all seemed to have drastically different theories about what would work, and oddly enough, most of them worked pretty well.  Most involved harnessing the rotational inertia of the quarter to prevent it from fluttering as it sank. CRW_3328Then, it was on to one hole of tennis ball golf, where you had to navigate a course with a tennis ball and 9 iron, which was also quite entertaining.  That was all for the outdoor games.  Next, we stacked Jenga blocks end to end to see who could get the highest.  For some reason, the girls were much better at that game.  After that there was a heated game of what we call "ball game", which is simply throwing ping pong balls in a trash can, in order to break a 3-way tie for second.  Once 4 place was settled, it ended in a sudden death round of "ball game" for second place.  The prizes were "winners choice" between:

The Winners
  • Some foam balls
  • A pocket knife
  • A vanilla scented candle
  • A small stuffed monkey
  • A velcro paddle and ball set

It was great fun. Check out the whole set for the games of the 3rd Julympiad.

Patriotic CakeAndrew made his patented secret recipe trail mix, which is alot like a bowl of candy.  His wife Sara made a delicious cake.  And we had lots of other goodies.  We didn't get to shoot any fireworks this year, which was unfortunate, but that just means we'll have to make up for it next year.  I hope everyone else had as much fun as we did.

 

posted on Friday, July 08, 2005 9:00:36 PM (Pacific Standard Time, UTC-08:00)  #    Comments [3]