# Monday, 08 September 2008

evil-insideWhen first I saw the var keyword in C# 3.0 I was excited, my body tingling with excitement for the possibilities this keyword would bring to the world of many a .NET developer: Productivity, clarity, fame, and fortune. Unfortunately now that C# 3.0 has been with us for a while I feel that I must warn the public of the evil that is the var keyword. Productivity, clarity, fame, and fortune have succumbed to mind boggling spaghetti code, confusion, and lets be honest fame and fortune were never really on the table to begin with :)

What then is this evil of which I speak? Massive overuse of the var keyword. Observe the following hot dish of spaghetti bolognese:

   1:  public void SpaghettiBolognese()
   2:  {
   3:      var calculator = new Calculator();
   4:      var taxLevel = GetTaxLevels();
   5:      var person = GetPerson();
   6:      var tax = calculator.CalculateTaxLevel(person, taxLevel);
   8:      person.Tax = tax;
   9:  }

All kidding aside this piece of code breaks one of my most fundamental rules when reading and writing code: Don't make me think. Grokking a piece of code is though enough as it is having to keep types and varibles in memory (read: the developer brain) will slow down the process of code reviewing or debugging a piece of code.

For now I'm using a couple of rules to keep the var silliness at manageable levels.

1) Always use proper types for variables which are set from a method or property. It makes the code so much more readable.

   1:  Tax tax = calculator.CalculateTaxLevel(person, taxLevel);

2) Do use the var keyword when there is no question about which type it will be inferred to.

   1:  var calculator = new Calculator();
   2:  var i = 100;
   3:  var s = "Søren";

While the var keyword does offer a nice productivity gain it's important to realize when to use and more importantly when not to use it. Also it would seem that the var keyword is in cahoots with the good folks at Jetbrains as ReSharper is very eager to convert perfectly well formed type declarations to implicitly typed ones. As I started out by saying be wary of the var keyword - it's one sneaky bastard :)


posted on Monday, 08 September 2008 21:57:14 (Romance Daylight Time, UTC+02:00)  #    Comments [10] Trackback

opera-mobile-95-logo This summer I spent two weeks in southern England vacationing with my family; beautiful country side though not really known for its blazing high speed broadband connections. Chance would have that Opera Mobile 9.5 got released while I was there and naturally I faithfully downloaded it and checked it out. I did not have a chance to regret it.

Before we continue I have to put up the standard issue beta disclaimer for the browser: Opera Mobile 9.5 is not in final form. Be aware that it might bring your Windows Mobile phone to its knees, even destroy it completely also bear in mind that there's a slight chance that the beta status of the product will affect your ability to have children. Consider yourself warned! :)

Before we dive in you should know that Opera Mobile 9.5 will only work on Windows Mobile devices equipped with a touch screen. Why you ask? The reason is the fact that navigating web pages on Opera Mobile 9.5 is pretty much driven with the touch screen alone. While that is a bit of a let down for non-touch screen device it's also the main reason why you should care about Opera Mobile as a Windows Mobile user. What it means is that basically you can get an iPhone-like browsing experience on Windows Mobile. Simply put you don't have to use those annoying little scroll bars in Pocket IE to get around the page instead you swipe your finger across the screen which will produce a nice scroll complete with the rubber band effect found on the iPhone.

Auto full screen is a great feature. It does exactly what you'd expect it to do: When displaying a web page Opera will switch to full screen mode automatically and leave it there until you click the little transparent menu icon which will bring up the browser chrome and enable you to enter a new URL, view your favorites, or switch tabs.  


The tab feature is a particularly nice touch at least for me as I've often found myself needed to browse away from a particular page because I needed to look something else up. A very annoying problem that Opera Mobile does away with like that. Now there's a small caveat as only three tabs are support at any one time. At first I thought that it would be a major deal but as it turns out you really never need that many active tabs; at least I never hit the upper limit during my normal usage of the browser.


Add to this the fact that Opera Mobile will display web pages in their complete form like you're browsing from a PC and we're in business. Much like Safari on the iPhone Opera will display the web page in its entirety on the tiny screen and allow you to zoom in on areas of interest by double tapping the screen.

All is not well in Opera land though and the beta part of the product did rear its ugly head. While touch scrolling works fine most of the time I did find that it would screw up during page load. Trying to scroll on page while loading it would more often than not send the browser scrolling to the bottom of the unfinished page, warp speed and all. Also on the subject of weird behavior with loading pages I found that the auto full screen feature would mess up when trying to scrolling during page load and continually switch on and off until the page finished loading. The bug is very profound on a slow connection like GPRS but you hardly notice it browsing on a WLAN or using 3G.

