Thursday, November 30, 2006

In the name of science

What is the speed of meme?  People write in general (typically truimphant) terms about how swiftly a single voice can travel from one side of the internet to the other and back again, but how often does that actually happen?

If you have a blog, please read this and follow the instructions.  I'm supposed to beg you to do this, but the title of this post is "In the name of science" and not "In the name of science and commision" !


AJAX is great for reducing page flicker when posting back to the same page (for instance, updating a listbox or a textbox), but a lot of a web-site navigation involves clicking around to different pages.

DHTML behaviour has been around a good few years allowing page developers to have page transitions (such as wipe, chequerboard etc.) when the page loads and unloads. None of these transitions were that great and a certain amount of flicker was still present.

I’ve seen a few sites recently that have a nice fade transition that is much smoother than DHTML behaviours. I’ve just discovered from this blog, how it’s done.

Tuesday, November 21, 2006

I Hate ClearCase Part II - When a text file isn't a text file!

Here's a question:  If you have a text file that contains a very long line of text (>8000 characters), is it still a text file?

I'd say Yes. But ComputerClearCase says No. Or at least hinted it meant No via several obscure error messages.

The file in question is a whole bunch of JavaScript code (part of the Microsoft AJAX release) that is not intended to be read by anyone viewing a web page, and hence is sensibly put on one line (albeit 69168 bytes in length). 

Firstly, I was getting a strange error when adding them to ClearCase.  Apparently, despite of the error, they were being added – I found them in a checked-out state.  Upon trying to check them in, I got:

Error checking in '...MicrosoftAjax.js'.  Type manager "text_file_delta" failed create_version operation.
Unable to check in '...MicrosoftAjax.js'

...followed by OK and Cancel buttons (quite how one can Cancel an operation that can't be done anyway is beyond me!)

I then thought I’d take a look at the file and did a ‘diff’ with the previous version.  I got this:

Error encountered doing compare operation.
"c:\temp\ccdm02327" is not a 'text file':  it contains a line exceeding 8000 bytes.
Use a different type manager (such as a compressed file).

So, according to ClearCase, a text file is not a text file if it has lines of over 8000 characters!

Anyway, the solution was to use the cleartool command line tool to add the file using a different 'type' - a compressed text file type.  Note that this doesn't actually change the contents of the file, nor the way it's handled (thankfully!).  Of course, once the solution was presented to me...

C:\folder\ScriptLibrary\Release>cleartool mkelem -nc -eltype compressed_text_file MicrosoftAjax.js

...everything became perfectly clear!