Friday, 30 January 2009
I'm in my last semester here at the Norwegian University of Science and Technology, which means that I'm starting on my master thesis these days. Actually, I'm not starting now, I'm continuing on the "pre-project" I worked on together with my friend, Alex Brasetvik from August to December last year.

Our master thesis is about building a query optimizer for Fast's (now a subsidiary of Microsoft, they bought them) new Enterprise Search solution.

The report itself can be found here: MasterProjectReport.pdf, and the abstract is included below:
This document is the report for the authors’ joint effort in researching and designing a query optimizer for fast’s next-generation search platform, known as MARS. This work was done during the pre-project to the master thesis at the Department of Computer and Information Science at the Norwegian University of Science and Technology, autumn 2008.

MARS does not currently employ any form of query optimizer, but does have a parser and a runtime system. The report therefore focuses on the core query optimizing aspects, like plan generation and optimizer design. First, we give an introduction to query optimizers and selected problems. Then, we describe previous and ongoing efforts regarding query optimizers, before shifting focus to our own design and results.

MARS supports
DAG-structured query plans, which means that the optimizer must do so too. This turned out to be a greater task than what it might seem like. The optimizer also needed to be extensible, including the ability to deal with query operators it does not know, as well as supporting arbitrary cost models.

During the course of the project, we have laid out the design of an optimizer we believe satisfies these goals. DAGs are currently not
fully supported, but the design can be extended to do so. Extensibility is solved by loose coupling between optimizer components. Rules are used to model operators, and the cost model is a separate, customizable component. We have also implemented a prototype that demonstrates that the design actually works.

posted on Friday, 30 January 2009 03:08:08 (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
 Wednesday, 04 June 2008
Microsoft has published SQL Server's new logo:

I think it looks good :-)

Courtesy of Wesley from

