Irregular Injection of Opinion
RSS 2.0|Atom 1.0|CDF

 Tuesday, October 28, 2008
Playing with the new RPO Fiddler Add-in

So not sure if I’m allowed to talk about this… but bugger it… here goes.

So the guys @ Aptimize ( have put together an add in for Fiddler that basically runs their Page Optimizer in the Fiddler proxy.

So this lets me basically ty the RPO on any site. The actual page load times are all up the wazoo due to all the traffic going *slowly* through fiddler…. but check out the YSlow goodness.

RPO Off, gets a grade F (34)


RPO On, gets a grade A (94)


.NET|Tuesday, October 28, 2008 4:14:04 PM UTC|Comments [2]|    

 Monday, October 27, 2008
Anders and the Future of C#

This is a REALLY long post. Was a great session and will be worth watching the video when it’s available.

December marks the 10th anniversary of the inception of C#.

Today looking at C# 4.0 and a little bit @ C# 5.0

3 Key Trends Shaping the Industry

  1. Declarative 
  2. Dynamic
  3. Concurrent

The Uber trend is language paradigms borrowing from each other.
E.g. C# 3.0 borrowed a lot from functional langauges


Declarative Programming
The whole What vs How

Impertivie is VERy explicit which means that it is much harder to optimize.
Contrast this with the more declarative model like LINQ- easier to optimize. Easier to parallelize.

Dynamic vs Static
Lots of religious debates about each.
Both have good qualities. Want attributes of both.
Going to see lots of languages borrowing from each other

The elephant in the room!
Hard to do. Moores law has allowed us to stick our head in the sand for decades.
Moores law, in terms of clock speed, has stopped. We are still getting higher transistor densities, instead we get more CPUs. The onus now falls on us as to what to do with them.
No Silver bullet… no /parallel switch on the compiler :-)

Current models of concurrency typically focus on coarse grained concurrency- multiple logical things on fewer CPUs than you have things to do. We are not getting to the flip side- taking single logical things and running them, splitting them, onto multiple CPUs. Language designers need to find ways for users to be able to do this.

There are interim solutions such as the ParralellFor statement that takes upper and lower bound and a lambda in the Parallel Toolkit for .NET

C# vs VB
Blah blah.. usual tree huggy waffle.
Says co-evolution will continue to be the model.
Goal remains to be to maintain feature parity… The goal is such that if one language has a feature it should not be impossible to do something similar in the other language.
E.g. Given is XML Literals in VB vs LINQ to XML in C#


C# 4, Key theme Dynamic Programming
In the broadest sense of the word. i.e. talking to anything that is not a statically typed .NET class.

Key featres

  1. Dynamically types objects
  2. Optional and names parameters
  3. Co-Contra variance
  4. Better COM interop


Dynamically typed objects
Talking a it about IronPython and the DLR.
DLR designed to unify Dynamic languages in the same way CLR does for static languages

In 4.0 C# and VB will support the DLR explicitly.

Under the DLR there are binders for other things.
E.g. Binders for .NET, Javascript, Python, Ruby, COM

Calculator calc = GetCalculator();
int sum = cal.Add(10,5);


object calc = GetCalculator();
Type calcTye = GetType(calc);
//Reflection blah blah

Javascript would be similar… but different.

C# 4 introduces a new static type… of dynamic

dynamic calc=GetCalculator();
int sum = calc.Add(20,10);

In above, .Add returns dynamic result. = sign performs a dynamic conversion.

This all comes down to should it be painful to talk to dynamic ‘stuff’ outside of C#?
Or should it be easy?

When operands are dynamic we defer member selection to run time- e.g. can do dynamic overloads


Anders then did a demo sowing a cool interop with Javascript from Silverlight. Interopping out of Silverlight into Virtual Earth *.js files. He also showed a quick cut and paste of *.js into *.cs file and the small changes required.

2nd demo showed C# calling out to Python. Showed a calculator example and the ability to basically pass ANYTHING into the calc.Add method. Remembering that Python being dynamic can work on any variable type that has an operator ‘+’ defined for it.

Back to Slides
All the above is based around the idea of IDynamicObject.
Out of the box support for COM and .NET. Dynamic languages can implement the IDynamicObject interface themselves too or indeed you can implement it yourself in your own .NET code. E.g. you want to implement your own property bag with dynamic properties.

dynamic propBag = new MyPropBag();
propBag.whatever = 12345;
dynamic x = propBag.whatever;

So DLR can dispatch to a statically typed object to… e.g could pas in an anonymous type to a dynamic method.

Optional and named parameters
The usual pattern in .NET is to =declare a primary overload that has all parameters.
Then declare a BUNCH of overloads that call with default.

