A site devoted to discussing techniques that promote quality and ethical practices in software development.

Wednesday, May 9, 2007

IE7 Uptake stagnant - that's obvious.

Recently PC World reports that the uptake of IE7 has stagnant even with the release of Vista.

It does not really need much to work out exactly why. If MS wants everyone to move over to IE7, all it has to do is to remove the WGA check on installation. The slimy thing is that its Windows update downloads IE7 first before asserting if the Windows is WGA compliant.

To me it seems like a deliberate act of wasting people's Internet bandwidth.

Removing that check may restore some fondness to upgrade to IE7. Besides who needs IE7, those failing WGA check are mightily happy with Firefox and I am sure that they are promoting Firefox willingly rather than IE7.

Even on my WGA compliant machine, I do not install IE7 for good reason.

Friday, May 4, 2007

Full mark for thinking outside the box (or rather inside?)

In the cat-and-mouse game of defeating the HD DVD protection reminiscence of the cold war, nice to see some application of thinking outside the square approach:
The latest attack vector bypasses the encryption performed by the Device Keys—the same keys that were revoked by the WinDVD update—and the so-called "Host Private Key," which as yet has not been found. This was accomplished by de-soldering the HD DVD drive's firmware chip, reading its contents, and then patching it. Once that was done, the firmware was soldered back onto the drive.
[...]
"They cannot revoke this hack," said forum member arnezami, who has been at the center of much of the AACS cracking recently. "No matter how many Private Host Keys they revoke we will still be able to get Volume IDs using patched xbox 360 HD DVD drives."
Well done!

Microsoft's UAC & Sudo

Mackenzie recently blogged about the history of Sudo and the similarity to Vista's UAC
What makes this whole thing funny, though, is something I saw a couple days ago. Head over to Builder-AU and listen to Peter Watson from Microsoft. He says, User Account Control is a great idea and strategically a direction that sort of all operating systems and all technology should be heading down Excuse me
My brief encounter with Ubuntu and the chanced encounter of the dialog box seeking my root password stunned me of the close resemblance to ME II's UAC.

All about a GUID

What's such a big deal for a GUID that every COM programmer is so used to?

What's such a big deal with this particular GUID:
09f91102-9d74-e35b-d841-56c5635688c0

Apparently someone, very touchy organisation like AACS LA causes a storm in Digg when someone rewrote the GUID by removing the separators and posted it on the Internet.

If someone like say AACS LA finds publication of a GUlD offensive, every com programmer should better check their GUID with AACS LA before they publish it in the type library or IDL. I suggest every com programmer just sends e-mail to AACS LM requesting permission to publish the GUID in the IDL.

This is stupid. As Ed Fulton rightly says, no one should be allowed to own an integer - a GUID is just a 128 bit integer!

Would they get upset if these special "AACS offensive" numbers were published in the form of a COM type library?

As Bruce Schneier once said in relation to using DRM to protect digital materials: it is like "making water not wet"

Some one is touchy! If they try to take down this kind of stuff, smart people can write materials carrying double, triple or n-possible meaning to conceal the true meaning or intend. How can anyone police that? The Chinese were doing this centuries ago before computer were even in the vocabulary.

Wednesday, May 2, 2007

"Why Software sucks... and what you can do about it"

This happens to be the title of the book by David S. Platt that I have just finished reading. The book's web site is here.

David is an accomplished software developer and authors of many books. He has even been designated by Microsoft a Software Legend in 2002.

The book is written in a light-hearted manner with David wearing the hat of a user of software, who has no a care of the inner working of the software he is interacting with. He has provided several commonly used commercial software packages, including web applications, to illustrate his point that "you're being forced to think like a programmer, even though you're not one and you don't want to be one".

The first chapter sets out the many reasons why user interfaces are so bad and so many software are so hard to use. "Instead of the programmer adjusting her user interface to the user's thought process she forces the user to adjust to hers". He considers this lazy programming. He uses the too-frequently used confirmation dialog box to illustrate the point.

