Sunday, 26 August 2012

Why Windows 8 won't be a success...

I wanted to post about this for a few days now, but never found the time.

All the hype these days is about the Windows 8 release... lots of lengthy posts all over the internet, and endless debates. My simple and humble opinion is that this new OS by Microsoft will not be well received, for the following reasons:

1. It tries to cater for the needs of the desktop and the tablet users at the same time. This is not possible with a single user interface, simply because the dimensions of the screen are different, so the use patterns are different. This is the single one and main reason why not only Microsoft, but anyone cannot design one single OS that will be efficient both for tablets and PCs.

2. The tiled interface is not very efficient for office use, has too high learning curve, so businesses won't be adopters, there goes a huge part of the revenues.

3. The power users won't be thrilled as a lot of screen space is wasted, so that's another part of the market that won't buy.

4. Finger interface makes no sense in managing a server remotely.

5. The screen will get very dirty if you try using it with fingers... I know this reason sounds silly, but doesn't help.

Under different circumstances, I would say the new OS will be a flop, but given the mighty Microsoft advertising machine which is already at work, I will say that they will manage to convince a few people to buy, and it won't be a total disaster. It might make a few sales in the tablet market, which is clearly its target market, although even there, it has a hurdle to overcome: it is not free (compare this to Android). In any case, I think Windows 8 will go down worse that Vista did.

On a relevant and a bit more philosophical note, I dare say that the only reason Microsoft is creating this OS is  to compete in the tablets market, I mean it is obvious by the UI design that this OS will offer better usability to the tablet users. And at the same time, they try to have the benefit of having to maintain one OS only, for both desktop and tablet users, and the need for applications to be developed for one OS only, this is why they are selling the same OS to desktop/laptop users.

I believe it would have been better if they made 2 partially different OSes for these 2 different markets, perhaps with the same underlying (i.e. non UI part) core, and then offer 2 different SDKs or UI platforms or whatever, for developing the UI parts of the applications. I think they will realise this and Windows 9 will be based on this model, and it won't be long before it arrives. They just need to see the low sales numbers to be convinced, just as it happened with Vista.

Personally, I'll skip Windows 8, just as I did with Vista, and I never regretted it. However, everybody has a different taste and I am sure some people will like the new OS, which is perfectly fine. Diversity is always good!

Friday, 24 August 2012

Cassini ultidev web server SLL failed to register website1 because System.ComponentModel.Win32Exception the operation completed successfully

So today I was setting up the latest Cassini UltiDev web server, version The guys did a good job, the server is easy to use and functional. I used the default website of Microsoft WebMatrix and seemed fine. However, I run into a weird exception, the moment I tried to add an SSL certificate:

Failed to register Website1 because  System.ComponentModel.Win32Exception the operation completed successfully

Well, this doesn't make much sense... how can it fail and succeed at the same time? In any case, the https part of the site was not working. After a bit of digging around, I discovered that it was not registering the certificate with the port. The work around (windows server 2003) was to register this manually, with the command:


After that everything was fine. I hope this saves someone some time...

Saturday, 18 August 2012

A very well written summary on Scrum

This is a very clear overview on scrum, by a very knowledgeable author.

I must note that the book he recommends is a bit old, there are newer ones in the marketplace which could offer more up to date information. I very much like Pro Agile .NET Development with SCRUM (also amazon link) because it offers recent (2011) and a hands on real life scenario to the methodology of scrum, TDD, BDD, with the tools developers use in every day work (it is geared towards ASP.NET though, if you use another environment you might not like this part...).

how to repair a corrupted .net framework 1.1 installation on a microsoft windows server 2003

OK so recently a friend of mine administering a windows server 2003 managed to corrupt his .NET framework installation. I decided to lend him a hand, and after a lot of searching this is what I found out:

The situation:

He tried to remove all .NET framework versions in order to install version 4.0. As it turns out, version 1.1 is part of the actual OS, and when he removed it, he didn't remove it completely, some registry key remained there, and the OS was thinking it had a fully working 1.1 version installed. As a result, when trying to reinstall the version 1.1 he was getting a message like "the product you are trying to install has already been installed as part of the OS" or something similar, because windows thought the framework is already installed. Also, any attempt to install any of the later versions of .NET framework were failing, the same when trying windows updates.

