AJAX and IFrames

Having had a quick look at AJAX it looks strangly familiar.
It looks like I reinvented the wheel, and mine only fitted on Fords.

Last year I implemented something very similar (although IE only).
I had some status information that I needed to keep upto date on a web page but did not want the flicker associated with a refesh. So I added a 1 pixel IFrame with its own refresh interval. It used javascript and DHTML to update it’s parent frame with the new content. This looks exactly how AJAX works only it uses a http method to call and obtain an xml document.
It is amazing how things come around.

SQL Server Index Tuning : Experimental Black Art

The SQL Server Index Tuning Wizard is an incredibly powerful tool that can find amazing performance increases. There are some times when it can be a pain to get to work.

It is great when you want to use it on a given query. It makes great suggestions very quikly.

It is slightly painful when you want to tune a stored procedure as a whole. Especially when it is large and can take several hours to run. I am trying to find what you actually need to put into a trace so that the index tuning wizard will accept it as a workfile. The documentation is useful as ever – it will only tell you what you need to know if you ask exactly the right question. Anything else will drown you in useless details of other features.

Useing web service without a web reference

This article covers how to use a web service without a web reference.

The only thing that it fails to do is to recommend the creation of a descendant class to set the url.
This should be standard behaviour when dealing with autogenerated code – don’t touch it.

This allows the creation of a proxy that can have the url specified at run time.
This provides far better decoupling of the web service and gives the client the possiblility of choosing from a number of web service implementations.


I will start this with a quote:

“Microsoft do not dislike open source, they merely dislike the GPL”

There is some general misunderstanding about the GPL.
The general idea is that when you give or sell someone a GPL program then they should have the same rights as you do regarding the code. This would prevent vendor lockin. If you don’t like how a program works either you can change the program or pay someone to change it for you. The licence gives details on exactly what you must do.

Commercial licences come with conditions. Pay us and you can distribute exe’s built with this libarary  or Pay  us  now and once for each installation. The GPL instaid has a pay-it-forward approach.

If you build a program for youself or your company and it include GPL code you do not have to give anyone the source unless you distribute the program outside of your organisation. This is a key step in understanding how most programmers could freely use GPL code.

The vast majority of programmers write code solely for the organisation that they work for.
Hobbyist programmers oftern write utilities for their own use. This means that they could freely use GPL code without ever breaking the licence or having to publish their code. They could freely choose to offer changes back to the project – which prevents them from having to reintegrate the change when the product is upgraded.

I am in the rarer set of programmers those whose programs go outside the organisation. We prefer to use MPL which only requires that changes to the MPL code be offered back to the project.

knoppix saves the day

Knoppix has saved my machine again. I have suffered a minor hard drive failure, which left windows unable to boot. Given that I am unwilling to reformat my C: drive given that knoppix can read it, I have had a very slow windows 2000 reinstall – it insists on checking bad drives at reboot. Windows 2000 does so love it’s reboots. Knoppix on the other hand reboots in a min or less and can read all of the data drives. I was impressed that it had sound support from startup and was quite haapy about me plugging in USB devices. I am just finishing the restore of my emails from a drive windows describes as corrupt.

Thoughts on Programming Tools for Non-Programmers

There has been a trend in recent years to reduce the complexity of software development so that non-programmers can acheive useful results. However by the time the non-programmer has completed a non-trivial project they are oftern well on their way towards becoming a programmer. The drawback is that they oftern fail to learn useful lessons and skills (version control, error handling, the once-and-once-only rule). In my experience this is highly prevalent in the VB world. A end-user that knows some VBA puts together a VB.NET application, this grows to be a critical application…


Here is a link to an article on AJAX and PHP.
This is intended to make websites far more dynamic.

In case anyone is wondering why I am using PHP it is because I bought a domain and hosting for £30 for two years. The site advertised Pythin support that I only found out was disabled after I had the domain. The remaining options were Perl or PHP. I found the PHP to not be too painful to use. The site is strictly of local area interest so does not get quite the load that would cause trouble.

What a Web Service contract requires

A comment on one of my earlier posts lead me to think of a feature that is missing from web services. The whole point of using web services is to decouple links between products so that it comes down to a service agreement. I think that these agreements should have a defind duration. This should be of the form “I promise to keep this service available for 3 years and I will update my future intentions after 2 years”. This could permit a web service to evolve over time without breaking the contract.

COM used to have immutable contracts – although these were occasionly broken ( OLE-DB has a great feature that breaks the IUnknown contract – the behaviour of IUnknown on a provider varies depending upon whether the connection is connected).

This would require some extensions to the basic infrastructure but would save a lot of trouble in the future. This would prevent a system being built with a dependance upon somrthing that is just due to expire.

Cognotive Distance

A discussion in this dot net rocks show explained why an experienced C++ devloper would chose to use VB.NET over C#. The two languages are of equivalent expressiveness but have slightly different biases. VB.NET is better for dealing with variants and default parameters while C# has unmanaged code support.

Kate’s argument was that C# was too close to C++ to make freely jumping between them difficult and error prone this made VB.NET a more natural choice. I have had similar experiences. Currently I am working in Delphi, SQL and C#.

I find that keeping the SQL in strict upper case allows me the seperation so that I don’t find myself adding “then” to the end of my if statements. This allows me to keep a Cognative Distance between the two languages. Since Delphi and C# have a suitable distance between them (begin end vs {} ) I generally don’t have a problem switching..

The major gotcha that I have between Delphi and C# is the calling of a method with an empty parameter list. In Delphi you can call foo; where C# requires foo();

C# reserves foo for referencing the method itself.

The other niggle that I have with C# is the casting syntax.

In Delphi if I wanted to cast a class to a specific descendant and then use a method exclusive to that type I would use:


C# would require:


which has slighly too many brackets for my taste.
I know this was implemented for the C and Java developers but since one of the aims of C# was to correct the mistakes of the C and C++ world this could have been improved.