posted on Wednesday, 04 June 2008 02:58:52 (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
 Sunday, 27 January 2008

A little while ago I promised to write about my internships at Microsoft, so here's the first post. As you may have read on my blog, I've had two internships in the Microsoft SQL Server Team in Redmond the last two summers, so I thought I could write a few words about what it's like to have an internship at Microsoft and how to get one.

So how do you actually get an internship? If you're not so lucky that Microsoft call YOU, you start out by applying for one. As I applied from Norway, the process is probably a little different from what happens in the US.

My internship story actually started in the spring of 2005, in my first year at NTNU, the university where I study. I had just joined Microsoft Student Community NTNU, and had heard that Microsoft offered internships in their headquarters in Redmond. My first thought was that this was way out of my league, and I didn't plan to apply. Then I talked to the ADE (Academic Developer Evangelist) in Microsoft Norway after a Student Community event, and he encouraged me to apply. I ended up spending the following night polishing my CV, before submitting it to Microsoft Norway the morning after.

A few days later, I got a call from Microsoft Norway, where they said that they wanted me in for a screening interview. They flew me to Oslo and interviewed me, but unfortunately, that year's story ended there, they didn't send me further on. In retrospect, I don't think that was a very bad decision actually - I'm not sure if I would have been ready for it at that time.

Then, in the spring of 2006, the story continued. Microsoft Norway were again accepting resumes and I submitted mine again, feeling a bit more ready this time. Now I got past the screening process in Norway, and I was invited for interviewing in Paris, France by Microsoft Corp. They sent me an email with some links about software testing and some words about how to prepare.

I was super-excited when I got the email, but at the same time also quite frightened. Microsoft wanted to fly ME to Paris for a weekend and interview me, just a year and a half into college. First, this was my first real job interview - and second, it was going to happen in a few weeks time - in English! At that time I hadn't really been using my English much in real life, and now I was going to do a programming interview in English...

Stay tuned for Part 2 - Interviewing with Microsoft.

Before I end, I have a few points about writing a resume when applying for a programming job. I'm no expert myself, but this is at least what I think and what I though about when writing my resume.

  • The resume is your point of entry to the interview - it is the only thing they will see when making their decision about whether to call you in for an interview or not. Make sure it's perfect!
  • You have to sell yourself - the resume is your personal ad. Include the good things about yourself and not the bad things (but don't lie).
  • Make sure it shows that you have Passion for Technology. This is what most companies look for. If you like testing the latest betas of Visual Studio and SQL Server - mention it. If you're participating in open source projects - tell which ones...
  • I would expect a decent looking resume from a programmer - spend some time making your resume look nice. Not super-fancy, but nice.
  • DO NOT lie. If you've barely touched C++, don't write that you're an experienced C++ programmer. If the the interviewer unveils it, he or she will question the rest of your resume.
  • Include your grades (or grade average) if they are good - if not, consider to provide them if/when they ask for it.

Joel Spolsky has a very interesting post about sorting resumes on his blog, "Joel on Software".

posted on Sunday, 27 January 2008 01:14:56 (W. Europe Standard Time, UTC+01:00)  #    Comments [4]
 Wednesday, 16 January 2008

While we could do the same thing in IIS6, IIS7 introduced a much more convenient way to create self-signed SSL certificates for your web sites, as described by ScottGu on his blog. However, there is one problem with the way IIS7 does this: No matter what you do (as far as I know), the certificate will be created with the local computer network name as the CN, Common Name (the site name) in the certificate. The Common Name should match the web site's DNS address to be valid, and often the DNS name is different from the computer name. This site's DNS name is for instance, while the name of the server hosting the site is LABBETUSS2008.

If your certificate CN does not match the web site address, most browsers will tell the users that you have a foobar SSL setup (even more foobar than not having a certificate from a trusted authority), and some (the newest version of FireFox, among others, I think) will completely refuse to open your site.

The good thing is that there's a way to fix it, and that is reverting to the way we had to do this in IIS6; using SelfSSL.exe from the IIS6 Resource Kit Tools. Below are the steps to to this:

  1. Download and install the IIS6 Resource Kit Tools from here:
    Note: I don't know if the Resource Kit will install on Vista or Windows Server 2008, I had the Resource Kit installed on a Windows 2003 box and just copied SelfSSL.exe.
  2. Look up the site ID of the web site you want to enable for SSL by selecting the "Sites" node in the tree in IIS7 Manager.
  3. Run SelfSSL /N:CN=<your web site address (no http://)> /V:<how many days the certificate should be valid> /S:<site ID from above> [/P:<port, if not 443>]
  4. Test your site.

Note2: It is possible that you will need to install the IIS6 compatibilty components for IIS7 in order for this to work - I don't know. You install them from the Add/Remove Windows Components dialog, or the Web Server Role configuation in Windows Server 2008.

Does anyone else know of an easier way to do this? I searched a bit without finding anything. What about adding an option to choose the CN in the "Create Certificate wizard", IIS7 team?

posted on Wednesday, 16 January 2008 23:14:01 (W. Europe Standard Time, UTC+01:00)  #    Comments [4]
 Tuesday, 08 January 2008

When living on the edge (read: running the latest betas of everything) as I do, you get trouble from time to time. This time it was Visual Studio 2008 "Data Dude" combined with SQL Server 2008. For those of you not familiar with it, "Data Dude" is an extension to Visual Studio for working with databases; unit testing of your database, automatic data generation etc.

My problem was that I kept getting a message saying "Object reference not set to an instance of an object." all the time when I tried to create a new database project. I suspected that SQL 2008 was the cause, and I was right. It turns out that "Data Dude" creates a temporary database when you're opening or creating a project. In my case this happened in the default SQL Server instance on the machine, which is SQL Server 2008 CTP5 Dev Edition. "Data Dude" didn't like that very much.

The solution (at least in my case) was to configure it to use the installed SQL Server 2005 Express Edition instead. You do that by going to Tools -> Options -> Database Tools -> "Data Connections" and
"Design-time Validation Database". Fill in the instance name of a SQL 2005 instance in the text boxes. So now you know!

posted on Tuesday, 08 January 2008 01:23:28 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Friday, 07 December 2007

Vista SP1 RC and Windows Server 2008 RC1 is now available to MSDN subscribers! Vista SP1 will also be available as a public download from Microsoft sometime next week.

I downloaded and installed Vista SP1 yesterday, and everything went smooth. I haven't noticed much difference yet, but I haven't looked much either.

I also downloaded Windows Server 2008 RC1 and upgraded the server hosting this site (from RC0). I had some trouble initially, because the RC1 upgrade is blocked if you have SharePoint installed (probably due to the fact that they have removed the SP role from Windows and are providing it as a separate download). I had SharePoint installed, but the server Role had disappeared, so I couldn't uninstall it! After some thinking I solved it by getting the separate SharePoint download, which offered me an uninstall option when I ran it.

Below is a screenshot of my potentially risky remote upgrade of the server hosting this site. It's the second time I've upgraded it successfully over Remote Desktop, so it seems to work :-)

posted on Friday, 07 December 2007 17:37:51 (W. Europe Standard Time, UTC+01:00)  #    Comments [1]
 Tuesday, 13 November 2007

Microsoft Norway is running a gadget competition at these days where users can submit Vista Sidebar Gadgets and Windows Live Gadgets.

My contribution is a Vista Sidebar gadget where you can track packages and letters sent via the Norwegian Postal service, Posten. By entering you package tracking number, the gadget will get the latest updates for you package every 30 minutes and display its status in the sidebar. You can also click the envelope to open up the full package history in a fly out window.

So, if you like the idea, go to the competition site, and download my gadget from the "Gadget Gallery", or use this direct link to If you like it, please log in with your Windows Live account on and vote for me :-) You can win Vista Ultimate, a mouse or Expression Web just by voting :-)