It does seem like a couple of issues are related to trying to navigate pages while Opera is loading as I found it exceedingly difficult to tab the links. This wasn't helped any by the fact that no visual cues are provided which will give a clue whether or not the link you just clicked was indeed clicked properly. Again on slow connections this is more pronounced as the only cue you get that you actually clicked the link is when the destination page actually turns up. This also goes for button on web pages which don't produce any cues to the fact that they were actually clicked.


Opera Mobile does lack a little polish here and there which I discovered on my phone which is outfitted with a hardware keyboard that unfortunately Opera doesn't seem to be aware of as it helpfully kept popping up the software keyboard whenever I tapped a text field. Just a minor annoyance that I hope Opera will fix with the next release.

On a nice side note I became aware of the bug because Opera is a damned fast browser at loading content. Even on very slow connections text starts displaying very quickly and were it not for the scrolling bug you'd be reading web content in a matter of seconds on a GPRS connection. After a while I simply turned of the auto full screen mode while on GPRS so I could browse away to my hearts content. The feature is very good and I did turn it back on when I was able to connect via a faster connection.

What this boils down to is basically that the combination of touch scrolling and PC-like rendering of the web pages make for a usable web browsing experience on Windows Mobile where previously I'd say that it was lacking in a number of ways though better than what you'd find on comparable Symbian-based phones. During my vacation I found myself browsing the web more than I ever did. Even I returned home I found myself reaching for the phone where I previously would have gone and fired up the desktop to browse. Opera Mobile is that good missing polish aside.

If you own a touch screen Windows Mobile phone I highly recommend that you go and give Opera Mobile 9.5 a spin. You won't regret it.

posted on Monday, 08 September 2008 20:26:12 (Romance Daylight Time, UTC+02:00)  #    Comments [3] Trackback
# Tuesday, 17 June 2008

Need I say more? Be one of the first to grab it from FTP.firefox-logo

posted on Tuesday, 17 June 2008 19:46:10 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Wednesday, 11 June 2008

vista_logo In Windows XP and Windows Server 2003 I used the "Run As" command religiously for testing various stuff. Today I needed the same thing in Windows Vista, right clicked a program in the start menu and ... nothing. No Run As command. Confused I held down the shift key in the hopes that it would appear. Again nothing.

Turns out the only thing you get in Windows Vista is the "Run as Administrator". Oh you can have Vista prompt you for credentials every time you select Run as Admin by changing the local group policy but I really don't want to spend the time changing the configuration or the hassle of having to enter credentials every time I want to run something as admin. I'm lazy like that.

Sysinternals to the rescue with ShellRunAs. It adds a new menu item to the right click menu which allows you to enter a different set of credentials to run the application under. Nice! No hacking of group policy required.



Download ShellRunas

posted on Wednesday, 11 June 2008 15:29:34 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Tuesday, 10 June 2008

ReSharper-Logo My favorite Visual Studio add-in just got revved to version 4.0. Full LINQ support included along with a number of other goodies. I may have to update my ReSharper review now :)

Although I got to say that an install screen looking like this would scare me just a little if I didn't know the product all ready. Busy, Busy, Busy!



Download ReSharper 4.0

posted on Tuesday, 10 June 2008 09:20:01 (Romance Daylight Time, UTC+02:00)  #    Comments [7] Trackback
# Thursday, 05 June 2008

Community-People In my first post I covered the Why? of community and ended up with this mission statement, "The Danish .NET community is an open platform through which developers meet as equals to share experiences and inspire each other through enthusiasm".

With the Why? in place I followed up with What? and came up with my personal idea for the Danish .NET community, "The Danish .NET community is about face to face meetings where people participate on equal terms and secondarily about online activities to make up for the intervening periods.".


And now for my favorite part of the series: The practical aspect. The how!

How do we go about creating an open platform through which developers meet to share experiences? In many way I already feel we've made good inroads on that one. Naturally I'm a little bit colored here due to my involvement in ANUG but I honestly feel that the the user groups out there are the very best vehicle for getting developers together. Especially with user groups popping up in major cities across Denmark and the possibility of cooperation between them.

That's why I'm taking the initiative to bring the core groups of the Danish .NET User Groups together on a regular basis to knit the enclaves of .NET community better together.

The NUGs will create a nice platform from which to create the informal gatherings which are the geek dinners. I like the idea of geek dinners and I feel that the informal nature of such gatherings help people let their guard down a bit and talk more freely about whatever challenges they're facing day to day.

Microsoft of course is playing their part in this with the TechTalks which I feel are much better than the Meet Microsoft events of yesteryear due to their clearer focus. Although I feel that Jutland is left out in the cold a bit.

Microsoft is very keen to help out and I've wracked my brain to come up with ideas for places where they can help out because basically the .NET community seen with my eyes is better than ever.

