NHibernate mappings

By | March 3, 2011

I genuinely hate them! If someone knows a decent graphical editor similar to Entity Framework’s designer, please let me know!

The magic of Castle Windsor!

By | February 24, 2011

A while ago I wrote a few articles on this site about exposing Castle Windsor to your application. For some reason that caught the attention of Krzysztof Koźmic and Mark Seemann. In short they felt I was doing it all wrong! Which led to a follow up article. Fair enough, I was new to the whole principle of Inversion of Control and Dependency Injection, so I assumed they were in the know and were probably correct in… correcting me!

Since then I’ve been fiddling around with it in my spare time, trying to set up an architecture that would allow me to use Castle Windsor as it was intended. Unfortunately, my spare time is a little limited, so it took me a few months in total to come up with something a little more structured and streamlined. However, this week I got to the point where I said to myself: “Wow, now that’s cool!”

I’m not quite sure where to start. Perhaps it’s best to give some background information first.

I was looking for a clean solution to implement a Model View Presenter architecture in my application. Ideally this would be coded into a framework that I could use for any other project in the future. In fact, I already posted about modular web applications back in April last year! It addressed the Composite Web Application Block that provided the solution that I was looking for. After playing around with it however, I found it was very cumbersome to work with. Although, with the power of hindsight, that could have been due to my lack of knowledge of IoC and DI.

Read more »

Stylesheets, stylesheets, stylesheets… ARGH!

By | January 19, 2011

Ever had a problem in your code where you ended up banging your head against a brick wall for a number of days? To make it better, once solved the solution appeared to be so laughably easy that it’s kind of embarrassing to explain why it took you so long to notice the mistake? Of course you have! Every developer has moments like that. Everyone denying this is a big, fat liar! Today’s post will be about my own little… problem.

I was trying to add a stylesheet to the RadStyleSheetManager during an AJAX-postback. Sounds pretty easy, right? That’s what I thought too… Wrong! Or, as it turns out, it was after all.

I had a custom UserControl that includes a stylesheet during the OnInit event. So far, so good. I had even seen it work on another page within the project. When I tried to use the same UserControl on a different page, it looked as if the included styles didn’t get picked up. The control itself was working fine and displaying all data, except it seemed to be missing all the mark-up. That must automatically mean the stylesheet didn’t get included, right? Right?!

Turns out that the whole problem was that the HTML on the UserControl used classes that were specified in a different stylesheet than the one being included on the OnInit event! Yeah, that should have been one of the first things to check when I discovered it wasn’t working on my page, but was working properly on another. However, for some reason I didn’t check and ended up being a bit frustrated with what seemed an illogical problem while, in fact, it wasn’t a problem at all. Just stupidity on my part.

To make things even more hilarious, I had created a support ticket at Telerik. In the ticket I had included a sample project so that the folks at Telerik Support would easily be able to reproduce my problem and help me out. Unwittingly I had created a class library project called “External” and included the stylesheet in there as an embedded resource. I had quickly tested my sample project and being satisfied that the problem was being reproduced, I attached it to the support ticket.

The response to the ticket was, to me, very surprising. Apparently there is a bug in the current Telerik release that causes a problem where stylesheets are not picked up from an assembly called ‘External’. External is a reserved keyword and due to a little error in Telerik’s software, the stylesheet didn’t get picked up from the assembly. I even got awarded 500 Telerik points for reporting a bug in their software! Awesome!

However, it got me thinking… the project that originally caused this problem for me didn’t have any assemblies called ‘External’. How come I’m having this problem then? I started digging around and that’s when I found out I had included the other stylesheet. Oops! Pretty embarrassing, right? I do feel a little better for having contributed, albeit unwittingly and in a very tiny way, to improving the quality of the Telerik components!

Another wonderful journey by train

By | January 13, 2011

Every day of the week I get up early each morning. When I say early I really mean early: a quarter past six (yes, 06:15) each day. I do this so I can be at the train station around 7 AM and hop onto the train and, eventually, arrive at work.

Why am I telling you this? Because I want to rant a little bit.

Same ritual this morning, except the trains went horribly wrong and I ended up having a delay of an hour! It all started in my home town. Almost every day there is an extra train waiting to be combined with the train which should arrive around 7 AM and take me to my destination. Today, as happens quite frequently, they failed to combine the trains. They ended up banging the trains together for a good fifteen, twenty minutes before realizing they weren’t making any progress. Another ten minutes had passed before some genius had taken the decision to let both trains depart a few minutes from each other to the next station where they could swap the trains around and try to combine again.