I fully agree with his assessment of the landscape. This sentence at the conclusion of chapter 1 pretty much sums up why:
They suck because they're designed by programmers, who don't realize that their users aren't like themselves.
On his attempt to explain why developer do not use tools/technique to address this problem, David has this to offer:
Unfortunately, usability testing often gets left until late in the development process, just before the product ships.... Usability testing needs to be done early, ideally before any programming takes place.
[...]
... Eating your own dog food before releasing it to users helps your dog food taste slightly better than it otherwise would. But it won't change it into cat food.
For those that scan this book rather than reading it, do not write to David to correct his spelling of Idoit. He has not made any spelling mistake throughout his book. The definition of Idoit is given on page 14 as
...idoit, pronounced ID-oyt (or eed-WAH if you're French), to designate someone so clueless that he doesn't even know how to spell idiot.
So now I have learned one new word!

He called this frequent usage of confirmation dialog box "crying wolf" and I tend to agree with him. It is a pity that he does not cite examples using firewall programs that frequently pop up this dialog box seeking users permission or denial of a transmission. I use the Comodo Firewall and it has this dialog box that pops up so frequently despise my instruction that certain software package is considered safe and trusted.

Just because a user clicks on the "allow" button does it ever make the action any safer or that the firewall is doing the job? If the user does not possess the necessary skill to work through all the highly technical information in the dialog, his action, whether allow or disallow is suspect. Even I have trouble understand the materials.

It is the duty of the program to work that out and advise! That would be a much better example of "Crying Wolf". What happen is that the user becoming so used to clicking the "allow" button just to get work done yet without much harm that he/she would do the same in the presence of a real harmful attack.

He also uses the Web to illustrate that "the web designers don't know their users, and thus they think that by extension, they must be like themselves". David throughout this book constantly reminds the developer that "Your User Is Not You". Another similar saying that I have come across is that "there are more users than developers".

On the web, he points out two very important points that are not in the desktop software packages:
"...viewing a Web site is a very casual interaction.... home page needs to visually explain this in the first two or three seconds they'll spend there before ... go to the next link in the search engine list.
[...]
... The site's navigation structure .... needs to be obvious to the user within a two- or three-second glance, and too few of them are"
I also share his objection to those distracting dancing advertisement or time wastage splash screen. Far too many web designers have been lost their way distracted by the colour & graphics!

The book also touches on issues that are not interacting with user directly but still required to serve a purpose. He examines the issue of developing secure software requiring highly specialised skill by people ill-trained for the job.

I initially thought giving a full chapter devoted to describing the Geek's habitats - the conference and in particular Tech Ed is a bit of a waste of space. I am wondering how that compares with PDC (Profession Developers' Conference). But later on I realise that he is contrasting the behaviour of Geek in groups (in conferences) with Geek as individual.

All in all, this is a very entertaining book from someone that has experiences on both side of the camp and David's knowledge as a developer is found in a number of example in offering counter-arguments that frequently are used to brush off user's complains.

I have also learned one thing unrelated to user interface design or why software sucks and that is that the backdoor to warn user of the presence of a mine in Mine Sweeper game is still alive and kicking.

If you are looking for a recipe on how to avoid making software sucks, you would be disappointed, not so much as the materials are not there but they are not organised in a recipe format!

Monday, April 30, 2007

Developing .Net Service Oriented Applications - Contract-First Approach

SO (Service Oriented) architecture, generally nowadays implies Web Service Service Oriented architecture, is in vogue and every vendor clamours to produce easy-to-use tools/IDE. But SO or Web Service is more than authoring some classes and spitting out the service. In my research, I come across the following highly recommended articles by Aaron Skonnard, slightly dated but every bit relevant today, containing extremely valuable lessons to designing SO/Web Services that are worth remembering.

In his first article of a series to introduce this concept of "Contract-First Approach", he introduce this by way of drawing parallelism with COM programming. "Contract-First approach" in that technology is by way of authoring the COM IDL. Contrasting this is an approach promoted by Visual Basic and he called this "Code-first approach" by encouraging developers to author classes which are then translated into COM type library.

He went on to cite the following disadvantages of code-first vs contract-first:
The code-first approach made it much easier for developers using Visual Basic to build COM applications, but it came with its own set of problems.

Although it increased productivity, this code-first approach complicated versioning.
[...]
The other problem with the Visual Basic code-first approach was that it hurt interoperability in mixed-language environments.
In contrast, for the contract-first approach, he cited that
...they were more aware of the issues given their focus on the contract. An important aspect to designing a shared contract is considering the needs of all possible implementation environments before writing code.