The solution:

It is outlined very clearly in this microsoft support page, and it did work. Took me some time to find it, hopefully this post will help someone else find it faster.

And because microsoft links have a tendency to disappear from time to time, here is the process in summary:

1. Delete netfx found in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\OC Manager\Subcomponents

2. in C:\Windows\inf make a file, call it sysnew.inf, with contents:

Signature = "$Windows NT$"


3. run this command:

sysocmgr /i:C:\windows\inf\sysnew.inf

4. Click next, if it asks for the files, download the SP2 for windows server 2003 (about 380 MB), extract it with 7zip and click browse to the folder i386 you just extracted.

5. Install assemblies in the global assembly cache (replace xxxx with correct version, in our case was 4322):

"C:\windows\Microsoft.NET\Framework\v1.1.xxxx\gacutil.exe" /f /il C:\windows\Microsoft.NET\Framework\v1.1.xxxx\assemblylist.txt

6. Run windows update to get any patches you need, and you should be all set.

I hope this post saves someone some time...

Tuesday, 7 August 2012

Firefox Memory Manager

OK, for a long time I was not happy with the huge amount of memory used by Firefox. Recently I came across a nice little application, firemin, that can be found here:

It is quite nice, I tried it for a couple of days. However, I was quite surprised by the huge amount of memory reduction (down to about 1 MB from 300-400 MB or more), and I thought that this does not seem normal, something else must be sacrificed. The point is, the more we reduce the memory used by firefox, the more page faults we will have.

So I wrote a small C# application to verify this and to check how many page faults I have and how much memory is used by firefox. Then I added a little bit of code to perform a "memory collection" using the EmptyWorkingSet unmanaged function (same as firemin uses), whenever the memory used by firefox reaches a certain limit which we can set. This way we can set the limit to as high as we like (for example 200 MB), depending on the available physical memory in our computer, and avoid the huge amount of page faults we get when firefox memory drops to something like 1 MB... In fact, we could just as easily let the OS handle the whole thing...

The application works on my system (windows 7) without problems (requires .NET 4.0 client profile). It is nothing extraordinary, and there are tons of things that could be improved on it, from a coding point of view. It is rather a quick hack and a proof of concept than a proper application.

Still I decided to share it here, so perhaps other people will find it useful, or decide to take the code and improve on it. One thing I was going to add if I had more time would be some real time zedgraph plot of the memory and page faults, I think that would be cool. Currently, the results can be visualised if logging is enabled and then copy/paste the resuts in excel and plot as a 2D graph. Takes a few seconds to do, and looks like this:

Please note, I have not tested it extensively and I cannot be responsible for anything that might go wrong, however, I doubt anything will, in the worst case it will probably just crash itself, as it doesn't try to do anything else other than release the memory... now if you start doing funny things like setting negative memory target and so on... you are on your own :)

In the application I used coding ideas regarding retrieving process information from a site that I can't remember now (sorry), about EmptyWorkingSet from

and about a task running in the tray from

(there is a more advanced tutorial on tray applications here but for the purposes of this application the first article on codeproject is just fine)

The application runs by default in the system tray, so you won't see anything the first time you run it. By default, it will monitor memory usage once per second. The default setting is 200 MB to perform a memory collection, and I found that it gets hit quite often with around 20 tabs open... you might want to play around. If you open the application window, you will see something like this:

The left side contains the process name (firefox.exe), process ID, number of page faults (total), working set size in bytes, average page faults in 1 sec interval over the last 60 seconds, and number of page faults in the last 1 second.

In the middle we see a log (1 line per second) of the working set size in bytes, the page faults for each second interval and the total process page faults.

On the right we see one line each time a memory collection occurs, and what was the working set size the moment the collection was triggered.

At the top right we can set the desired limit (in Mega Bytes), at the bottom left we can stop the process monitoring, and finally the Hide Window button will send the application to the tray. If you want to exit the application completely, you need to right click at the system tray icon and select "Exit".

I hope this covers the basics....

There is no license for the application, you can take it and use it for free in any way you like. If you create
some improved version, I would appreciate a post here, so that people can then know where it came from and where to get the improved version.

Here is the link to the application

and here is the link to the source code

Any comments are welcome, I hope this post helps someone in any way.