Wednesday, 30 January 2008

Do brains wear out from over-use?

I've noticed recently that I'm always thinking about something. Is this just me? Do other people ever find themselves "just going blank"?

This lead me on to wondering about my brain wearing out. My father suffered from Alzheimers and I wonder if he used to be like me, never seeming to switch off, and his brain wore out.

Something to look forward to anyway, NOT.

Friday, 11 January 2008

Browser caching hell

Started to look at Freeswitch which I may be using over the next few months.

Initially decided to try and build it using cygwin (nasty habit that I must get rid off!), but after installing various packages, gave up after some wierd error about 64 bit integers.

So, switched to Visual Studio to build, which I thought would be dead easy. In a way, it was, once I learned a few very basic things about VS, like looking in the 'output' window to see the build progress, then I hit a problem......

Part of the build uses a vbs script to download and uncompress some dependent packages. I have stripped out the relevant code here, which is sort of interesting in itself, as I think it's really meant as an Ajaxy sort of tool:
Set xml = CreateObject("Microsoft.XMLHTTP")
Set oStream = CreateObject("Adodb.Stream")

xml.Open "GET",

Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2
Const adSaveCreateNotExist = 1

oStream.type = adTypeBinary
oStream.write xml.responseBody
oStream.savetofile "pthreads-w32-2-7-0-release.tar.gz", adSaveCreateOverWrite

The code then used 7za.exe to unpack the gz and then unpack the tar file. This seemed to be where the problem started, as the .gz file seemed to be corrupt and I ended up with a file called [Content], instead of a directory structure.

I must have spent about a whole day investigating this. It was all the more strange because it seemed to work OK on my 'personal' laptop. As I seem to be rambling on, to cut a long story a bit shorter, it turned out to be a caching problem. IE had somehow created a corrupted cached version of the downloaded file and I was always getting the cached copy, instead of a fresh download.

Anyway, luckily it was in a 'downtime' period at work, so no harm done. Back to real work next week.

Ruby on Rails completed

As a follow up to my last post, I finished my experiments with Ruby on Rails. Simple stuff really, a couple of very simple tables with a many-to-many relationship managed using some nifty Ajax drag'n'drop.

Most of the time was spent fathoming out the Ajax stuff to get it to do exactly what I wanted. I had a sort of 'light on' moment when I realised that changing objects around in my [session] could directly update the DB, without doing an explicit 'save'. Pretty cool all round.

Webby stuff still doesn't 'fry my ham', to use a Downeyism and of course I had absolutely no style but that's what all those web designers are for right?