Many developers didn't realize that they too could enjoy the benefits of contract-first development by authoring the IDL first, compiling the IDL into a type library, and then referencing the type library to bring the interface definition into the project.
He concluded his introduction with the following warning that everyone serious about developing SO should heed:
Now, not all organizations using COM were concerned with mixed-language support or long-term versioning and were more interested in improving short-term development productivity. Such organizations were perfectly content, and even successful, taking the Visual Basic code-first route despite some of the issues I've outlined. Ironically, the new world of SO is heading down the same path, dealing with a very similar set of issues.
I was drummed in, in my early days of COM programming, that the proper way to develop COM (and to the same extend CORBA) was to author IDL first and I've never forget this valuable advice. Unfortunately, I have lost the reference to this article.

In dealing with Web Service,
most of today's Web services frameworks make it possible to design services using either code-first or contract-first techniques; however, most Web service development frameworks push developers towards the former. Frameworks that provide a code-first approach provide a translation layer to map between the native programming language and XSD and WSDL.
While code-first ASMX programming technique improves productivity and reduce the learning curve, his warning should be heeded:
Experience has shown that services implemented using code-first techniques, like the default ASMX model, are less likely to interoperate cleanly in mixed-language environments. However, the difference with SO is that mixed environments are much more common—practically the norm—making interoperability a much greater design concern. The problem is compounded by the fact there are more programming languages and type systems involved in this new world than before in the component days. Now it's even more important to consider all possible implementation environments during the contract design stage.

Code-first can also complicate versioning because the developer isn't in direct control of the contract, but must rely on the translation layer throughout development. However, unlike Visual Basic 6.0, ASMX doesn't provide any fancy compatibility modes to help the developer know when making changes to the ASMX class may break contract compatibility with existing clients, which makes the situation even worse.

This is how to do the contract-first approach:
To use a contract-first approach, you start by authoring the XSD definitions to model the messages used by the service. Next you author the WSDL to define the service operations, specifying which XSD messages are sent and received. There are a variety of applications you can use to author these documents, including Notepad. These first few steps are the hardest for most developers because they aren't familiar with XSD and WSDL and because there isn't a great deal of tool support.
So how do you choose when to use code-first or contract-first approach? Here are his guidelines:
The answer is any time there is a strong emphasis on the messages exchanged or you need to ensure conformance to an existing message format..... Contract-first is, without question, the most natural approach in a message-oriented world, such as that of BizTalk.

Contract-first is also especially important when you require conformance to a particular contract from third parties, or when you're collaborating with other groups to define a shared contract throughout an organization. Using contract-first here allows you to solidify the contract up front while numerous parties implement the contract in parallel. All of these situations are common in industry today.
[...]
So when you own the contract, it is common sense to strive to make the contract as easy as possible for your consumers to use, which also begs for a contract-first model.

The biggest obstacle to contract-first design today is the lack of tool support, which hurts productivity. When productivity is the overriding concern, code-first can be an acceptable approach, especially when you're not particularly concerned with mixed-environment interoperability.
In his second article of this series, he describes the techniques and toolsets to support this contract-first approach.

There are not too many tools that are integrated with VS2005 to produce the WSDL, which in his mind is the toughest of the steps - the first, constructing the XSD Schema representing the XML message can be accomplished with the XSD designer in Visual Studio.

The one that he find extremely useful and competent is by thinktecture and is called Web Service Contract First. It is a free tool for VS2003 and VS2005.

These two articles are a must read materials for anyone serious about developing SO or Web Services applications.

Sunday, April 29, 2007

A long journey to meet the Penguin

Since I have lost interested in Windows ME II, alias Vista, and totally disgusted with their activation scheme and DRM turning the OS literally into a Police outpost, I have decided to turn my attention to something differently. I have decided to re-acquaint with my long lost friend that I began my computing career in.

I have heard so much about Linux and how little resource it demands to run; it is free (that is what OS should be) and that it has a much stronger security system (a fact that has been questioned); Linux is a strong contender to ME II. So I have decided to check out UBuntu, a distribution or variant of Linux.

Below is my experience of meeting and installing UBuntu:

I happen to have an old discarded Laptop, a Toshiba Satellite 1800 Series with a Celeron 800 and 256M of RAM lying around with Windows XP Pro installed into it that I can use to check out Linux, since UBuntu supports multi-boot option.

Well, it is an old machine but I have been told that Linux does not require much to run. So it sounds like a perfect machine to test Ubuntu out. I am sure ME II will choke on this specification.

The first attempt used a downloaded CD image of the desktop version 7.04. I popped the CD into the machine on Wednesday evening and naively believing that I could use it to config an ADSL modem. How wrong was I.

The Ubuntu Live CD fired up reasonable quick, not without drama, allowing me to experiment with the OS. When it was booting up the graphical environment, an error message box popped up complaining GNOME Settings applet could not start, etc. All I could do was to close it. Some how it did not hold back the starting process.

