Upcoming Architect's Breakfast

ObjectSharp has been doing a bimonthly Architect's Breakfast seminar for about 6 months now.  The idea was to provide architects information on enterprise level topics without impacting significantly on their normal daily routine.  It has been quite a success.  Enough so that we're making a couple of changes.  First, the Toronto sessions will now be monthly.  Second, we are introducing a bimonthly seminar in the Kitchener/Waterloo/Cambridge area. 

If you are interested, this month’s topic is Business Intelligence and SQL Reporting Services. You can find all the details here:

Toronto: http://www.objectsharp.com/TTDInvitation/BusInt_invite.htm

Kitchener: http://www.objectsharp.com/TTDInvitation/BusInt_inviteKW.htm

Grabbing the contents of your clipboard

Want to see something that's a little freaky?  Check out this post. Apparently you can grab the current contents of a user's clipboard through Javascript running in a browser.  While this probably isn't as much a security issue as some might think (after all, there really is no context for the data that is retrieved), it is interesting that it's even possible.  Thanks to Blair for the heads up.

I know a celebrity!!!

One of my colleagues, Barry Gervin, is part of a wonderfully generous effort to raise money for Aceh Aid at IDEP.  Twenty-four of the best and brightest of the .NET community are each donating an hour of their time to be put up for auction on eBay.  Julia Lerman has more details here. Keep an eye out for the auction and please bid generously.  You know the hour of any of these consultant's time is worth it.  And you're money does good in an area that desparately needs it.  Nice combination, isn't it.

Generating Passion in your Life

Found another interesting blog entry on passion by Kathy Sierra on generating passion.  And we're talking about passion for technology and life, not that other thing.  Too much of that other thing resulted in the four kids that currently occupy much of my non-working hours.

The basic premise is that people tend to emulate those around you.  Hang with complainers and you will (subtly, perhaps) become one).  Hang with people who love what they do, and you will too.  Interesting that I've actually seen happen.

My wife, Alisa, is a real estate agent.  She has been doing fine, but this past November she had a chance to go to a conference which, as it turns out, contained a high percentage of very successful agents.  And by successful, I'm talking $500K per year and up in commissions. On her return, the level of enthusiasm for her profession was visibly higher.  Not only that, it carried over into the the rest of her endeavors.  She is well on the way to doubling last year's sales.  And possibly tripling it.  All because she spent some time hanging with passionate people.

As you look towards the rest of the year, there are a number of opportunities for you to do the same thing.  VSLive has conferences all over the world.  There is TechEd coming in June and a Professional Developer's Conference.  Attending and hanging out with people who love what they do might do as much for you as the technical content.

Should DSL use UML

I have been quietly following the ongoing conversations regarding Domain Specific Languages (DSL) and whether UML should be used as the mechanism to describe them.  My UML and DSL knowledge is not nearly as deep as some of my colleagues, but I believe that the noise level from this space will only increase over the next 12-18 months.

As part of my blog reading (via Don Box), I came across a number of postings from Grady Booch and Alan Cameron Wills talking about both sides of the issue. But to me, the most interesting part was actually in one of the comments to Alan's post.  Specifically, Lloyd Fischer says:

Anyway, we spent a lot of time thinking about visual representations of software. It turned out that the times we were successful was when the system in question *already* had a visual representaion. Examples are piping and instrumentation diagrams, electronic schematic diagrams, ladder logic diagrams, etc.

In those cases where we tried to create new visual representations we failed. The "business users" invariably rejected our attempts to turn their knowledge into diagrams because they were unnatural to experts in the field. The fact that they had not yet created such diagrams was a telling sign that no such representation was possible. Those fields where such representations were useful had long ago created them.

That is probably the best argument in favor of using something *other* than UML to describe DSLs that I have heard.  That UML (or diagrams, in their world) doesn't fit with the mental model that the domain experts already have is very telling.  After all, the experts aren't constrained by anything when it comes to describing their world outside the realm of software.  They have white board, diagramming tools, everying that a designer would need.  If that was the way they wanted to go, they'd already be there.  And yet they're not.  I think this is one case where we need to listen to the experts and find a way to represent the mental model that they have spent years developing.  Seems more productive than forcing our way upon them.

Maybe I'm just cynical, but...

Through Dare Obasanjo's blog, I was pointed to a 'conversation' between Adam Bosworth of Google and Krzysztof Kowalczyk about the open source contributions.  It all started when Adam 'asked' the open source community to fix a problem with commercial databases for those customers who need to maintain high availability and scalability across large clusters.  Krzysztof (and others) suggested that Adam was trying to get the open source community to play tooth fairy. 

Although at first blush, it certainly sounds like having the suggestion implemented would greatly ease Google's ongoing operational effort, in a follow-up post Adam says that he wasn't asking for Google, that Google already has what it needs for storage and indexing. He then goes on to scold the critics of his posts, saying that they don't appreciate what Google gives our for free millions of times a day.

I have two issues with Adam's comments.  First, if Google has already solved this problem, why have no contributions to the open source community along this effort been forthcoming.  While it might not have addressed the dynamic partitioning and schema changes (it's possible), odds are pretty good that Google has an idea about indexing.  They would certainly be able to kick start the effort by making a contribution in those areas.

