Monday, 2 March 2009

Understanding ‘why’

Those of you with children will have experienced the ‘why’ stage of a child’s development.

What’s that?
A tree.

Why is one of the fundamental building blocks of learning that, as providers of solutions, we tend to overlook. Most of us have learned from experience that regardless which software development process we use that requirements are key. However, I am also sure that we have also been in a situation where we have been ‘fixing’ a problem for someone and halfway through being told why they wanted you to do it and realise that you have a better solution for them. It is a human trait to try and provide solutions to problems and often what people call a requirement is a result of a preformed solution. The real requirement is hidden in the ‘why’.

I always try to remember to ask why (although not in necessarily in a direct way) to understand the goal better. I can still remember times when I haven’t and have kicked myself for forgetting to ask.

User stories adopt the ‘why’ in the ‘so that’ part of the phrase. However, this post is more about remembering to ask why to ascertain the real user goal in all aspects of solution delivery. The goal (‘why’) often shows the true requirement that users are unintentionally hiding from you.

A case in point is SDLCs (Software/Solution Delivery Life Cycles). I have worked at a number of companies that have formal processes and procedures. These processes tend to be similar in having stages including requirements definition, functional specification, technical design and so on. However, people seem to assume that this means a heavily paper-based documentation approach. Unfortunately, most of the documentation I see does not achieve its goal and I also see a great deal of duplicated effort between the various stages.

From my experience a large proportion of people writing documents as part of an SDLC focus on the need for document X at this stage rather than the goals of the stage. Don’t obsess about the paperwork – concentrate on the goal – capturing requirements, and defining a solution that the user needs. Is writing a on hundred page design document delivering you any more than a prototype would?

The idea of design documents is to present a solution that can be reviewed for less than the costs of doing equivalent work. I have witnessed far too many cases where the design documents take longer than the development effort and, in many cases, as the authors are not domain experts provide a sub optimal solution anyway.

There are ways that we can follow an SDLC in a more agile way, removing unnecessary duplication, being more productive and fulfilling a user’s needs. To software traditionalists the mention of agile principles conveys an image of non-controlled development when the opposite is true.

That is why.

Tuesday, 20 January 2009

Windows Installer/.MSIs crashing on Windows 7

A couple of days ago all my installations started failing. As a good citizen I sent the details to Microsoft and have just received an automated response from their system.This is the text from the response below:

‘An issue with the Customer Experience Improvement Program (CEIP) client in Windows 7 beta is causing Explorer and some MSI-based installers to stop working properly.

To solve this problem, follow these steps:

  1. Click the Start button , click All Programs, and then click Accessories.

  2. Right-click Command Prompt, and then click Run as administrator. In the User Account Control window, verify that Program name is Windows Command Processor, and then click Yes.

  3. In the Administrator: Command Prompt window, type or paste the following text at the prompt:

    reg delete HKLM\SOFTWARE\Microsoft\SQMClient\Windows\DisabledSessions /va /f

  4. Press Enter to install the solution.

  5. If The operation completed successfully displays, close the Administrator: Command Prompt window to complete this procedure. If "ERROR: Access is denied" displays, repeat this procedure from the top, making sure you clicked Run as administrator in step two.’

I hope this helps.

Wednesday, 15 October 2008

The Chicken Run

When I first moved down to London from Wales I shared a house with three other people. I think it has given more anecdotes than any other period in my life. One such story is the time when one of the guys came back with a frozen chicken from the supermarket just around the corner. He then proceeded to switch on the chest freezer under the stairs and place this solitary chicken in it. When I protested about the cost his reply was “My mum says it more economical to keep things in the freezer”.

I attempted to have a conversation about the use of electricity versus just being able to nip around to the shop around the corner. I also mooted that it may have been more economical for his mother to store things in the freezer as she lived 20 miles away from the nearest supermarket. I also pointed out one fatal flaw in his plan for a roast chicken dinner – our oven did not work.

Finally, I gave in but had one last attempt at economy, suggesting that we packed the rest of the freezer with blankets to reduce the volume of air. His retort was “Don’t be stupid that will keep it warm!”. When he finally got around to eating it he attempted to crush it so that it would fit under the grill, couldn’t be bothered to wait longer than 10 minutes for something to cook.

I often see parallels with this story in technology. I have read statements such as ‘web services improve scalability and security’, ‘Ajax improves web site performance’ and ‘.NET removes the need to worry about resources’. I have seen examples, in all cases, where these statements have been proven to be untrue. These technologies are enablers – you still have to apply good practice and common sense when using them.

