Archives / 2008 / September
  • Bad login pages

    Tags: Internet and the Web

    Lot of web sites uses a login page so you can identify yourself and so that the application can target information for you. I use a lot of different sites and does a lot of logins and I must say most of these login pages are not user friendly.

    Gmail loginA login page normally consists of two input fields, for username and password, and a button to make the actual login. In most cases there are a checkbox which you can check to make the application remember your login, by using a permanent cookie. The normal pattern, for us keyboard users are to write in username, hit tab, enter password, hit tab, use space button to check the Remember me checkbox, then enter or tab/space to do the login. This sequence is hardcoded into my brain and I really hate those sites that do not use this pattern.

    Take a look at the Gmail login page, to the right, which uses this pattern and works like a charm.

    But, here are some bad ones:

    Facebook uses almost the correct pattern, but you cant hit tab/space to login, since when you check the Remember me checkbox, another checkbox pops up. Works fine if you hit enter though.

    Facebook login

    Delicious also breaks the tab/space pattern with a number of links between the checkbox and the sign in button.

    Delicious login page

    These small things gets me really annoyed. There are certainly even more worse examples of bad login pages, but these are sites/services that get a lot of logins. I only highlighted the usability when using keyboard here and did not mention bad security implementations of these login pages, such as the Feedburner login page which tells you if it was the username or password that was invalid…

    Do you agree with me?

  • Tinker - the new Ultimate Extras game

    Tags: Windows Vista

    Once upon a time Microsoft decided to give the users of Windows Vista the opportunity to buy an extra expensive version – called Vista Ultimate. Buyers of this version would eventually get some nice and exclusive content and applications to their sweet new operating system. Microsoft did deliver some nice enhancements such as animated backgrounds and new sound schemes – certainly worth the extra cost.

    As time went on people waited for the real Ultimate Extra to be delivered…

    Let’s stop this nonsense and cut the the point...

    Yesterday Microsoft released a couple of new extras. Not the big deal yet, but for once something really funny – a new game called Microsoft Tinker. A sweet little game where you should move a robot around a course with as few moves as possible and as fast as possible. It’s pretty funny and amusing.

    Microsoft Tinker

    If you have Windows Vista Ultimate, head on over to Windows Update and get it.

    Two other Ultimate Extras was also available: a Tinker sound scheme and a new DreamScene Content Pack (#4).

    Technorati tags: , ,

  • A request to the SharePoint Development Team

    Tags: .NET, SharePoint

    Microsoft SharePoint is a great development platform but it have some major areas where it could be improved. As of today you can create mediocre applications using the current SDK (which is not so well documented), but to create great applications you really need to understand how the internals of Windows SharePoint Services really works!

    I would like to show you an example of how bad the documentation and implementation is with a pretty common scenario.

    The problem

    Assume that you need to get your hands on an SPList object using the name of the list. MSDN contains an article called Development Tools and Techniques for Working with Code in Windows SharePoint Services 3.0 which has an example which goes like this:

        // -- Check if list exists.
        SPList list = web.Lists["MSDN Tasks"];

    This is the way to do it, except that you should use some nicer exception handling and not catch a generic exception. So take a look at the MSDN documentation for this one, there is no work about the exception or anything, not even that it fires an exception when not found. Most examples I see catches the base Exception class to be safe (and most often around larger code blocks than this!):

        // -- Check if list exists.
        SPList list = web.Lists["MSDN Tasks"];
    catch (Exception ex)

    Any list or collection should throw an ArgumentOutOfrangeException or at least ArgumentException in these cases, nothing about that on MSDN. As I really like to have things in order, a quick check using Reflector on the methods shows that an ArgumentException is really thrown under these circumstances. So the correct way is to write:

        // -- Check if list exists.
        SPList list = web.Lists["MSDN Tasks"];
    catch (ArgumentException ex)

    This is not only the correct way (with or without documentation), it’s the only. Imagine that you have this piece of code in your application and you frequently makes this check – how about performance. We all know that exception handling is process-cycle consuming, so this can be a real performance bottle neck if you don’t watch out.

    While checking out the code using the Reflector I found out that the indexer on the SPListCollection uses internal methods to find out if a list exists or not which does not involve exception throwing. The exception is only thrown when we poor developers use the APIs. Inside the SPListCollection object is an internal method called GetListByName which works just like the indexer, but has a second boolean parameter which can be used to tell the method if we want an exception to be thrown when not found or just return null. If we were allowed to use this method, then our sample would look like this:

    // -- Check if list exists.
    SPList list = web.GetListByName("MSDN Tasks", false);
    if(list == null) 

    Wow, now we could make some real use of this in high performance required scenarios – no exception handling involved.

    The request…

    To get this to work, all the SharePoint Development Team has to do is to make this method public! Please! I think it would be a great idea to go through the API’s of SharePoint and check these kind of things out.

    This is by no means the only sample of code that easily can be made more efficient for us developers (outside of Redmond).

    Technorati tags: , ,

  • A solution to SharePoint SQL installation problems

    Tags: SharePoint, SQL Server

    I have a few times failed to install Windows SharePoint Services or Microsoft Search Server Express, when I have come to a location where the SQL Server 2005 is already in place with custom configuration. The failures have occurred during the phase when the WSS is trying to create and configure the SQL Server. First time I had some troubles working it out, since I’m not a DBA, so I would like to share my solution since nothing is found on Google on this matter.

    The installation fails during one of the first steps (don’t remember exactly but it’s second or third) and you get a link to the installation log file. In the log there are reported errors, such as this one:

    05/08/2008 10:38:44  8  ERR Task configdb has failed with an unknown exception 
    05/08/2008 10:38:44  8  ERR Exception: System.Data.SqlClient.SqlException: Ad hoc update to system catalogs is not supported. Configuration option 'show advanced options' changed from 0 to 1. Run the RECONFIGURE statement to install.

    An other scenario is that SharePoint is during the installation trying to modify some of the SQL Server 2005 configuration parameters, such as the Min server memory (MB) to 128 MB. The error message then states

    An exception of type System.Data.SqlClient.SqlException was thrown. Additional exception information: The affinity mask specified conflicts with the IO affinity mask specified. use the override option to force this configuration. 
    configuration option ‘min server memory (MB)’ changed from o to 128. Run the RECONFIGURE statement to install

    All you have to do to solve this is to execute the statements using SQL Management Studio and use the RECONFIGURE WITH OVERRIDE statement.

    For example:

    exec sp_configure 'allow updates', 1
    reconfigure with override

    allows updates to be done. To solve the second problem I have used

    exec sp_configure 'min server memory (MB)', 128
    reconfigure with override

    Hope this helps somebody out.

    Technorati tags: , , , , ,

  • How to reuse your list definition in a SharePoint feature

    Tags: SharePoint

    In my case I often create SharePoint sites and lists in a development environment or on a demo server, just to set up and verify the architecture and design. From that point I often have to sit down and start writing the actual feature, which involves some heavy Xml coding most of the times – now I have found a shortcut that will save me an awful amount of time.

    Let’s say that you have created a list in your demo environment, with columns, views and everything. This list is then the target of your feature you are about to develop. Creating the manifests, list templates and instances are pretty easy, but creating the schema can be troublesome and/or time consuming. Today I found a sweet little custom STSADM command called OCDExportList. This custom command exports the list schema from a list in a SharePoint site to an .xml file. Similar functionality can be found in other SharePoint solution generators, but I prefer using STSDEV and for this situation the custom command is great!

    To get the schema.xml and related .aspx files just write

    .\STSADM.EXE -o ocdexportlist -url http://server/site -name listname -dir c:\temp\

    Then all you have to do is reference the schema.xml file in your STSDEV solution.

    If you don’t want to use the exported .aspx files in your feature, add the SetupPath attribute to the Form and View elements in the schema.xml


    Form Type="DisplayForm" Url="DispForm.aspx" ...  SetupPath="pages\form.aspx"/>


    View DefaultView="TRUE" Url="AllItems.aspx" ... SetupPath="pages\viewpage.aspx">

    Technorati tags: , , , ,

  • My mobile phone over the years

    Tags: Personal, Windows Mobile

    I recently received my new HTC Touch Pro smartphone, which is by far the best phone I ever owned so far – it has all that I need to complete my daily tasks. Over the years I had a few phones, of course the latest one has nearly almost been the best for me at that time. I decided to take a look down the memory lane and see what phones I have owned and used for daily usage. There are some in between that I used for shorter periods, but these are the major milestones in my mobile-life.

    Wictors mobile phone timeline

    The first mobile phone that I owned was the Ericsson GH 688. This was during my time at the university, so since I had no job/income at the time my dad had to sign the subscription. I bought the phone after a summer at the Ericsson assembly line in Linköping – where I worked the five-shift during the summer assembling just the GH688. I have some nice memories of this – especially when another summer worker thought the oven, which soldered the parts on the circuit board, had to low temperature so he turned it up a few notches and burned a few hundred phones.

    The second phone, and my only Nokia phone was the Nokia 6110. Nokia has never been a favorite of mine, but this one had Snake. After starting iBizkit in 2000 I went back to the Ericsson phones and a Ericsson T28. This is still one of my favorites due to the small size and the incredible battery life. It had some flaws though and crashed (just like Ericsson phones use to).

    Then came the phones with color screens so I had the Ericsson T68 and then upgraded to the almost same phone which was the first Sony-Ericsson branded phone, Sony-Ericsson T68i. Now I could send MMS messages, but there was no camera yet. So I upgraded to yet another SE phone, Sony-Ericsson T610i. This was a really good phone and state of the art at that time.

    After parental leave, with Wilma, I returned to work and got me a brand new Sony-Ericsson P910i. Finally a phone that I could use to write and install my own programs to and that I could use to read and write documents with. I was really fast at typing at that small keyboard. I then decided not to go with the following P-series models, but instead choose the HTC TyTN; a better keyboard, Exchange integration and Windows Mobile. For some of you the Windows Mobile operating system is a minus, but not for me – I love it. It gives me opportunities to configure and extend using the same methods that I do every day at work.

    In the beginning of the summer the TyTN was worn out, and I used the old P910 (it still worked after a few years with my daughters playing with it) during the summer while waiting for my HTC Touch Pro to arrive. I now I have had it for a few weeks and I think there is currently no competition for this phone.

    I wonder what I will use next time?

About Wictor...

Wictor Wilén is the Nordic Digital Workplace Lead working at Avanade. Wictor has achieved the Microsoft Certified Architect (MCA) - SharePoint 2010, Microsoft Certified Solutions Master (MCSM) - SharePoint  and Microsoft Certified Master (MCM) - SharePoint 2010 certifications. He has also been awarded Microsoft Most Valuable Professional (MVP) for seven consecutive years.

And a word from our sponsors...