Tuesday, December 16, 2008

Reviving the blog

Thanks for those few who mentioned lately that they do check my blog every now and then, I thought no one was reading this anymore and so stopped blogging. I had been meaning to revive the blog in the last few weeks and got the perfect topic today.

I have a public service announcement to those who fear about the state of things here in Amsterdam. Contrary to recent news reports, things here are just fine. The supposed anarchy has not struck and the hookers and drugs are still legal and controlled.

I will blog more in the near future, over and out for now.

Monday, June 30, 2008

First speeding ticket

I got my first speeding ticket on the motorcycle the other day. In Holland you don't get pulled over, they just send you the ticket by mail a few weeks after they catch you. What is interesting is that I would never expect to be ticketed for doing 108 on a highway that has a 100 limit. That's right folks, I got a ticket for doing 8km/h over the speed limit. The ticket amounts to 16 Euro which is not that bad. Good lesson though, even a little bit of speeding will result in a not so nice piece of mail.

Thursday, June 26, 2008

Content Query Web Part Crashes

I had an interesting error thrown by the Content Query Web Part in MOSS 2007 today. I added the web part to the page, all seemed fine until I clicked 'Modify Shared Web Part'. At this point I get an ugly ASP.NET exception (I have custom errors turned off on my dev box) that says:

Key cannot be null.
Parameter name: key

After a few hours of hunting and digging, this was what I found:

Using Reflector I dug into what the web part was trying to do and realized it was iterating through the SPFields of the current web and using the Title property of each to index into an array. Since the exception was complaining that the key is null, I assumed one of the Title fields was null.

I then used powershell to see what my fields looked like and voila, one had a null title.

The last step was to go to the feature where our team is putting the site columns we are using and finding the guilty field. I noticed that the field had no DisplayName property and so I added this.

After a new deployent all was well again.

The powershell script I used:

# Script to find fields with a null Title