posted on Tuesday, 13 November 2007 02:10:00 (W. Europe Standard Time, UTC+01:00)  #    Comments [3]
 Tuesday, 30 October 2007

...does not work, it looks like.

I upgraded my installation (hosting this site) of Windows Server 2008 from Beta 3 (June CTP) to RC0 today - over remote desktop! My server is located in a locked server room, so I wanted to try a remote upgrade before asking for the key, and it went well. I extracted the ISO onto the hard drive, started the installation from remote desktop and selected the upgrade option. It turns out that the Windows setup doesn't (luckily) show any dialogs where you have to click next during the upgrade. I had a continuous ping trace running and observed the server going up and down a few times, before it completed the installation and enabled incoming remote desktop connections again. Pretty cool!

But, back to the title. Everything worked well after the upgrade, except SQL Server 2008 July CTP. I kept getting error messages from Management Studio when connecting saying "No process is on the other end of pipe", and this led me into thinking that I had a certificate problem. See this blog post.

But, it turns out that this wasn't the issue. The issue is that Windows Server 2008 RC0 ships with a version of SQL Native Client that is newer than what the SQL Server 2008 July CTP supports, so it just doesn't work. This thread says it will be addressed in the next SQL Server CTP. Until then you have two options:

  • Use Management Studio 2008 from another machine to administer SQL Server. This will probably still give you problems if you run SharePoint on the same server, at least my SharePoint installation gets the "No process in end of pipe"-error
  • Install SQL Server 2005

For now, I'm going with SQL Server 2005 while I'm waiting for the next CTP of SQL Server 2008. I read somewhere that it is expected in the next one to two weeks. It will probably contain lots of new stuff, like spatial data support, Intellisense in Management Studio and so on. Looking forward to it!

posted on Tuesday, 30 October 2007 18:37:16 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Monday, 23 July 2007

It's been a while since my last blog post, so now could be a good time for some updates. First; I'm back in Redmond this summer too, in a summer internship for Microsoft. I'm working on the SQL Server team this year too, but changed teams internally, from the Test Execution Team to the SQL Server Build Team, which is responsible for building (compile, optimize, sign etc.) SQL Server. This means that I design and write software we use to build SQL Server. Right now, I'm working on a system for Peer-to-Peer File Sharing in the build lab, in C#. Building SQL Server involves copying hundreds of GB of data over the lab network, so by doing this p2p instead of centralized, we can reduce the load on the network. This project is really challenging and fun to work on.SQLserver05Ent_web.jpg

So, what about the title of this blog post? This Thursday, all interns were invited to a lecture by J. Allard, and the e-mail said that they would be doing a raffle drawing for one Zune for all the interns after the lecture, but instead they gave away a free Zune for every single one of us! Pretty cool!

