Saturday, April 28, 2012

Aaargh Ajax!!

First of all, I've got to say in my defence that I've mainly worked as a server-side programmer for the last twenty odd years, so JavaScript has never been my strong suit. Having said that I should have had enough knowledge by now to construct a simple Ajax cascading drop down on an ASP.NET application.

I won't share with you how much time I wasted debugging this thing in Visual Studio, rummaging through Firebug and inspecting requests in Fiddler.

Anyway the penny just dropped and I feel so SO dumb for not realising it sooner. Basically I had a sub on the server and a sub on the client in JavaScript that basically did the same thing so I had given them the same name. So while debugging I'd brainwashed myself into thinking the server script was firing when in fact it was the one on the client.

NOTE TO SELF. FROM NOW ON, BE SMART. USE A NAMING STRATEGY THAT CLEARLY SHOWS WHETHER A ROUTINE IS ON THE CLIENT OR THE SERVER.

Friday, April 27, 2012

Why Microsoft has made developers horrified about coding for Windows 8

Why Microsoft has made developers horrified about coding for Windows 8

This is a bit of a horror story for Windows platform coders. Nothing unusual really is you know the territory.

It reminds me a bit of MSN. Now today you probably think of MSN as a kind of magazine web portal with salacious stories about celebs. That is not how it started.

Back in the days before the WWW (shall we say www.bc?), Microsoft became very envious of Compuserve's dominant position as the world's leading bulletin board service. Bulletin boards for those of you too young to remember, were proprietary systems that you could dial up over the telephone with a thingy called a modem. Anyway, not to be left behind, Microsoft created it's own competing dial-up service, called it MSN and tried to flog it for a hefty monthly subscription.

It was actually quite an impressive system as most of it was done with vector animation in an early forerunner of Flash. However the timing couldn't have been worse. Microsoft were still hard selling it as long ago as 1997 when the charge to the web was well under way, but the original version didn't even include access to the web.

So what became of all the developers who built the original MSN with that nifty animation software  - presumably they retooled just as all the windows platform guys are going to have to do now.

Wednesday, April 11, 2012

Worpress Install Fail on Arvixe

Posting this as an aid memoire.

I've set up several blogs on my Arvixe hosting account without a problem, but today was different. I don't know whether it is something to do with the version of Wordpress or the Microsoft Web Gallery script (much more likely) but when I finished the install and view the blog, I was unable to view it due to a 403 error.

I tried the admin login and that worked OK so it was just the home page that was broken. I had a sniff at the file permissions but they were OK. Then a thought struck me. I tried the full address of the homepage in the address bar http://ubuntu.seonyx.com/index.php and sure enough that worked. Then the problem was clear. I opened up the web.config and found that no default document was specified. Infact it was pretty empty. I replaced it with the following and everything worked OK:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="true" />
<defaultDocument>
<files>
<clear />
<add value="index.php" />
</files>
</defaultDocument>
</system.webServer>
<system.web>
<compilation debug="true"/>
<customErrors mode="Off"/>
</system.web>
</configuration>