Heskey In, Theo Left Out

02 June 2010 by Alan Gregory

The England squad for the World Cup has been announced with some confusion about why Heskey is picked when Theo Walcott is not.

I don't want to get all statistical but England have a better record with him playing than not; 'so sh1t even Heskey scored' is nonetheless a damning indictment of his poor finishing in front of goal even when 1 on 1.

TheoLooking at how he partners the front man is an interesting study. Rooney, Shearer and Owen have all partnered the lumbering Ox but have all profited from the nuisance he causes. Who would you pick instead, Bent? Notoriously poor in an England shirt; Defoe two small men up front will mean we have to pass through defences, frankly we are not good enough to do that. Crouch, he's as predictable a plan B as there is and his scoring record is damn good even compared against the likes of Owen. He has, one could say, scored most against poor oppositions but you still have to put the ball in the back of the net and he does that with uncanny regularity. He is without doubt a nuisance.

The question for me is what we would do without Rooney, is Defoe the same class? No. Is he world class; sorry, not in my eyes. So who do you pick? Carlton Cole? Gabby Agbonlahor? Booby Zamora? There just isn't the depth of talent we need, so you go with what you know and Heskey understands what it is to play on the world stage, plays the same way and does what he is told.

We play under Capello the same way we played under Sven; ball to the front man held up with attack minded midfielders getting the drop downs, with the occasional flick on for Rooney to chase. We benefit from the fact he falls like a tree when touched and get free kicks in dangerous areas for Gerrard and Lamps to have a pop at.

What we do different under Capello from that we did under Sven is get at the opposition and never take the foot off the gas. The Italians and Germans have been excellent at that, both of them really put teams to the sword. Four nil up is not job done, job done is when the referee says it is. Until then you keep playing and if possible scoring. Another thing that Capello brings is the discipline, you play where you are told, you play how you are told and you stick to it without question. Theo Walcott did not do that and his lack of understanding of what is required at that level is still an alarming weakness. That is why he was left without a place to go this summer, and rightly so.

 

MVVM A Comfortable pattern

26 May 2010 by Alan Gregory

I stumbled across this article whilst looking on Jesse's site for an answer to a specific WPF Toolkit Charting question; however it does strike some chords of similarity to the questions we are often asked.
http://jesseliberty.com/2010/05/08/mvvm-its-not-kool-aid-3/#more-1334

MVVM, MVP, MVC or MVMBO JVMBO
To be honest I was an advocate of COM and advocate of MVC/MVP and now I am an advocate of MVVM. Is it because its new? Well possibly, but in this case its less of that and more about a pattern I can really see the benefits of.

Let me qualify that, I really am an advocate of the current MVP pattern I use at work and do think that there is benefit in conforming to a standard way of working; but in my humble opinion a good development pattern must conform to three principles:
1. Confirm the separation of View and Business Logic
2. Mean you write a similar amount or less code and not extra code for no reason
3. Make sense

My like of MVP was not without reservation; for me it broke rule one and often a little of rule two.

Breaking Rule One:
If the view needs to know the shape of the presenter then it definitely breaks rule one; it could be my interpretation of our implementation but because the view needs to know the shape of the presenter or the Presenter needs to know the events on the view there is a clear link back to the model and so the references are cyclic or tied.

Within MVVM the links are one way only, and the VM satisfies only the provision of data in a service oriented way, the view asks for some data or a response to a command, if the ViewModel can resolve it then it does, if not then neither the View nor the ViewModel breaks it just fails (semi) silently.

Breaking a little of Rule two:
In the MVP pattern and MVC there was a tendency to hook up a huge trail of events from the View back to the Presenter. I am not saying this is what the pattern dictates but it tended to be how we implemented it. That meant we had an event in the presenter that handled a specific UI change to update the model. We had to hook up the events at View creation and write the code to update the underlying model.

Within MVVM that is not the case as this is handled for us by the binding of the UI elements data to the ViewModel. CommandBinding further support this pattern. The eventing mechanism is slightly more code it does further support rule one. Overall it should mean you write less code.

There is a caveat here, Value Converters, there are lots of them, where you might have previously just had a small function in your view to convert a bool to a state now you do it with converters. You could still do it at the ViewModel level and sometimes that makes sense but converters keep the ViewModel pretty tidy especially where you need lots of ViewModels to do the same thing.

Rule three:
There was a statement that sticks with me, along the lines of this sentiment

"the inherently boring nature of these business problems lead many programmers to seek out new problems to solve, the most common of which is the meta-problem: a problem with the process of creating a solution for the actual problem"

We can all pinpoint places in code we have stumbled across when a particularly elegant solution has been employed to solve a problem that is actually much simpler. Developers (not us clearly) have coded for the unseen, and often the unneeded. In doing some VAT re-work last year, some of the code was written using a near perfect implementation of an observer pattern with a concrete implementer class for each VAT rate, academically beautiful, however completely unnecessary and when the VAT rate changed a new class was needed. Brilliantly flawed design.