So, a little journey that should have been ten minutes, had taken around forty minutes instead. I got out of the train and ran to my connecting train and only barely made it in time. I thought to myself: phew, only half an hour delay, instead of an hour! I was wrong! Oh, so wrong. The latter part of the journey was agonizingly slow as there was a problem with the signs and crossings along the railway. In fact, it was so slow that it added another additional thirty minutes to my journey. *sigh*

Now, nobody likes having delays. Surely nobody likes arriving an hour later than planned at the destination. Almost certainly nobody likes having to face this early in the morning. The brain automatically thinks it could have stayed in bed an hour longer and nobody would have been any wiser.

Wrath, Cataclysm and I

By | January 6, 2011

I have thought long and much about writing this post. Many times I’ve started to write and ended up deleting my post, not sure how to express my feelings and thoughts coherently. Today I’m making another attempt!

The Cataclysm expansion for World of Warcraft has been released for about two months now. It’s been out long enough to have formed some opinions about the current state of the game. On a personal level, I will have to admit that I’m not very fond of Cataclysm. I will explain why later on in this post.

First off, I will start by saying that I think Wrath of the Lich King has been the best expansion so far. As I write this I like to imagine a lot of people starting to froth at the mouth and call me a “wrath baby”; someone who is used to getting it all for a minimum amount of effort. If those people would like to call me a wrath baby, fine. Let’s forget that my favourite healing spell in Classic was Healing Touch (Rank 4)!

The reason I liked Wrath so much is that the content was accessible and I managed to complete it all, including some of the harder achievements. This was a new experience for me. Classic and The Burning Crusade were made to cater to a different kind of people, so that I could never even see some of the content the game had to offer, let alone complete it! Heck, I even took an eight month break from TBC, because it was just a big grind that was far from enjoyable for me.

Not only did I get to see all the content, I had a seriously good time with people who I thought were my friends. Admittedly all of those are gone from my life at this point in time, but I will not lie and say that I didn’t have a good time. Most importantly however, I met my girlfriend in Wrath! I’ve had ups and downs and had to rebuild an entire guild from scratch only to get a Lich King kill at the last possible moment before the big 4.0 Cataclysm patch was released.

Sure, Wrath had its downsides. Introducing Trial of the Crusader and Tier 9 was a big mistake. Due to this the item level of our items turned out to be sky-high in Icecrown Citadel. This had the effect that our classes were becoming a little overpowered. Big hits, big heals, infinite mana and so on. I agree that these are mistakes from Blizzard that shouldn’t have happened, but ignoring the flaws the general style of play was awesome and very enjoyable for me.

Now we’ve arrived in Cataclysm. The style of play has changed. At the start of this expansion I figured that wouldn’t be an issue. I would adapt, as I had always adapted to Blizzard’s whims. Two months down the road I can say I feel very different. The style of my beloved healer has changed to something not very likeable. Blizzard’s new philosophy for this game and healing in particular seems to have split the community in two. One part says: “It’s fine, you just need to l2p.” The other part says: “It’s not enjoyable to play any more!”

I have found myself firmly in the latter camp. The fun has been sucked out of my game. I don’t find the new style of play enjoyable. It’s not that I need to learn to play. I have always adapted to new styles. It’s just that this time I find the new style so far from enjoyable that I don’t care about adapting. In fact, the whole of Cataclysm reminds me of The Burning Crusade. It feels like a big grind that I don’t want to spend my time on.

I play a game to have fun, not to be annoyed with grinds and time-sinks. Perhaps the time has come where I have a been there, done that attitude. The magic has disappeared. I ask myself why I should continue to pay and play a game that is not enjoyable for me. That doesn’t make sense. It’s not that I don’t like World of Warcraft any more. It’s just that in its current incarnation I doubt it will be able to keep me entertained.

I can imagine that people who are reading this are thinking: “Why don’t you just quit then?” I wish it was that simple. I’m a Guild Master and I feel I have a responsibility towards others. Perhaps I should try something different from healing for a while. I don’t know. I do know that I’ve always liked WoW and that I’ve spent far too much time on it to simply decide on the spot to quit. Nor would I want to disappoint my girlfriend (and co-Guild Master).

I guess time will tell…