Monthly Archives: May 2008
Just arrived back from my visit to the Microsoft DevDays 2008 in Amsterdam. It was a great day and I’ve attended some interesting sessions.
I’ve uploaded the photos I took to my Flickr account, so check ’em out. I’ve also uploaded a small video of the “Holland Sport” bicycle race track we had at our booth. Check it out:
It was a very tiring day and I’m going to get some sleep now. I’ll blog about some more about the DevDays later on…
Tomorrow (well… in a couple of hours actually) I’m off to Amsterdam for the Microsoft DevDays 2008. This year I’m only going to attend the first of the two days. My employer, Atos Origin, is a Platinum sponsor for the event and we’ll be there with a big booth.
At our booth you’ll be able to compete in a fun bicycle contest and perhaps win one of the six XBOX 360 consoles we are giving away! Hope to see you there. I’m scheduled for booth duty on thursday morning. Yes, that’s during David Platt‘s great keynote on “Why Software Sucks”. Fortunately I’ve already seen this one during TechEd Developers 2007 in Barcelona last year and I also own an autographed copy of his book on the topic. But still I’m going to try to sneak away from the booth for a while 🙂
As for my SharePoint interests I’m hoping to get a chance to speak with Jan Tielens and Patrick Tisseghem, who are both scheduled to speak at the event. I’ve got some burning questions about Custom Security Trimmers that I hope Patrick can answer.
Oh, and ofcourse I’ll take my digital camera and see if I can take some nice pictures of the event and post them here.
Last week I was refactoring some of my SharePoint code. I stumbled on a loop that created a new SPQuery instance for each iteration. The code was something like this:
As the value of the ViewFields property remained the same for each iteration I decided to create just one SPQuery instance and reuse it, like this:
To my surprise this code didn’t work! The first time the SPQuery instance was used it worked just fine. However, during the next iterations of the foreach loop it didn’t seem to get updated.
So, what have we learned today? Never reuse SPQuery instances!
Well… That’s not entirely true. You can reuse SPQuery instances for a very valid reason. If you use the RowLimit property you can limit the number of items returned in the query, which is useful for paging as seen in this sample code (taken from MSDN):
So, only reuse SPQuery instances if you use paging. If you change the actual CAML query you should create a new SPQuery instance for it.
I might have happened to you too: make some error in a Windows virtual machine and your system will *BEEP* out loud. Not some nice and fancy WAV/MP3 sample, but a raw *BEEP* coming straight from your system’s motherboard. This *BEEP* does not respect your speaker volume and mute settings. And it will probably irritate most people who sit near you.
Fortunately getting the beep to shut up forever is relatively simple. Here’s how to do it:
- Open a Command Prompt window (in Vista make sure you open it using the “Run as administrator” option).
- Use the following commands:
- To stop the Windows Beep Service:
net stop beep
- To make sure it never gets started again:
sc config beep start= disabled
That should take care of them BEEPs 🙂