One way to help out the NUGs is by helping us put together large scale shared events, maybe full day events with specific themes and who knows, maybe in the long term we can go even bigger and create a yearly .NET conference? Microsoft has experience with this kind of stuff with the Meet Microsoft events and I feel it could work even better with the special sauce that the NUGs bring to the table.

Also I'd like to see large scale events based on the open space principle. Simply bring together a bunch of enthusiastic and opinionated people and have them go at it. We've discussed doing this within ANUG but we feel that the scale is too small to do it without any sort of structure. But imagine gathering people from across the country for a day of open space discussion; I see some magic happening there.

We need to take a long hard look at what's already out there and not try and create new initiatives. Basically what will happen is that we'll water down the community until relevant information is scattered across the ruins of the community useless to all. In that vain I propose that we start using some of the prominent .NET sites out there to share information like DotNetForum.dk. More specifically I'd like Microsoft to not try and invent the wheel by creating their own platform for sharing content. Use what's out there, use DotNetForum.dk, ActiveDeveloper.dk, or whatever else. Please don't try and do something completely new. Just get the content out there and back the existing efforts by doing so.

I was surprised to find that people place an enormous value on web casts and specifically on web casts created here in Denmark. I partially agree that they are a good vehicle for information but only for some information. I've given Daniel a though time in the past but he has proven that web casts are the way to go for personal interviews with people in the community. His unique position with Microsoft along with his outgoing personality makes him perfect to go out there and do just that.

These are some of my opinions and ideas on how we can make the .NET community even better. In short we need to create more opportunities for us to meet face to face and use the existing platforms to promote new content.

I'd like Morten Jokumsen's opinion on where he sees DotNetForum.dk, I'd like to hear from Daniel Mellgaard Frost and Bo Drejer whether we can establish a strategy based on some of this stuff, I'd like to hear from the powers that be at ONUG Jesper Blad Jensen, Joachim Lykke Nielsen, and Kasper Bo Larsen what their opinions on this are, and the same thing goes the KNUG guys Jakob T. Andersen and Mads Kristensen.

posted on Thursday, 05 June 2008 19:48:20 (Romance Daylight Time, UTC+02:00)  #    Comments [3] Trackback

Community-People This is my second post in the series Do! Community! Why? What? How?. In this post I'll try to address the What based on the mission statement from the previous post, "the Danish .NET community is an open platform through which developers meet as equals to share experiences and inspire each other through enthusiasm".


What makes a community? I guess that's it different for each individual. For me it's all about meeting people and doing so continually. I first started feeling part of a community with my involvement in Århus .NET User Group and Danish Forum for .NET Architects.

Meeting the same people again and again, getting a sense of what they're about, and why they care about the things that they do, that's what community is for me.

Blogs, web casts, online articles, never really did it for me. To me it's very impersonal although once I've met a person I usually follow their blog religiously.

Everything should have the chance to participate in this on the level he or she desires be it as an attendee at a meeting, as a speaker, posting to a blog, whatever, and everybody should have even opportunity to do so.

The Danish .NET community is about face to face meetings where people participate on equal terms and secondarily about online activities to make up for the intervening periods.

Read part 3 Do! Community! How?

posted on Thursday, 05 June 2008 19:47:18 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

Community-People In my last post I was pretty harsh in my statements about Microsoft and Daniel in particular but I felt it necessary to get out there in order to spark a debate or at least get the right people thinking about what's going on.

Now that said I also feel that whenever someone puts forth criticism it's vital to back it up with something substantial to address the situation. That's what I intend to do with my next couple of posts.

First I'd like to address why we should care about the community at all. The why of it. Second what can we do about it. The what. And finally I'll talk about ways to get where I'd like to see the community go. The how.


I never felt as part of any community in my years working with Microsoft technology, not when I spent a lot of time answering questions on news groups, not when I spent time on Eksperten.dk, and not even when I attended the Meet Microsoft events regularly when they were still running.

During the last year though that started to change. Along with the other members of the core group I've busied myself with getting Aarhus .NET  User Group off the group. Right around the launch of ANUG I was invited to be part of the Danish Forum for Danish .NET Architects. Both initiatives have brought change to the way I think about the Danish community. With that in mind I'll try to explain why we should care or at least why I care.


To me community is inspiration, participation, enthusiasm. At the core of each of these words are people. Interaction with people, knowing people, sharing experiences with others.

I care about the community because I care about people. I care about creating something which benefits others, not just myself. That's why I blog, that's why I spend my spare time helping out with ANUG, that's why I take the time to answer every comment and e-mail I receive.

Simply put you should care about the community because it provides developers a great way of inspiring each other, of sharing the enthusiasm that most of us feel every day when we go to work, and finally because community knits together competency centers across the country which otherwise wouldn't benefit from each other.