Can now just define defaults on optional parameters.

Supported in .NET since the beginning and of course supported in VB. Anders says ‘he relented’.

Can now also pass in names arguments (after positional arguments). No compiler overhead.
Can do funky things such as putting named arguments out of order…. which in urn can be a bit intersting if you hav side effects.

COM Interop
Anders mea culpa.
Basically trying to combat the HUGe issue with Office still being COM. and as such interop being poor.
No more file.SaveAs(fileName, ref missing, ref missing…….) crap.

Key new features
Option and named parameters and dynamic types lets us write code as it’s meant to look.
Can now omit ref in many cases
Indexed properties
Supports an automatic mapping of type object to type dynamic when you import COM objects.
Compiler able to embed interoperability types- no need for PIA any more.


Did a demo showing all the fun ‘oddities’ of COM interop.. i.e. some fugly code and how it now becomes nice looking code.

Co- and Contra-Variance

This is a bit geeky for me :-( Me non Grok it.
Something to do with the ability to pass less derived array types.
Says co-variant arrays in .NET are not safe.

Supports safe co and contra variance.

Ability to safely support less derived objects as more derived when using read only interfaces.

C# 5.0 Initial Thoughts
Talking a it about meta-programming.

Lots of use of code gen. Reflection.emit.
Need a modern approach to meta programming.

E.g. what is driving the success of Ruby on Rails is that it’s a good meta programming language.

A focus for beyond 4.0 is to actually write the C# compiler in managed code.

Initially compiler written in C++. It’s a classical compiler.

Want to provide ability to allow people to hook into the compiler. Will end up with a true object model for C# source code. Compiler will no longer just be a black box.


So with compiler in managed code we can now call it as an API. Pass in a string, return some cobiled binaries, walk these with reflection.

Anders wrote a simple C# evaluator.

First Evals a simple for loop.
Next Evals to create a delegate, Evals a refernece to that delegate then statically calls through the delegate from the main block of code. You kinda gotta watch the video :-)
Well worth scolling to this bit of the video to bend your brain!

he uses dynamically evaluation to new up a windows form and then adds buttons and event handlers and things… Incrementally bui8lding the application… this is gonna be such cool tech to work with…. Like just VERY cool.

We *may* get this out of band. i.e. before .NET 5.0



Anders on stage.


An Anders session is always a popular session. No one wants to be presenting against Anders (same time slot). Like my cheap arse panorama :-)

Goodies Gone Burger

PDC08|Monday, October 27, 2008 10:36:36 PM UTC|Comments [0]|    

SQL Services

So, SQL Server Data Services has morphed into SQL Services. You may well have seen me present on SSDS at user groups or TechEd.

SQL Services will eventually offer a really broad platform but at the moment it’s just the SSDS bits warmed up by the looks.

Forthcoming will be:

  • ADO.NET Data Services (Astoria) endpoint being announced.
  • Database – Still the flexible ACE model. Expanded capabilities, queries, joins other operators
  • Datasync
  • Reporting (Later)
  • Data mining (Later)
  • ETL (Later)


Bob Muglia who is a pretty good presenter.


Some guy from Red Prairie who did a less than compelling demo.

System Center “Atlanta
”Bob showed off a cool new Silverlight based System Center control panel.
It basically allows agents on Ops Manager servers to feed messages back through the Service Bus.
It’s then stored in SSDS.


PDC08|Monday, October 27, 2008 4:47:02 PM UTC|Comments [0]|    

PDC Questions….
  1. How many people are going to get laid through Bluehoo @ PDC08?
  2. Did Microsoft really choose a brand name, Azure, that nobody knows how to pronounce?
PDC08|Monday, October 27, 2008 4:21:47 PM UTC|Comments [0]|    

Windows Azure

So Ray Ozzie has just announced Windows Azure. Build an ASP.NET Application, WCF Service, Windows Service and host it in the cloud.


This is Microsoft’s new Cloud Services platform and basically wraps up things like:

Sql Data Services
Microsoft .NET Services (Formerly Biztalk Services)
Live Services (Mesh etc…)
SharePoint Services (As web services more than as UI)
Dynamics CRM Services (As web services more than as UI)

Key Strata Themes
A flexible services platform at Internet Scale.
Simple scenarios are simple – Complex scenarios are possible
Hosted in MSFT data centers
Designed for high availability and scalability

Based on Internet Standards
This week releasing .NET/Java/Ruby SDKs. More to follow.

Extends Existing Investments
Familiar tooling and standards
Provides choice of on-premise, in cloud or hybrid.
Integrate with existing assets such as AD and on premise applications