Function Find([string]$sitename){

  $site = [Microsoft.SharePoint.SPSite]($sitename)
  $web = $site.RootWeb
  $fields = $web.AvailableFields

  Write-Host " "
  Write-Host "Finding fields"

  for($i=0; $i -le ($fields.Count-1); $i++){
   if($fields[$i].Title -eq $null){
    Write-Host ""
    Write-Host "Found error in field:"
    Write-Host "FieldName : ", $fields[$i].InternalName
    Write-Host "Collection index : ", $i.ToString()

[System.Reflection.Assembly]::Load(”Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)
[System.Reflection.Assembly]::Load(”Microsoft.SharePoint.Portal, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c”)
set-executionpolicy RemoteSigned


The stack trace (for googlers):

[ArgumentNullException: Key cannot be null.
Parameter name: key]
System.Collections.SortedList.IndexOfKey(Object key) +2422464
System.Collections.SortedList.get_Item(Object key) +12
Microsoft.SharePoint.Publishing.WebControls.ContentByQueryToolPart.getFieldKey(SPField field) +59
Microsoft.SharePoint.Publishing.WebControls.ContentByQueryToolPart.populateData() +1720
Microsoft.SharePoint.Publishing.WebControls.ContentByQueryToolPart.populateCBQControls() +24
Microsoft.SharePoint.Publishing.WebControls.ContentByQueryToolPart.CreateChildControls() +62
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +50
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041

Wednesday, May 14, 2008

Some trips

On Friday Mel and I are going to fly out to Canada for the May 2-4 weekend and then head down to the US for memorial long weekend there. I guess we are doing a long weekend tour since we just got back from a long weekend in Belgium. We went to the Ardenes and had a great sunny weekend full of outdoors fun. I even got attacked by a swan that we drifted by when kayaking. Those things are fierce. I am looking forward to this trip but I realized that I won't be able to ride my motorcycle for 10+ days. That is a bum deal since I have very quickly gotten used to having the bike around. Mel has some pics of me riding, I'll put them up soon.

Tuesday, April 08, 2008

Fazer wins hands down

After a day of testriding motorcycles, I am happy to report I love the Yamaha Fazer. It was the last bike I rode today and just pulling out of the parking lot felt a lot better than any other bike. The CBF is a nice bike, I rode on it for an hour or so and had a good ride. The Transalp I didn't like that much, mainly because of the long and soft front shock absorber which takes some getting used to when doing a fast stop, and the two cylinder engine is a lot rougher than the 4 cylinder ones. Think direction Harley although nowhere near that. The Yamaha simply works for me. I rode it for about 20 minutes before returning to the store and renting it for two days. I spent the rest of the day riding around and plan to do the same till it has to go back. Need to be sure I love it right? Unless something changes my mind about the bike I will be buying one shortly (think this week). I don't want to have too much of a break riding so that I can keep improving my skills. Now to decide which color I want it in.......

Monday, April 07, 2008

First guest of the season

So the tourist season is officially starting this year in mid April when Melissa's brother will be staying with us for a week. He has booked the best week of the year to experience Amsterdam as he is coming during Queensday. Those who have experienced it will know what it feels like when the whole country decides to go out and party for a whole day. This year should be extra nuts since most people have the next day off due to a church related holiday. Im curious to see how many visitors I get this year, I think last year I had 5 different groups/individuals here. Book fast before the place fills up.

Sunday, April 06, 2008

Funny quote sent to me by my cousin Boris

It is ridiculous to claim that video games influence children. For instance,
if PacMan affected kids born in the eighties, we should by now have a
bunch of teenagers who run around in darkened rooms eating pills while
listening to monotonous electronic music.

Been lazy but here's an update

Yes i haven't blogged about anything in a long time, no reason for that other than laziness. I decided it was time for an update.

I passed my final exam for the motorcycle license! I pick up the license next week and I can go buy a motorbike. I don't know which one yet since I have to go test ride them, but I have a few in mind. I like the Yamaha Fazer, the Honda CBF600 and the new Honda Trans Alp. These choices are based purely on looks/price/reviews so they are likely to change once I ride them. The CBF is very close to the motorbike I did my lessons on so I know what that rides like.

As of a few weeks ago, Melissa has officially moved in with me. I say officially since she has been living here more than at her old place for quite some time now. I just convinced her that it would save both of us travel time if she brought her stuff. :) So far so good.

I still don't have the damn couch I ordered, I am going to pseudo-court with the company sometime soon. It's going to be great fun.

I haven't worked (for money that is) since the end of January so it was time to get back to that. I had some work to do in the apartment still which is done now so I can return to making money. I had a very sweet offer from a bank in Amsterdam but they contacted me a few days after the offer and canceled it due to budget freezes from upper management. Kind of a dumb move on their part from what I can see, but I don't know the whole story. Let's just say I have exactly the experience they need and I will be very surprised if they find someone else in Holland who has done this work before. I'm guessing they wake up 3 months before the project has to be done and I'll get a phone call. I can't wait that long though so I took another offer that is close to the Hague. It's a bit of travel but I don't mind since I usually wake up with Mel anyway. We'll be on the same train in the morning as a matter of fact, I just go a few stops farther. The work should be interesting, it's a MOSS developer job and I am kind of looking forward to writing some code again. I have been doing a lot of coaching and mentoring in my last job and I only wrote a few small (but damn cool) bits of functionality.

I am seriously considering doing an MBA. I went to an information night regarding the MBA offered by the Amsterdam Business school and I think it would be a good thing to add to the resume. I am happy doing the work I do now, but I don't think I'll be able to keep up with the technology for that much longer. I know myself and my interests don't lie in reading documentation about the new stuff coming out of Redmond. I do like the coaching / mentoring that I do on a project and I also like being the decision maker on a project. I think an MBA would let me get the formal education I need so that I can keep consulting but on a different level. I always thought the MBA was only good for corporate culture but I think I was wrong there. I can still keep my freedom and make use of the MBA. It seems that companies are not adverse to having external managers come in for a project. Most of all though - I need to spend some money in a way that can be written off. I hate paying taxes. :)

For those who read this but don't know yet, I'll be in the Toronto are for May long weekend. I'm going to a wedding in Michigan with Mel and flying in/out of Toronto turned out to be better than Detroit.

Monday, February 04, 2008

Motorbike exam 2 done

Last Friday I successfully took my second motorbike exam. This one was a practical in a parking lot and consisted of a number of 'special maneuvers'. I didn't do perfect but I passed with no problem. One more exam and I have my license. The best part is that my lessons don't have any more boring parking lot exercises, it's all riding now. Today I had the motorbike up to 140km on the highway in a really strong headwind. I can't imagine what 220 must feel like on a bike without a wind screen. I also started to seriously look into what motorbike I want to buy, and so far I like the Yamaha Fazer. Not that I can make any serious decisions before taking it out for a test ride, but the specs are good for a beginner bike and I think it looks great.