Oddities from the past

I had to debug some old VBA in a complex spreadsheet today and discovered the cause of the problem. The variable that held a key piece of data was declared like this:

Dim someValue as String * 3

Never having spent much time with VBA I had never come across this before, but it was easy to figure out what was going on. When the code was written that variable was never expected to be longer than three characters. So the string was restricted to 3 characters. Today, probably 15 years after it was first written, it needed to accept 4 characters for the first time. Oddly it doesn't throw an error it just takes the first three characters and ignores anything else.

Response.Redirect - The right way.

Because I, just like everyone else, have been doing this wrong since forever:

BAD:
Response.Redirect(url);

GOOD:
Response.Redirect(url, false);
Context.ApplicationInstance.CompleteRequest();

Subversion - can't connect to host

I recently moved our Subversion repository to a new machine and in doing so ran into a little snag.

Once I had installed my favourite Subversion binaries from Slik SVN, I manually configured the service and low and behold it didn't "just work". Despite the service definitely running and several svnadmin commands showing everything was OK with the repository itself it just wouldn't accept my connections. All I got was the error
Can't connect to host 'svn.example.com':
No connection could be made because the target machine actively refused it.
After much digging and a lot of trial and error I found adding
--listen-host 0.0.0.0
to the service executable line did the trick.

ASP.Net 4.0 Web Forms URL Routing Not Working With Period

I was struggling with this little gem for a while. I wanted to add URL Routing to an ASP.net 4.0 Website Project in Visual Studio 2010 but it just wasn't working. After tearing my hair out and wading through tons of posts about MVC URL Routing I eventually discovered that it just doesn't work if the File System based Website Project has a period in the name.

iTrip hack

About six months ago I bought an iTrip Auto from www.griffintechnology.com it's fine except for one thing, it doesn't work well here on the Costa Del Sol. It transmits a low power FM signal and requires a clear frequency to work, and it turns out there are so many radio stations around here that there aren't any.
I accidently discovered how to make it work well, some thieving scumbag stole the aerial from my car and would you believe it, my iTrip now works really well.

Where to put the accent in Spanish words

Strong Syllable (counting backwards) With accent
First i.e. Ca if ends in n, s or vowel
Second i.e. cil If doesn't end in n, s or vowel
Third i.e. plátano Always

How to delete a service

I have to delete a windows service every now and then and I can never remember how to do it so it is time to dump the knowledge here.

Using the command line type:

sc delete [service name here]

Don't know what the service name is? It's easy to find, run services.msc and look at the service you want to delete, the service name is the top most, it is not necessarily the same as the display name.

Tab completion, Windows 2000

I love the linux shell style tab completion which is also found in Windows XP and Server 2003 but annoyingly not in Windows 2000, well you can add it easily enough.
See
http://support.microsoft.com/default.aspx?scid=kb;en-us;244407

Or D.I.Y.

HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar

Set the value to 09 for tab

Performant

What does it mean? Is it real? I've noticed performant cropping up all over the place recently including during the Visual Studio 2005 install.

It's not in my dictionary, it's not in most of the online dictionaries but i did find this definition which seems to fit with my expectations of what it should mean.