Windows Azure Manages the Entire Global Data Center Infrastructure
Primarily containerised data centers.
Spending several hundred million dollars per data center.
Adding thousands of servers per month.

Fabric Controller
Maintains the heart of the service- Fabric controller applies the necessary changes through the cloud.
Manages services and not just the server. No need to think about virtual machines etc… Full abstraction applied.
Developers just think in terms of the same service and interface models we’ve used in the past.
Very different to the whole EC2 model. You are not dealing with physical machines, rather an abstract resource- it’s an Operating System more like a mainframe than like a typical x86 server.

Cloud Simulator
There is a desktop based cloud simulator.

For those of you who remember my Red Shoe Days!


The Azure Team look to be wearing Red Shoes for the event… I’m guessing a nod to the code name for this technology – Red Dog.

PDC08|Monday, October 27, 2008 4:14:57 PM UTC|Comments [3]|    

A few early photos of the PDC08 Keynote

So JB, OJ and I are sitting in the keynote getting ready for it to start.

Had a good pre-briefing yesterday from the Cloud Services folks… interesting to see what they actually call their new platform…

Will stick some toughts up here as we progress, in the meantime look at how big this room is!


And how small OJ is in comparison… Sorry OJ… like the Yellow!


PDC08|Monday, October 27, 2008 3:57:09 PM UTC|Comments [0]|    

The Maggots from

Like flies to a carcass, SalesForce decided that the first morning of PDC would be a great time to have their promo girls* and promo guys giving out T-Shirts and flyers on South Figueroa Street. Kind reminds me of these folks really.


*Not as hot as usual promo girls…

PDC08|Monday, October 27, 2008 3:30:15 PM UTC|Comments [0]|    

 Tuesday, October 21, 2008
Runtime Page Optimizer: Why not just enable caching in IIS?

So I’ve been talking wit heaps of folks on the RD list and a few blogs about and a question that commonly comes up is why not save yourself the $749 and just turn on IIS caching and compression… Here is my more long winded answer :-)

So the compression and caching features in RPO are really more nice to haves and not core to the product. They’re mainly there for IIS6 users because getting those things working in IIS6 is a real PITA.

The big reason you want RPO is the combination stuff.

Basically the way it makes a big difference is by dramatically reducing the number of requests a browser makes over the wire. Request count * latency = performance killer.

So it combines the following sorts of things

1. Combines Javascript files
So for example you might have the following references to external JS
RPO will combine them all and insert into the page a link something like (this link may change over time, just view the page source of use Firebug to get the idea)

2. Combines CSS files
Again, same thing applies as with the *.JS file.
You do need to be a little careful with choosing files to exclude to ensure you don’t end up regenerating a completely new combined file for each page.
So for example if you had 5 *.css files common across your whole site and then each page had a page specific CSS file then you’d want to exclude the page specific ones. It would be neat f the RPO guys could maybe support a namespace for use with XHTML that would let you chunk resources into groups e.g.
<link rel="stylesheet" type="text/css" href="site-common-general.css" rpo:group=”0”/>
<link rel="stylesheet" type="text/css" href="site-common-menus.css" rpo:group=”0”/>
<link rel="stylesheet" type="text/css" href="page-specific-user-form.css" rpo:group=”1”/>
<link rel="stylesheet" type="text/css" href="page-specific-custom-rollovers.css" rpo:group=”1”/>

They’d default any non attributed link tags to group 0. This approach would mean that for those willing to appl a little extra effort t design time they still get excellent combination AND caching support at runtime without ending up resending the site common CSS combined with the page specific CSS for every page request.

3. Does funky combination of images in one of two ways

a. Either tiles the images using CSS Sprites or;

b.  Inlines the images using CSS

To give you an example for the images is my blog site

The following is the link to the large tiled JPEG that represents all the JPEG images on the page

and all the GIFs$-jsx07uuSjpOAX$WsgU$w

Basically RPO has parsed the HTML, found all the images, retrieved all the images, created a tiled JPEG, cached the tiled image data, injected CSS code back into the HTML to chop them up on the client side.

|Tuesday, October 21, 2008 2:17:24 PM UTC|Comments [0]|    

 Friday, October 10, 2008
Tech Ed Features in National Campaign Video

The Nats have posted their Opening Address video to various places.

There is a better quality copy at their website: There is even a bit of footage from TechEd in there... A bit funny really.... I was taking photos in the keynote and there was a camera crew wandering around with a totally drool worthy rig. It was a Red One- A Rocket Rental I think...

Anyway... pretty drool worthy camera rig and seemed out of place for the live to projector broadcast stuff you'd usually see.