It looks very nice and the graphical interface was definitely not in the Unix I cut my teeth in in learning C programming back in the '70. It's a nice addition.

Running totally from the CD was really painfully slow and you can hear the poor drive going crazy. So I decided to bite the bullet and to install this onto my hard drive, which still had 6-7G spare. This was the beginning of the fun bit revealing the not so polished side of Ubuntu.

I opened the Install applet on the desktop. For a period that felt like eternity and was indeed eternity in computer time, the CD Rom drive went berserk zipping back and forth lights blinking and all the screen was showing was a frame with the title "Install." After more than a hour or so, a list of locales beginning to appear in a combo box but more were to come.

Not knowing what lied ahead and I was not totally comfortable of risking the machine at that moment, I aborted the installation, an action I regretted. The installation process did not have any instruction on aborting it and shutting down. So I simply powered down the machine forcefully. For some reasons, I did not see the red button on the top right corner of the screen that was designed used to power down.

From that moment on, I could not recover that list of locales. It's strange that running the installation from a CD Rom should guarantee that no previous installation state was recorded but somehow, there were variations between each attempt, indicating something was recorded but in where? In some attempts, I left it ran for hours and all I saw was a frame with nothing in it. It's not a freeze by any definition because the CD was still being read on and off. One had to wonder what it was doing. Some progress message would be greatly appreciated. It couldn't be just reading that hundred or so locale names. Some attempts encountered error with the message complaining about failure to load the paned "OAFIID: GNome_MixedApplet".

After so many failed attempts, I suspected the image might be faulty or the machine could not tolerate version 7.04. So I tried the version 6.06 (alternate).

This ISO image produced even far worse outcomes. It froze my machine trying to populate the list of locales consistently. It might be doing some memory scanning or something but definitely no CD drive activities and no hard disk activity. I had even left it "ran" for hours just for curiosity.

After several attempts, I gave up on this and was even considering trying XUbuntu as it's for lower spec machines. Before doing that, I decided to give 7.04 one final attempt using the "alternate" ISO image. I had no idea what "alternate" meant and I also selected the download for machines with less than 256M, which sounded more suitable for my machine.

This ISO image differed from the other in that it did not start Live CD. It jumped straight into installation mode - in text mode. The best parts were that it was fast and informative comparing to the graphical installation.

I was a bit apprehensive when it guided me through in resizing the NTFS partition and in creating the new one. The on screen message was not clear enough. What the heck? It's a late Friday night and soon into Saturday. So I went ahead.

It finally completed the installation and after removing the CD from the drive, I pressed the button to reboot. Instead of coming up with the familiar graphical screen, after displaying some messages that quickly vanished, I was staring at the black screen with no disk activity and no progress message.

I thought that was frozen, so I forcefully shut it down. When it restarted, it went through some recovery process akin to NTFS' Chkdsk /F . When that was completed, the same black screen came back. Once again I powered it down. On the next reboot, I decided to play with it and ran the memtest. This went through some lengthy tests and after completed one full cycle, I decided to reboot.

Not knowing what would come next, I went to do something else. When I returned to the Toshiba, the Ubuntu log in screen awaited me. Finally success and the Penguin was there to welcome me!

One of my first missions was to check out the command prompt, being a keen command line practitioner, and it's now called the Terminal. The next was to determine what kind of privilege I was given. The installation screen should advise me that I have been give root access rights. I only discovered this on the Ubuntu web page.

While I was exploring this, I stumbled onto some panel that required elevated privilege and I was challenged. This is very similar to the ME II's UAC . The only difference was that I was required to supply the password in Ubuntu, even when I have root access rights but in UAC I would only be required to select the accept button on the consent box.

I began to feel confident and tried my luck in pinging the Internet. No such luck. It turned out that Ubuntu did not recognise my old PCMCIA network card, a Xircom RealPort2 card. So now, I have the most secured Ubuntu in the world and I was happy of progress so far.

Many of my failed attempts might be the result of lack of communication from the installer. Definitely the installation program was not as slick as that from Microsoft. There is room for improvement. But I can put up with that since it's free and it did not treat me as a thief by constantly asking effectively "prove to me that you bought it", the most offensive customer treatment that Microsoft has ever invented.

What I saw impresses me and it's now time to explore - a spirit I have lost, for the first time, on any Microsoft OS, particularly the ME II.

Blog Archive