My second issue is the dis-ingenuousness of the “we're giving stuff away for free” comment.  Google has a market cap of $53B.  Revenues are approaching $3B per year.  Some of that revenue comes from sponsored searches, AdWords, AdSense and a number of other products that need the traffic generated by their free service.  Which is to say that if Google stopped giving stuff away, their revenues would fall off pretty quickly.

Do I love what Google offers?  Of course. Makes my life much easier in many different ways.  But please don't pretend that it's being given away for altruistic reasons.  I'm really not that naive.

Caching and Unit Tests

We've been playing with the Caching Application Block here at the client I'm currently working with and have found a couple of important items that will be of interest to anyone doing the same. I should say that we're using NUnit to run our unit tests, so some of the information applies specifically to that. 

Actually, both of the items we ran into had to do with the storage mechanism that we used.  The Caching Application Block includes implementations for three separate modes:  in process, memory-mapped files and SQL Server.  These three modes basically mirror the functionality available with the Cache object in ASP.NET. 

For all of the tests run to this point in the project, we had been using the in-process mode both in our unit tests and in the builds that have been sent to the system verification team.  However we recently made the choice to share the caching across web services, so we switched to the memory-mapped file mode. 

Oops. 

First off (and it should have been obvious), there is a different serialization technique used with memory-mapped files.  That is to say, that the in-process cache doesn't use serialization at all.  The memory-mapped version does serialize and deserialize the object as part of the default processing.  This change in caching mechanism should have caused us to go back to our unit tests, updating the storage type used there.  A couple of issues might very well have been exposed.  But after just a couple of minutes of seeing unexpected errors occur in unusual places, we did just that.

Second oops.

If you didn't realize it, NUnit depends a great deal on the AppDomain model to work its magic.  This allows things like the config file to be taken from the DLL's home directory.  A completely new AppDomain is created for each run of the tests.  So, as a for instance, you had created an in-process cache in one test, that cache wouldn't be there the next time the test was run.  New AppDomain = new memory = no old variables.

But what if you were to change the storage mechanism to a memory mapped file.  A mechanism that is specifically designed to share data across AppDomains.  So now, NUnit does its AppDomain creation thing and pow!  Cached value already exists.  Imagine our surprise.  Imagine how good you feel not having to go through it.

As a pointer, using the Flush method in the TestSetup section of NUnit is a good way to avoid this problem in the future.  Just something for you to consider.

Pure Math and Real Life II

From Raymond Chen's blog, check out this article that describes not only the concepts (in basic terms) behind the uniformly distributed points algorithm, but also some of the practical applications.  First of all, the idea behind the algorithm is incredibly elegant.  Forgetting about the math necessary to prove that it works for a moment (because that is complex to the extreme), the idea that the points on the surface are like dictators fighting for space is an easy one to visualize.

Second, the number of applications for what might appear at first glance to be nothing but nonsense will surprise most.  That the same algorithm could be applied to everything from baked goods (the perfect poppy-seed bagel) to virus research to computer generated graphics says a lot about how math is the thread the weaves its way through the fabrice of our life.

Finally, for those you are continually amazed at the interconnectedness of the universe, that the most effective 's' variable (the power of the force between the poinst) is equal to the dimensionality of the shape is mind boggling.  I just add this to the “famous five” equation as one of those things that make me go hmmm.

For those who care and don't already know, the famous five equation takes the five most basic values in math (e, i, pi, 1, 0) and combines them to create a single equation: ei * pi + 1 = 0.  Whoa.

Waiting for WinFS? Might want to rethink that.

For those of you who already have grand plans that require the very cool functionality that will be offered by WinFS, you might want to think about some redesign.  Finding out that it wouldn't make it into Longhorn was the first blow.  Now, according to this news.com article (found thanks to Rocky Lhotka), the wait for WinFS might last until the next decade.

The article confirms that not only will WinFS miss Longhorn client, but also the (scheduled) release in 2007 of Longhorn server.  So now WinFS won't likely be included until Blackcomb, which is the next Windows version after Longhorn.  Realistically, this means 2010 at a minimum.  And that assumes a minimal slippage of schedule, an outcome that is probably one of the few that can be counted on. 

One of the downsides of being involved with the leading edge of technology is the teasing that goes on.  The promise of ObjectSpaces is certainly enticing. But I spend most of my life coding in the here and now, a place that ObjectSpaces won't be invading for quite some time.  Too bad, but I'm pretty certain I can make the adjustment. ;)

Things C# allows you to do, but shouldn't

So the offending line of code is as follows:

string a = String.Empty, b;

If you can explain what this is doing, you're a better person than I.  Just to give you a second hint, the following is also legal syntax.

string a = b, c = d, e = f;

So what do these statements do? Give up?

In the first case, you end up declaring two string variables:  a and b.  And a is initilized to String.Empty.  In the second case, you end up with string variables a, c and e initialized to b, d and f respectively.  Sure having multiple declarations on a single line is legal.  But should you inflict this upon unsuspecting maintenance developers?  I don't think so.