I haven't used it too much yet, but so far it looks very good. With it came a 14 day Zune subscription pass, which enables you to download most songs from the Zune on line store for free, which is pretty cool.

I plan to write a few blog posts about how you get an internship at Microsoft, and what it is like, so stay tuned :-)

Below is a picture of a part of the main campus with building 35, where I work, highlighted:


posted on Monday, 23 July 2007 00:28:03 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Wednesday, 07 February 2007

During Christmas I took two upgrade exams (70-431: MS SQL 2005 Imp&Maint, 70-553: MCSD to MCPD Part 1) to upgrade my Visual Studio 2003 and SQL Server 2000 certifications to .NET Framework 2.0 and SQL Server 2005. Those combined with two I took in Redmond last summer (70-447: MCDBA to MCITP:DBA, 70-554: MCSD to MCPD Part 2) gave me a bunch of new certifications all at once, more precisely 4 x MCTS, MCITP: DBA and MCPD: Ent.App.Dev.

Then the interesting part: All of those come with welcome kits with diplomas, some also with pins and wallet cards in separate envelopes. Therefore, I was wondering if they were going to put everything in one envelope when I ordered something like 9 welcome kits at once. But they didn't, and here the other day I found my mailbox full of welcome kits :-) Take a look at the picture below where I have spread them out on the bed.


posted on Wednesday, 07 February 2007 01:59:59 (W. Europe Standard Time, UTC+01:00)  #    Comments [8]
 Sunday, 05 November 2006

A couple of months ago my team from Imagine Cup (Team NTNU) got an invitation to TechEd 2006 in Barcelona from the organizers of Imagine Cup and Microsoft EMEA.

We are going to present our solution and talk a little about our experience in India to the students attending TechEd. We're maybe also going to have a booth with some posters and stuff where we can show our solution. TechEd starts on Monday, so now it's time to get to Barcelona.

It's also going to be exciting to see all the new stuff they are going to show at TechEd. I've never attended a developer conference at this scale, so this is going to be interesting!

posted on Sunday, 05 November 2006 01:28:35 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Friday, 03 November 2006

On Wednesday Gøran and I held the third lecture in the .NET course I mentioned in the last blog post. This time it was about Windows Workflow Foundation, which is a very cool product. I'm looking forward to testing it more. The lecture was recorded on video this time too, see links below (only in Norwegian this time too, unfortunately).

Part 1:

Part 2:

posted on Friday, 03 November 2006 23:57:47 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Friday, 13 October 2006

It has long irritated me that NTNU - The Norwegian University of Science and Technology - doesn't offer ANY courses on Microsoft Technology whatsoever, at least as far as I know. We're only learning Java and other stuff, and .NET and C# are lucky to be mentioned at the end of a sentence. The foremost university in the country should take a look at the figures for which technologies are really used by software companies today.

But, things are starting to change, but not exactly in the way I expected them to:

  1. It is not my department, the Department of Computer and Information Science (IDI) that is responsible for the change, but the Department of Engineering Design and Materials! The first .NET course at NTNU is not hosted by the computer science people, but by the engineering design and materials people! Come on, IDI, take the hint! Look outside your own little Java sandbox.
  2. Guess who is holding the lectures! It's Rune Zakariassen from Microsoft, me and a friend of mine, Gøran, from Microsoft Student Community NTNU. That's pretty cool!

The course is a preparation study for 5th year students starting on their diploma assignment, and consists of four seminars with lectures and hands-on labs. The first one was an introduction to .NET and C#. The second one, held this Wednesday was about Windows Communication Foundation (WCF), and the two next ones will be about Windows Workflow Foundation (WF) and real time communication. The idea behind the course is to give the students a superficial knowledge about these technologies so they can use them in their assignments.

The lectures were recorded on video. Here are the videos from the WCF lecture (in Norwegian, unfortunately):

Part 1:
Part 2:

posted on Friday, 13 October 2006 02:30:32 (W. Europe Standard Time, UTC+01:00)  #    Comments [7]