In the MVVM world, it seems to me anyway, there is less stuff you HAVE to do, it works in a relatively straightforward way; rules one and two are satisfied and the split between them seems to still be in the right direction; I write less code, most of the time and it easier to test because of the separation.

The downside:
Yes there is a downside, in fact there are a couple of issues that need resolving; firstly binding that fails does so with a terse message that is not so easy to Debug, the fact that a property cannot be resolved does not tell you why until you get your head round what information can be gleaned by interpretation. Once you get your head around the messages though, its actually pretty easy to sort out. Secondly, and perhaps more of an issue, using command binding causes a memory leak when clearing down views. Events are still hooked up from the ViewModel and so are still left hanging about and not collected by managed Garbage Collection. An article that explains this issue is detailed here http://edgeug.net/blogs/nondestructive/archive/2008/07/29/wpf-memory-leak-in-command-binding.aspx, it also helpfully suggests a solution. There are other solutions to this but they involve forcing a GC collection. Not a showstopper in my opinion but an annoyance nonetheless and one that is bound to trip up the unwary.

The wider picture
In our applications we further separate out our layers into a databroker and dataservice layer that have responsibilities for getting the data and transforming it into the shape we need or handling errors in the fetching process. This is further divorced from the data source by Web Services and Stored procedures that limit the applications exposure to changes. So the MVVM pattern is the last bit of separation along a chain of 'independence'.

Summary
Are there more upsides and downsides, yes quite likely, I have not written every application I need to yet; Have I written vast amounts of application infrastructure? No; will MVVM be suitable for everything? No; Do I recommend that for most WPF UI related work, this is the pattern you should look to first? Yes.

 

Online Annoyances Pt 3

07 September 2009 by Alan Gregory

Thanks for joing me on this the final part of my September 7th Rant.

This one really has a direction, Currys, Comet, Dixons, PC World and the hidden online brother Pixmania.

My son recently did well in his GCSE exams, so by way of reward we decided it was time to update the crappy CRT TV that he had in his room for a nice shiny new full HD LCD. When I say we decided I mean he decided we should spend the cash.

I like to see the items in question so we tend to use the high street stores as live brochures before buying and would never, and I mean never buy from them due to the following :

Sales Staff
No you are not more important than the customer
I know you are not really seeing your manager about a discount, I was born the day before yesterday
Actually your product knowledge is about as good as the average slug
If you had been better at selling you would be selling cars or pensions
I dont care if you buy them in at cost, thats your problem not mine
No I dont need a warranty if it breaks in the first year, thats your problem
No I dont want a cleaner electricity gizmo

Delivery charges
I dont pay to get stuff shipped when I buy online, why would I pay £20 for you to deliver £1000s worth of TV 2 miles down the road, I could hire a taxi for less.

Managers Specials
They may be special to the manager but they are cheaper elsewhere

currysStrangely this is not the subject of my rant, oh no, that is not where I choose to aim my vitriol. pixmaniaIt is the faceless online brands that are slowly being taken over by the high street names. in this particular instance it is Poxmania. A commitment to deliver in 3-4 days should be acheivable even in the middle of winter; in the summer they could have walked it. dixonsWe had trusted the commitment and always had someonepcworld at home over the next 7 days (of which 5 were working) but they did not deliver, choosing instead to deliver on the 7th day when everyone is back at work; they can't deliver to a new address; they can't leave it with someone, we would have to 'pick it up'. If I wanted to 'pick things up' dsgInternationalI would drive a transit and be called Bob, but I am not. I intend to cancel my order which I cannot fetch from anywhere and choose another retailer, who has no affiliation with the Currys Dixons Poxmania DSG name.

 

Online Annoyances Pt 2

07 September 2009 by Alan Gregory

In the second part of todays rant against the Internet, which I know is a paradox with me using the same medium for the rant, but it does save the little ones so.

Anyway, online purchasing is brilliant; speedy, protected and most of all does not entail a smug salesperson telling you that you should buy something else, or indeed a different size, but only sometimes.a200

My recent online buying experiences have been at opposite ends of the spectrum. I purchased a new Digital camera online to replace our now dead Fuji. I went for an entry level DSLR because photography is always something I like to do. I frequented some local camera shops, which are more geeky than Computer shops I have come to realise, and some of the large retailers, Dixons, Currys and Comet none of these potential buying experiences left me with a warm feeling, in fact in Currys I left feeling red with anger. I ended up finding the camera I wanted online and made the purchase with http://www.buyacamera.co.uk, yes I was hooked by the catchy name!

The next working day I got a phone call from the shop, they had a problem with the card system the night before and needed my details again. Being a little sceptical of this I rang the stores main number and got the manager, who was also frantically and apologetically ringing round the other weekend purchases. Relieved I parted with my card details again and the next morning my shiny new camera arrived and the initial online sale was cancelled off my card a few days leter.
Excellent customer experience, even pretty major issues were dealt with with very little fuss.

For the other end of the spectrum goto Pt 3 of my rant here.

Online annoyances pt 1

07 September 2009 by Alan Gregory

I have recently returned to check out my blog, after a few months of shamful neglect. If this had been a child I would have been rightly locked up.