Web services and performance are a good parallel to the story above. In this case I am talking about web services used as a tier in an n-tier architecture. If the cost of the transport is higher than the cost of production there clearly is no performance benefit from the additional tier.

Getting back to my house-sharing stories, in January when the weather was really cold my house mate came in and said ‘”It must be really cold in the back room – that chicken’s grown a fur coat!”

You are (probably) not in the majority

As I am in the market for a new laptop I have been keenly awaiting the news of the new MacBooks and reading various forums. I have a couple of requirements and wants for a notebook. Ideally, I want a 15.4” Widescreen laptop with a 1680x1050 display. I would settle for a 17” machine with the same or a higher resolution. I also want a 7,200 RPM disk as I do a lot of file-based work (SQL Server, etc).

It is interesting to see how many people make comments on sites about how Apple are stupid not to support feature X, Y, or Z. As some contributors are on a forum will also agree with a viewpoint, people feel more and more justified that Apple have got it wrong. The fact is that Apple, as a company, are interested in their bottom line. The more automatable a process is and the fewer different parts to construct the better the returns. Apple will have the data available to them to help them make the decision on whether removing feature X and adding feature Y will increase the general appeal and, therefore, profits. You also have the option as a consumer not to buy a product if it is not what you want. Of course, vendors do not always get it right and that is reflected in sales, usually resulting with a product update to address the issue.

Another case that comes to mind is the Linux versus other platform debate. What the majority of exponents don’t get is that it is not ready for less tech-savvy users. Even if there is a family member or friend to assist somebody non-technical users generally dislike learning something new and different.

As an example, take a look at a few of the arguments we put for technology and ask yourself honestly if the majority of users are interested if:

  • It runs faster
  • It is more configurable
  • It is not Microsoft (!)

One of the great aspects of the web is that it has enabled us to share our views with others. However, we should not misinterpret a wider (but still relatively small) community view as global consensus.

Thursday, 9 October 2008

Vista UAC – is it really so bad?

Ben Fathi has just posted an article on the background behind Windows User Access Control (UAC). I was one of the few who held the faith and not turned UAC off. The statistics support my experience that UAC has become far less intrusive over the last few months.

Many people who criticise Vista say ‘why would I want to upgrade from XP just for a different look and feel and less performance?’ One of Vista’s biggest strengths is the work that has been done under the covers to make it more secure. Unfortunately, it is not visible, except perhaps in the case of UAC where it has been visible in a way that users feel is intrusive. In my opinion, it is a good compromise between compatibility, and usability without too much compromise on security. I do tend to click the UAC box without reading it – although it is usually as a result of my clicking an application I know I can trust.

I only have two issues with UAC from day to day. The first is not a UAC issue but an issue that Visual Studio 2008 still needs to be started under an Administrative account for certain scenarios. Hopefully, in the next release we will see UAC properly supported for those situations where it is absolutely necessary to elevate your privileges.

The second issue is the users tab of Task Manager. In order to click either of the buttons to disconnect or log off a user you have to switch to the processes tab, click the ‘Show Processes from all users’ to elevate your privileges and then switch back to the users tab. Hopefully, we will see a fix for that in a later service pack.

Wednesday, 8 October 2008

C# Console Service Project Template for VS2008

Often, when I develop services I want to run them interactively from the command line. For example, for testing running under different user accounts with different privileges and for debugging purposes. After having written a few of these services by hand in a variety of languages I have finally had time to create a Visual Studio template for a ‘Console Service Application’. It is basically a modified version of the existing service template (with the implementation in a single class) with console properties enabled. In addition, there are a few lines of plumbing code to fork to the appropriate mode.

Simply drop the file into <your documents directory>\Visual Studio 2008\Templates\ProjectTemplates\Visual C#.

Wednesday, 13 August 2008

Fingers Crossed for Microsoft's Oslo

As more details appear on Oslo I am hoping that Microsoft finally releases a true end to end SOA development platform that is productive and supports accepted best practice. Historically, Visual Studio tools, particularly on the web site, have been great for knocking up simple sites quickly but full short on the productivity front when building n-tier applications. Hopefully, the web service tier(s) it creates will be more than a simple re-presentation of the database. One thing that gives me hope is that both Don Box and Chris Sells are involved.