I'm still alive, but I've been so busy the last couple of months that I haven't had the time to update the blog. So here comes a blog post a bit longer than usual.

A lot of things have happened since the last post from August 3rd:
- Team Norway got third place in the Software Design final in Imagine Cup
- My internship at Microsoft is over
- I'm back in Norway at school

So, let's take the first things first.

From the 4th to the 12th of August I had one week off from my internship at Microsoft to participate in the International finals of Imagine Cup 2006 in Agra and New Delhi, India, together with my team mates from Norway. I flew from Seattle to New York, had 20 minutes to get on the plane to New Delhi and then spent the next 14 hours on that plane. We actually flew right above Trondheim, the city where I study here in Norway. I took around 30 hours in total, and then add the 11,5 hours of time difference and staying up the first night in India to get our demo up and running, and you're there.

We didn't really expect to get as far as we got in India, since we knew there were going to be very many good teams and solutions. But we wanted to do our best, and at least we would get to see what India and the Imagine Cup finals are like :-)

Our team consists of four students from NTNU; Jan-Kristian (who is a FTE at MS now), Jonas, Gøran and me. We participated in the Software Design category, in which you are to come up with an idea on this year's Imagine Cup theme and design a software solution around this.
The Software Design category consisted of three rounds. The first round was a 20 minute presentation where we presented our solution to the judges, and then 10 minutes with Q&A after wards. We held our presentation, and we thought it went pretty well, but we were still a bit surprised when we were selected to be among the 12 best teams that went to the second round. Now we were starting to think "maybe we're onto something here", and went for the second round presentation to do our best.

As always, things didn't come together before the last moment. We stayed up all night before the first round to get our demo up and running, and when we got to the second round, we had to improve it a bit. So we were coding to the last moment. After the second round, things got even better when it was announced that we were among the six best teams, along with Denmark, Italy, Japan, China and Brazil. We were to present our solution to all the other contestants at the biggest conference center in New Delhi! The presentation went well, and we managed to answer the questions the judges came up with pretty well. Finally we ended up third, winning $10 000 and a trip to England in January!

The trip was great; we got to see India and met a lot of other smart people with the same interests. The only showstopper was that I got sick a couple of days, probably because I ate some ice cream which I shouldn't have eaten. I missed a couple of things, the trip to Taj Mahal, among others.

Thanks to all the people who made Imagine Cup 2006 possible and to all the participants for a great time in India!

Us on stage in Delhi, presenting the MSN bot in our solution.

After the prize ceremony. We won $10 000! (Me on the far left)

Gøran has published a few photos from India on his Flickr site:

When we got third place, we got a lot of publicity on many internet sites and in many newspapers. The number of results when you google my name has skyrocketed from about fifty to several hundred.

Here is a collection of links to news paper articles about Imagine Cup (mostly in Norwegian, unfortunately): Demokraten: Fredrikstad-student i verdenstoppen Dagbladet: Nerde-bronse Fredrikstad Blad: Bronse til Hvaler-gutt i Imagine Cup Fredrikstad Blad: Til topps i Imagine Cup? Fredrikstad Blad: Til "data-VM" i India Microsoft Announces Imagine Cup 2006 Winners - Norwegian Students Take 3rd Adressavisen: NTNU-bronse i India NTNU-studenter i verdensklasse Adressavisen: NTNU-studenter i verdenstoppen Computerworld: Tredjeplass for NTNU-studenter Dagens IT: Forsvarer Norges ære Dagens IT: NTNU-studenter på verdenstoppen NTNU-studenter på global medaljeplass Nordmenn i global teknologikonkurranse  Grunder: Stor seier for NTNU-studentene Nettavisen: NTNU helt i tet Nordlys: Lakselv-studenter kan nå helt til tops Gjør suksess i India Nordlys: Lakselvgutter i verdenstoppen

I'll talk more about my internship at Microsoft in a later blog post.

posted on Friday, 13 October 2006 02:21:43 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Wednesday, 02 August 2006