So I have abused it by ignoring it and letting it bumble along, however, when I did look at the site I was a bit miffed to say the least that only one comment seemed to be from someone who actually read it. The rest were a convenient point to paste URLs for russian pr0n.

Maybe I am naive to think this, but why would anyone drop by a boring geek blog with no real posters, or visitors of any kind and think "One thing I need right now is Pronski". In the time it takes a poster either automaton or not to set this up they could find the same material by typing it into the search engine.

I'd like to know, but as I have decided to remove the post a comment option perhaps someone can let me know through posting it on a billboard in the centre of London.

Virtually flawless

12 February 2009 by Alan Gregory

A colleague of mine recently purchased a new laptop which came with Vista; however he decided to put Ubuntu on it to give it a whirl.

Being a confirmed Windows man I was a little sceptical about the alternatives but seeing it in action it really does have some nice touches. I thought I'd give it a go virtually using VirtualPC 2007.

I downloaded the Ubunto ISO, created a virtual server and kicked the process off... within seconds the install had collapsed in an untidy heap with what I can only presume was a fatal error, I say presume becuase the error had scrolled off of the screen and could not be viewed fully.

Ubunto Screen

I tried again, just in case the issue was a one off, and then Googled the problem. After reading various articles about editing command lines and config files I managed to get the install running.

It was a pleasant experience all the way to first boot, when the same error happened again, it appeared, after Googling again that I had to edit the boot instructions as well.

After editing the boot instruction eventually I managed to get the desktop up and running. I then had to edit the configuration to set the display modes. Not being a Linux person I edited the file without really understanding or considering what the pitfalls might be. On reboot it dawned upon me, when the screen was unreadable and there seemed to be no way back but to reinstall.

VirtualBoxI had noticed on lots of forums that people had decided against VPC2007 and opted for VirtualBox as it was simpler; rather than re-editing the boot files and reinstalling I gave it a shot.

Within 10 minutes I had a working Ubuntu installation without a single edit. Installing the VBoxAdditions and 5 minutes more and I had a full screen install running perfectly.

The point of this post is that Virtualisation should be simple, speedy and useful; if you find yourself hacking configs and boot straps its probably worth changing the tool.

Check out VirtualBox it's free and has lots of default configs for most OS's including Windows 7.

 

Umbraco Update

08 February 2009 by Alan Gregory

I promised that as I delve deeper into the Umbraco 4 depths I would update the blog and publish my findings.

Well as you can see the last couple of days have been spent doing better things than writing CSS and XSLT. When I say better that is purely for my own health and safety! :)

If you have arrived at the Blog from the main site you will notice how little the site has changed since my last post, but it is changing slowly.

As I figure out the new ways in 4 or revert back to old (maybe bad) habits I am starting to see that a consistent look and feel based on the Blog4Umbraco kubrick stylesheet is emerging.

When I stumble across the next revelation I will publish it here.

Umbraco 4 - First Experiences

06 February 2009 by Administrator

Well I have used Umbraco quite a lot and have recommended it to friends and colleagues, so I thought I'd give Version 4 a go on my new web server running trusty old Windows 2003.

To be honest, I had found version 3 to be a little hit and miss in the installation and setup areas, so I was pleasantly surprised when installing version 4 was a breeze; of course this could be because I am just getting used to the nuances; but it really did feel like a more rounded package.

Some of the usual gotchas are still there, although there is only that always trips me up, namely You need to assign the NETWORK SERVICE rights to Read Write to the folders and web.config.

I would guess that security wise there is a potential threat here, but like most content managed solutions in order to edit content you need to write data somewhere!

I am going to have a further play with the blog built by umlaut.be and I will post again when I know more.

 

Fun in the Snow

06 February 2009 by Administrator

Well yesterday was an up and down day really. My company sent texts to all employees early morning warning that travel to work was considered too risky.

Working from home would have been an option if I had considered bringing my laptop home the night before. So many times before has the 'Impending Snow Doom' news come and gone with not so much as a flake falling, this time I thought it would be the same.

SnowFun

Now I know a few inches of snow for some countries is a minor inconvenience meaning that you need two pairs of shoes; but here... well its just chaos. With capital C, H, A, O and S.

We live on a main road and at 7:30am it was at a standstill, cars had driven into each other and roundabouts were as hazardous as .... well snow on a roundabout.

We are just not equipped to deal with snow, but give us rain and.... no wait a minute, we are not so good at that either. As these kinds of snow events only happen once in a decade we should forgive the ineptitude that affects our institutions, with mass school closures, main roads ungritted and drivers unable to understand why applying more pressure to the loud pedal does not propel them forward.

Whilst on the subject of school closures, I was testament to the two extremes of school management when my eldest Sons school texted us to let us know the school was closed, for the first time in 10 years, whilst my youngest Sons school told us at 8:15 the school was open, but by the time we had walked the 1/2 hour there it was closed; the Headmaster whilst apologetic seemed to not understand that risk managment, communication and decision making were his job.

What my impromptu days holiday did mean, was that I could spend time doing the things that I am sure I did every year when I grew up... anyone for a snowball fight.