• Getting friendly names from an Enum when decorated with multiple attribute

    It came about in MVC project I was working on that we wanted to output friendly names for a large number of enumerations we were working on directly into a selectable dropdown list. We would have an enum on a ViewModel object and that would be automatically put into a combo box with the selected item shown. Because alot of our model was pre-generated and we were getting these models from XML serialisation we ended up with a bunch of Enums defined like so. Enum TestEnum { [System.Xml.Serialization.XmlEnumAttribute("Tested")] Test, AnotherOne } Ideal. We already had the enums created. So we went about creating a helper method that would work with…

  • Burn out – is it a myth

    You often hear the term in sport of players “burn out” or managing a players workload so they don’t lose their edge. Is this actually something that happens or is it just a myth that coaches, players and management use to make excuses for a poor performance on the sporting arena? I’m sure there is a ton of research that goes into this area considering if it’s true it can cost a team or person millions of dollars if they lose that one vital game. Look at things like the American Super bowl recently. The 49ers one of the favorites bombed out early on in the final stages. Was that…

  • Rugby in New Zealand – Is it going the way of the Titanic?

    The titanic, a massive tragedy in the history of this world. To compare the state of NZ rugby and it’s slow decline is perhaps unworthy of this event however that is how I feel at present. Given New Zealands unprecedented dominance in world rugby over the past years one could easily scoff and suggest I’m just an ignorant prat who never sees the glass half full. The All blacks having an 80% win rate over the last 4 years. Winning the Rugby world cup in 2011. Our Junior all blacks dominance at their world cups. A high performing 7’s team. These would suggest we are never sitting prettier. But I…

  • On my way towards a skinny controller – ASP.NET MVC

    A learning curve My first attempt at writing a programming blog. Excuse the rambling, I’m a blogger work in progress. Being new to the whole MVC programming concept and to be honest web progamming in general the learning curve to get up to speed and produce an enterprise solution has been pretty intense. This year, I took on that challenge and must say, it’s been an enjoyable experience. The new challenges when writing web applications and a RESTful application has meant to some degree a shift in the way I have often written my software. When starting on my MVC project I quickly decided to adopt the MVVC (Model View…