I'm working a bit with SQL Server Reporting Services 2005 these days, and discovered a pretty funny bug. Somebody has probably found it already, but I think it is kind of funny. This is how it's reproduced:

  1. Create a new report in the report designer.
  2. Click some element, the report itself, for instance, and select Background Color: Expression in the properties window.
  3. Select "Custom", pick a color, red for instance, and double click it do put it into the expression window.
  4. Click OK and watch the report turn.... BLUE!

It looks like the hex-formatted color string is reversed when it is inserted into the expression editor window.

So where do I find the guys who wrote it, hmm. Was it out my office door, to the right and 50 meters straight ahead?

posted on Wednesday, 02 August 2006 04:27:38 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Thursday, 13 July 2006

Any of you tried that? Well, if you have, you probably encountered some interesting behavior. At least I did.

I'm developing a web application here on the SQL Server Team @ Microsoft that needs to run in an application pool that runs with the identity of a domain user account. The application also uses Windows Integrated Authentication.
For some reason I was not able to access the website from any other place than the local machine, even though I am an admin on the machine. I just kept getting login-boxes, which is equivalent to access denied. After three login attempts it resulted in "HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials."

When using Integrated Authentication, IIS is by default configured with two authentication methods: Negotiate (Kerberos) and NTLM, with Negotiate as the primary that is tried first. After burning off a few hours trying to figure this out, I found that in my setup, Kerberos authentication fails, and IIS will not let you access the web site. The same is also true if run the App Pool as a local user, and the server running IIS are not using a WINS or DNS name. It looks like the easiest solution is to disable Kerberos and force IIS to use NTLM. See the MS TechNet article below for how to do that. The blog link below describes another solution to this problem which may be preferable.

So now it works, thanks to these links:


posted on Thursday, 13 July 2006 03:05:15 (W. Europe Standard Time, UTC+01:00)  #    Comments [2]
 Friday, 30 June 2006

As I wrote in my last post, I have a summer internship at Microsoft in Redmond, USA this summer. The same also applies to Vegard Andreas Larsen, also from Norway, studying at the same university as I do.

Lately a couple of Norwegian journalists have got to know this, and Vegard and I suddenly got a lot of publicity. The local newspaper Fredriksstad Blad published an article about me three weeks ago, and today Norways second and third largest newspapers published two articles:

Fredriksstad Blad:

The articles are in Norwegian only :(

posted on Friday, 30 June 2006 01:39:55 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Tuesday, 27 June 2006

As most of you probably have figured out from my last blog post, I’m at Microsoft’s headquarters in Redmond. I have a summer internship here this summer, and will be working here until the end of August.

The whole story started in early March this spring. I applied for the internship through Microsoft Norway and sent in my resume. In end of March I went to Paris and was interviewed by three people from Microsoft in Redmond, one recruiter, one PM and one tester.

I was asked to solve a programming problem about finding the lowest common parent of two nodes in a binary tree, and then to write the code to solve it on paper. I was also asked a brainteaser and to give examples on how I would test different things, like a table.

Right before Easter I received a job offer as a Software Design Engineer in Test (SDET) on the WinFS team, so here I am.

My first impression of Microsoft is that it is a huge company, and the main campus here in Redmond is quite large. The work environment here is very nice – everybody is nice and you don’t need to wear a suit at work – you can wear whatever you want. The campus is nice – nice buildings and lots of trees and vegetation – almost like a large park.

As some of you may have noticed, WinFS has been cancelled as its own launch vehicle. What that means is that WinFS will not ship as a separate software component, but the technologies developed will be integrated into the next version of SQL Server and ADO. More information can be found on the WinFS Team Blog. I think is it a little sad that we won’t see WinFS shipped, but the vision of a richer storage in Windows is very much alive, as Quentin says.

As WinFS will not be shipped, I will be put on another team, but more on that later.

posted on Tuesday, 27 June 2006 06:57:08 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
 Friday, 26 May 2006

"Office 12" BETA2 was released for public download earlier this week. I installed it earlier today, and haven't had any problems with it. I have to say that the user interface looks smooth! I especially liked the "SmartArt"-feature which enables you to create good-looking illustrations quickly.

Download it here:

2007 Microsoft Office system preview site:

posted on Friday, 26 May 2006 02:15:45 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]