Politics | Toy Box|Friday, October 10, 2008 7:17:58 AM UTC|Comments [0]|    

Tech Ed Features in National Campaign Video

The Nats have posted their Opening Address video to various places.

There is a better quality copy at their website: There is even a bit of footage from TechEd in there... A bit funny really.... I was taking photos in the keynote and there was a camera crew wandering around with a totally drool worthy rig. It was a Red One- A Rocket Rental I think...

Anyway... pretty drool worthy camera rig and seemed out of place for the live to projector broadcast stuff you'd usually see.

Politics|Friday, October 10, 2008 7:17:53 AM UTC|Comments [1]|    

 Thursday, October 09, 2008
The Credit Crunch... A Beginners Guide

If you don't know your collateralized debt obligation from your securitized tranch of mortgage backed securities then you're not alone- neither do half of wall street.

If you're wondering how the world got into such a pickle and finance is not your forte then I highly recommend having a listen to Arnold Kling (ex Freddie Mac) on Econ Talk.

"Arnold Kling of EconLog talks with host Russ Roberts about the economics of the housing market with a focus on the role of Fannie Mae and Freddie Mac. The conversation closes with a postscript on the current financial crisis."

I'm a big fan of Econ Talk in general and it's at the top of my podcast list. If you're keen for more podcast recommendations do post in the comments.


|Thursday, October 09, 2008 9:32:59 PM UTC|Comments [1]|    

 Friday, September 19, 2008
From a D to an A in 60 seconds.

I always found the problem with studying at Uni was the whole law of diminishing returns. I could jump for a C to a solid B with a couple of nights study. To get anything better (apart from a couple of appallingly easy classes) required actual hard graft. So hence I was a B’s Get Degrees kinda guy.


I just put the new version of the RPO on and our YSlow score jumped from a D to a really good B (I think it’ll be an A outside the Intergen firewall but ISA suffs with the GZip). Took me a bit more than 60 seconds…. like 15 minutes… but that’s some pretty good ROI to me!

|Friday, September 19, 2008 2:48:09 AM UTC|Comments [0]|    

 Thursday, September 18, 2008
Why would I trust someone else to provide my <insert essential utility here>

I’ve spent quite a bit of time over the past 18 months talking to people about Software as a Service, Software + Services, Cloud Services and all sorts of other catchy terms for what is effectively utility style provision of technology solutions.

A question I am often asked; indeed the first audience question when I spoke at the NZ CIO Conference last year;

“Why should I trust Amazon/Microsoft/Google/etc… with a critical part of my business”

My answer generally goes something like the following.

“Why trust yourself with a critical part of your business”

Sure, you are arguably better incentivised to deliver reliability and performance, but it is very arguable as to whether you are better equipped to do so.

|Thursday, September 18, 2008 8:33:12 PM UTC|Comments [1]|    

 Wednesday, September 17, 2008
Runtime Page Optimizer - It's like magic

Those of you who know me know that I'm an unusually excitable kinda guy. So given that I'm unusually excited I must be about to talk about something pretty exciting.

So today officially we launched the Runtime page Optimizer. You can get there by visiting

What the runtime page optimizer does is automate a bunch of the best practice for website performance features as espoused by people like Yahoo. It does this by operating as a managed HTTP module inside ASP.NET/IIS7. So this means that you get all the performance benefits of hand optimising your site... without completely $$&^%&^ing up all of your nicely organized code and folder structures.

My favourite feature of the RPO is the way it deals with image combination.
The issue with modern websites is they just make so many requests and it's the count of requests rather than the total size that's the issue. e.g. makes 92 requests for a total of about 200kb and takes 8 seconds to load. The issue is not the 200kb, but rather the fact that the browser makes 90 odd round trips to the server... many of them sequentially. Now RPO combines all sorts of resources to reduce this count and some are pretty easy (CSS and JS etc...) but images are a bit neat. Here's how it happens.

There is a technique called CSS Spriting (everyone remembers sprites from the Commodore 64???) that basically involves making a single large image that contains all your site images and then using CSS on the client side to chop this up. It's possible to do it all by hand, but, it's both time consuming and tends to %^%ck up your site structure.

What RPO does is intercept the HTML page on the way back through to the browser, it grabs all the links, creates the large tiled image and then injects the CSS back into the page for client side chop up. Like magic the page request count plummets.

This site is running RPO so if you look at the source or use Firebug you'll be able to see the RPO in action. Another one of my sites that's running RPO is which was the first production site to go live with it.

I'll be doing a few more blogs on why the RPO REALLY excites me over the next few days... but in the meantime go grab it yourself from

|Wednesday, September 17, 2008 3:28:45 AM UTC|Comments [0]|