In short I feel that we should care about the community because the Danish .NET community is an open platform through which developers meet as equals to share experiences and inspire each other through enthusiasm.

Read part 2 Do! Community! What?

posted on Thursday, 05 June 2008 19:46:35 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Monday, 02 June 2008

publicvoid-logo I seldom take the time to respond to a blog post directly but in this case though I feel that I must.

Before I get to the actual commentary a little background on what's going on in the Danish Microsoft developer community: Microsoft Denmark is very eager to reboot their community effort. In that vain they're trying to engage the people who are active in the community. Central to this initiative is Daniel Mellgaard Frost, the new developer evangelist with Microsoft. Since he came on board two months ago he's been very visible and has shown lots of energy and enthusiasm for which I have nothing but praise to sing. All is well and good up to this point.

As part of this effort a number of people was named Microsoft Designated Information Providers of which I am one. This Wednesday all the MDIPs where pulled together for the first time in a community event set up by Daniel Mellgaard Frost.

I honestly didn't know what to expect and so I was rather shocked when Daniel stood up first thing and started rattling of all sorts of demands for content delivered by the MDIPs. Now don't get me wrong I'm happy to help out but I do so on my own time and because I enjoy the work I do with ANUG a great deal. Not because I seek to please Microsoft thank you very much. I'm sure that Daniel meant it well when he stood up and tried to take control of the meeting but he came off very matter of fact and became defensive when challenged on his point.

Bad start aside we did get a good discussion going and it seems that Microsoft is very keen to help us out. Now my only problem is that when we get right down to it all we got from the meeting was a whole bunch of fluff. I understand that we're in the early phase of this thing but honestly if the MS evangelists are so eager to make stuff happen in the community it would have been so much better come to the meeting with concrete initiatives instead of a lot of "we'd like to do this...", "we could do that...", "We don't want to step on anybody's toes...". In short I'm missing purpose and direction on this one. I simply didn't take away any sense of an overall strategy for the initiative which is a crying shame given all the energy put into it.

Case in point we wanted to create a place where the MDIPs could communicate about ideas which everybody felt would be a good thing. Now the MS guys seemed at a loss as how to make this happen. While the we were discussing various avenues of making this happen Morten Jokumsen simply whipped out his iPhone and created a new group on DotNetForum. See here's an example of "Do! Community!". Don't talk about it. Do it!

Another example is the community event scheduled for the next day open to anybody and everybody. A meeting set up by Daniel although he apparently didn't deem it necessary to come prepared or even well rested. He spent five minutes there before leaving the scene to the attendees. What happened after he left? Odense .NET User Group was formed by the attendees, web sites went up, and a core group of people committed themselves to getting the group off the ground. That's "Do! Community!". Don't set up a meeting like that, sit back, and wait to see if something might happen. Set something up and make it happen!

There is a lot, a lot! of good intentions within Microsoft to do good in the community but I feel that they're paralyzed from taking action. Everything seems to be a committee and they don't want to cause a stir by favoring one initiative other another. That's not doing. That's not even trying.

And finally we come to my point with all this. I'm not trying to bash Microsoft, the evangelists, or Daniel specifically. What I am trying to get across is the fact that before you can start acting up in the community you need to prove yourself. Prove that you want to make a difference. Even more importantly make an actual difference.

I know that Daniel is very active with ActiveDeveloper.dk, both now and prior to his job with MS as evangelist and he is trying to do good, not doubt about it. His latest post though seems to indicate that he feels that he personally is the driving force behind the Danish .NET community. I'm flabbergasted when I see comments like these , "you just have to kick people over the knee to make things happen", "the new Odense .NET User Group that I helped kick-start", and my personal favorite, "it's incredible how much I've accomplished over the last two months".

Now Daniel, I personally don't feel that you've accomplished anything as of yet. Yes, you've put heavens and seas in motion but that's a simple matter. Before putting comments like those online I'd like to see some follow through on the initiatives. Essentially it's all for naught until something is proved viable in the long term and we have yet to see that.

Do! Community!

posted on Monday, 02 June 2008 10:19:56 (Romance Daylight Time, UTC+02:00)  #    Comments [3] Trackback
# Friday, 30 May 2008

As an experiment I'm trying out Twitter a service for spewing your thoughts at the internet with little or no filtering. Kind of a public chat room.


posted on Friday, 30 May 2008 14:32:52 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Friday, 16 May 2008

At Vertica we do our very best to keep everybody happy. We pull out all the stops with inspiring work environment, nice desktops, multiple monitors, top-notch salaries, food, private healthcare, fysio, massages, etc.. But best of all, like Apple we think differently too, the fruit of the day says it all.


Yes that indeed is a rhubarb, and no I have no idea why the fruit company would think it a good idea to include it in the delivery :)

posted on Friday, 16 May 2008 15:30:36 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback