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]
 Friday, July 01, 2005

CRW_3186My boss and I spent Wednesday and Thursday in Phoenix, Arizona on a business trip.  We were evangelizing some internal tools we've created over the last several years.  We left early Wednesday morning on Southwest Airlines and had a stop in El Paso, where I changed seats into the best coach seat I've ever sat in.  It was just behind the emergency exit row, and the seats were arranged such that there was no seat in front of me.

CRW_3211Let me just say something about Phoenix.  It is HOT!  We came up with a slogan for Phoenix:

Hell is cold in Phoenix

Anyway, the trip went well.  And our tools were well received.  For the first time, I made sure that my GPS was turned on as much as possible to enable me to geo-code my photos.  I used the WWMX Location Stamper from Microsoft Research to put the GPS track data into the photos.  I was hoping to integrate them into Google Earth, but they are no longer taking orders for the plus version which allows GPS track data to be integrated.

CRW_3218CRW_3226Also, in a bizarre coincidence, my friend Jeff Flint, who lives in the Seattle area, was in Phoenix on a sort of baseball tour.  So, Wednesday night, I ditched my boss and headed to the ballpark.  I was worried about the sun and the heat, but on the way there, I noticed that the smoke from the fires in California was making it much less intense.  Then, when I got there, an even better surprise.  The roof was closed and the park was air-conditioned, making it very pleasant.  Jeff and I watched the game, chatted, and generally caught up, which was great.  He managed to catch two balls during batting practice.

 

posted on Friday, July 01, 2005 5:53:07 PM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Tuesday, June 28, 2005

A large part of my time at work recently has been addressing scalability issues in some applications.  Most of these stem from poor use of memory.  Most of these applications were proof of concept that made their way into production code for whatever reason.  More and more we identify problems and when we identify them to the developer, this is the typical exchange:

Me: You're taking too much memory here by using type Xxxxx when you could have gotten by with type Yyyyy

Dev: I have to use type Xxxxx, that's what the data is.

Sometimes, you just have to take a step back and look at your bytes.  Sometimes, you need a profiler, but sometimes you can just do some math.

For example, if I have an array of dates that correspond to events, a logical choice for a datatype is System.DateTime.  However, if you've got millions of events, System.DateTime is relatively expensive.  Especially if you consider that your event times only have resolution down to the nearest minute and only represent times within the last several weeks.  The range, or domain of DateTime (ticks since the epoch) is overkill for your circumstances. You may have been able to get away with UInt16, which would have been 2 bytes instead of 8, which is a huge reduction. (Provided that you've shown this array of DateTime to be a significant part of your memory consumption.)

I'm sure there is some official name for this, but I'll refer to it as "constrained domain", where you know something about your circumstances or usage that allows you to reduce the range or domain of a concept in order to store it as something smaller to improve memory consumption.  Remember, just because a big, rich datatype makes things easier, matches a db schema, or is named the same as the concept you need to store, doesn't mean it's a good match for your scenario.

There are, of course, other considerations to make.  The Y2k problems were the direct result of taking this concept to the extreme (of course resources were in much shorter supply then than they are today).

So, when you are looking for places to trim your memory usage, look for places where you can constrain the domain of a concept and store it in fewer bytes.  Also, if you're in CLR-land when you do this, look for boxing value types.  Remember, bytes in a System.Collections.ArrayList take up 5 bytes each, not 1. (9 bytes in 64-bit land) (Yeah generics)

posted on Tuesday, June 28, 2005 8:17:05 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]
 Monday, June 20, 2005
I stumbled across something very cool while investigating my MSBuild problem.  Former MSBuild team member Jomo Fisher (now on the C# team) has an extremely simple way to target the 1.1 framework with VS 2005.  For many people I know, this was the only roadblock keeping them from using 2005.  Awesome stuff.  I think this should be definitely be part of the final release.
posted on Monday, June 20, 2005 11:47:26 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]

I ran across a known bug in MSBuild in Whidbey beta 2 that caused me considerable headaches today.  It seems beta 2 will not copy project references to the bin directory of web projects when compiling with MSBuild.  This issue will be fixed in the final release, but I thought some Google juice might help someone else find the definitive answer with less frustration than I had.  Here's a relevant forum post on the subject.

In the meantime, I'll simply add a copy task to copy the relevant assemblies to the bin directory.

posted on Monday, June 20, 2005 11:19:01 AM (Pacific Standard Time, UTC-08:00)  #    Comments [0]
 Tuesday, June 14, 2005
About 2 years ago, I wrote about wanting an edger.  I finally got one.  I have no idea why I waited that long.  I've been using my weed eater to do it, thinking that was almost as good.  I was wrong.  While the weed eater works better than a spoon, it is quite time-consuming and uncomfortable (mine doesn't automatically swivel to spin vertically), so I put it off, then the lawn encroaches on the sidewalk and driveway so much that it takes even longer to do, which makes me want to put it off longer.  I finally settled on the Black and Decker Edge Hog since I've been pleased with my Leaf Hog.  It works very well.  I edged the front for the second time with it in about 3 minutes (the first took longer because I had alot of material to cut).  Now, my lawn is the best looking on the block. (now that the guy across the street moved out.  He was a fanatic and had an amazing lawn)
posted on Tuesday, June 14, 2005 11:44:27 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]