Thursday, 26 February 2009

Removing Duplicate Items from Xml using XPath

I needed this today, and I figured I will need it again in the future, hence my need to blog this.

I need some XPath which would remove duplicate elements from xml depending on an attribute on the item, e.g.

<Item ItemNumber=”1/>
<Item ItemNumber=”1/>
<Item ItemNumber=”2/>

The following XPath does the job perfectly (for my needs)


Which returns the following list:

<Item ItemNumber=”1/>
<Item ItemNumber=”2/>

Tuesday, 17 February 2009

DDD Southwest

So I want to take a little time out to mention DDD Southwest.  If you are based in the South West of England, then this is a great conference for you to attend.  It’s on a Saturday (the 23rd of May), and it’s free.  Even if you are not based in Taunton, I think it’s worth travelling down for.

Let me explain Why.  The conference is run by Guy Smith-Ferrier who is one of the most community focused individuals, and one of my favorite speakers.

Main Agenda

The main agenda is great, great speakers + topics.

  • Silverlight (i’m sure there will be some SL3 in there, knowing Richard) – Richard Costall
  • ASP.NET MVC – Steve Sanderson (great book on MVC)
  • Oslo – Robert Hogg
  • C# 4.0 – Guy Smith-Ferrier
  • MEF – Ben Hall
  • Refacoring – Gary Short
  • Scrum – Richard Fenell
  • Quantum Computing – Dave McMahon
  • Windows Azure – Chris Hay (a little biased I know).

Don’t get me wrong it’s a real honor to be asked to speak at this conference, and the speaker line and topics is superb, but this isn’t what is exciting me the most.

A call for new speakers

This really excites me, there is a call for new speakers.  So there will be a bunch of sessions from new speakers, with new takes on various topics.  It will be superb and I can’t wait.  It wasn’t that long ago when I was a new speaker, and it’s a great opportunity for new speakers to get sessions without competing against the big guns.

I think this is a great format that gives new speakers a chance to cut their teeth, in a supportive environment.

Alternative Track

I think this track however excites me the most, as I haven’t seen this format before.

It’s the Conference Party Games Track :)

  • Park Bench Discussion
    • Rotating Speaker Panel, where anyone can join in answering
  • Small is beautiful and hard
    • Make beautiful code from average code
  • Workshop for single handed developers
  • Balloon Debate
    • One Ballon, 5 languages represented by 5 people.  The ballon is sinking and you need to ditch languages to gain height.  For the first 30 minutes, each person representing a language has to argue their cause.  After 30 minutes the audience throws out 3 of the people / languages.  It’s then head to head.  Winner takes all
  • Planning Poker
    • Looks super cool, everyone estimates a problem and shows their estimate simultaneously and then has to come to a consensus of the estimate

What a superb looking day, and it’s looks pretty different from other conferences.

Well done Guy on producing such a great format, and I’ll see you there.

Sunday, 15 February 2009

May'be we've got databases all wrong

I sometimes wonder if we've got databases all wrong.

We organize the data into logical blocks, and then we connect those blocks together in such a way that we think makes sense.  We then spend our lives arguing about what should be in the blocks and how we should connect them together.  We also worry about where the blocks should live and the best way of connecting the blocks together.  We worry about the best way of keeping the blocks as small as possible (and so it goes on and on).

In the end we realize that our blocks and connections don't scale so well, and the best method  of scaling is one big block, which we can chop up into little pieces.

Perhaps we are not so good at organizing the data, maybe we should let the data organize itself.

Saturday, 14 February 2009

I Love Visual Studio, .NET and C#

This morning I had a play around with Java ME and Netbeans.

There is a good  reason for this, I don't like not understanding things, and I don't like being limited in ways and methods.

Now I achieved an awful lot in a few hours and I feel I have enough of an understanding of Java ME to build mobile applications (which could interact with .NET backends).

As much as developing for Java ME is simple and there is a lot of things I liked, it makes me appreciate .NET, C# and Visual Studio.

Wow, in my humble opinion, C# is far superior to Java and applications are far quicker and easier to develop with the .NET Framework and Visual Studio.  I could not contemplate ever developing a back end solution in Java.

That's not to say that I don't see little Java ME applications talking to WCF Rest based Services.  I I feel I have now opened that possibility to myself.  However I have to say developing Silverlight applications is much preferred.

Please make Silverlight for Mobile appear on as many mobile phones as possible :)

Thursday, 12 February 2009

Blacklight: A wicked set of Silverlight controls

So I stumbled upon this set of wicked Silverlight controls created by a bunch of UX Designery folks at Microsoft Consulting UK.

These are a really stylish set of black Silverlight controls.  The best thing is they are free to use / download and they come with source.

Saturday, 7 February 2009

Silverlight Games and the real time web

So following on from my last post, where i was talking about High Score Services.

Perhaps the high score service concept could be taken further. 

Why not have your application automatically integrate with your facebook account (or twitter)m and automatically publish your high scores to your friends.

Let your friends know your status realtime in the game.

Chris has just scored 20,000 points in Kangaroo Man (a made up game title).  Chris is currently on Level 2 of Big Bad Space Aliens.  Chris has just been wiped out by a big scary Alien.

Again, this would be cool functionality.  A real pain for a casual game developer to do on his/her own, but if a common library / service was available to integrate too, it would raise the bar of games.

P.S. Don't read this as a service / library I plan to write.  I'm merely pontificating.

Silverlight Secure High Score Service

Just to qualify this, I'm not building any games but it has occurred to me that there is a challenge in building a secure High Score Service for games.

I'm now of the opinion that it is probably such a challenge for the average casual game developer, that is probably worth someone developing a service (and library code), for other casual game developers to use.

Here is the reason it is a challenge.  If you implement a simple service where the Silverlight Application simple sends back the high score to the server, it is easily manipulated.

Just grab Fiddler, capture the request, modify the high score, and send it back.

So now to stop this sort of attack you need to bring in lots more mechanisms.

Some thoughts are:

  • Encryption
  • Capturing of in-game data
  • Hashing with GameId
  • Hashing with SessionId

I guess it depends how far you want to go, total security, or enough of a deterrent.

Even if the request is encrypted and cannot be tampered with, you could reflect the game and work out the logic.

I will ponder this some more, however

Wednesday, 4 February 2009

Silverlight 3 Session DDD Scotland

So I have submitted a Silverlight 3 session for DDD Scotland.

If you are going to Glasgow in May and you want to see a session on Silverlight 3, then please vote for my session.

Also feel free to vote for other sessions you might wish to see ;)

Finally, please vote for this session :)

I know it sounds a little pleady but it would be nice to visit my parents :), whilst I am there

Tuesday, 3 February 2009

BigTable, MapReduce and Hadoop

This post won't make much sense as this is just a reminder to myself.

Over the next few weeks, I want to spend sometime looking at MapReduce and how it can be applied with Windows Azure (big thanks to Gary Short for mentioning this).

I also want to look at how BigTable compares to Windows Azure Table Storage Services, and finally i want to look into Hadoop.

Sorry this is just a list of things I want to look at, but I will expand out on this later

I'm also wondering how this can relate to Silverlight. Perhaps you could have multiple Silverlight Nodes running with MapReduce talking back to Windows Azure (via a proxy web service), as well as queues and worker roles