27 Nov 2014

Did a long-put-off update on my Thinkpad with all its recommended Lenovo drivers from the ThinkVantage tool. All dandy, apart from the fingerprint reader stopped working. It used to have a little green light on to show it was ready, now it was off in sleep mode.

18 Nov 2014

Couldn't connect via RDC via an RD Gateway. Tried all sorts but in the end tried going into Device Manager, showing all hidden devices, and removed all the ISATAP virtual tunneling adapters that various Virtual Machines had added. It worked!

25 Aug 2014

I wanted a generic way to add a "clear filter" button to the text filter on all the DataTables on a site.

One way would be to change the input type of the filter to "search" - then HTML5 browsers will automatically show a clear widget. However, you'd have to press return after clicking it, so I wanted a one-click solution.

10 Feb 2014

Weird little problem just now - a classic ASP (vbscript) page used FPDF to generate PDF files. All working fine but weirdly, the script seemed to be generating TMP files in its directory - one for each PDF generated.

Took a while to figure out, but turned out that the IIS user account had WRITE permission on the folder but not MODIFY. Once MODIFY was added, the TMP file problem went away. Small victories...

6 Feb 2014

Okay, just finished watching this debacle and want to reel off some thoughts. Venty venty.

I guess it must be true for any skilled worker that when journalists cover your area of expertise, your hackles rise and you begin to wonder what basic stuff is being misunderstood and misrepresented by those journalists in all the other articles you've ever read on other subjects. Fair enough, journalists are generalists - they can't be expert in everything. However, the computer industry must be one of the last ones where a journalist can describe your passion and life's work as "baffling ... gobbledegook" and then dismiss it with a "it doesn't mean anything!". Both of those conclusions were drawn by Jeremy Paxman and Zoe Conway on Newsnight tonight regarding what they termed "code", as they were discussing the current "Year of Code" initiative. I'm surprised they can be so clueless and dismissive regarding computer code; would they take a cursory glance at the work of physicists, doctors and mathematicians and dismiss it simply because they don't understand it?

On the other hand, in many ways you'd be right to be dismissive regarding the basic premise being purported by Lottie Dexter, director of the Year of Code initiative. She did a very bad job of explaining either "code" or why and how it should be taught to young people. Most baffling of all is why she continued the lie that computer programming is something you can learn quickly ("in a day"!), while also admitting that she doesn't know how to program at all herself. Facepalm.

Regarding the "why teach code to 5 year olds" question, I'm not surprised that she had a hard time answering questions. My answer would be "don't". People who code tend to be natural problem solvers who enjoy working with abstract concepts (some people think strong mathematics ability is a requirement but that's not necessarily true). I'm of the opinion that *most* people don't fit that profile. But also, the article kept stressing that in the future we will all need to code to be useful in the knowledge economy. You could have made that point twenty years ago, but people today don't need to code on a daily basis. Hell, I wouldn't need to write software if it wasn't my actual job - why does everyone suddenly need to start writing javascript?

We don't teach Mandarin, Chemistry or A-level maths to five year olds because we realise that a) they're hard subjects, and b) not everyone will need those skills. Computer programming is in the same league. We save these skills to be taught later when people start to become aware of their strengths and interests. So I'm all in favour of teaching good coding skills in schools, but only to the students that want to learn. Teaching coding across the board just seems bizarre.

Watching the segment again on iPlayer (link - starts at 17:50), the implications of this "coding" requirement entering the curriculum in primary schools from Sept 2014 began to sink in. Teachers will surely need a lot of support in getting up to speed with this, and kids aren't going to be able to learn "code" without using a computer directly - most primary schools I know only have one computer per class. I agree with Clive in the comments below that we could be teaching broad problem solving concepts without a computer. However this initiative whiffs of sophistry and lip service from the government. I sincerely hope these lessons won't be rote "copy out the code block into the box and press RUN" exercises, but I expect to be disappointed...

27 Jan 2014

First off, let me say that I like Postcode Anywhere (PCA), they're a great service.

Today I had to fix a bug with a site using PCA's Bank Account Validation. It was working great generally, but failing for IE7.

IE7! The bane of my life! It doesn't use CORS, doesn't even use IE8's crappy XDomainRequest object. It just plain can't make an AJAX call to an endpoint on a different domain.

This was why the PCA ajax call was failing. I figured the only solution was to use JSONP. However the PCA JSONP docs seemed scant. I couldn't get a JSONP call to work until I got DevTools out and looked at what was being returned from PCA on the JSONP call - it was returning a nice javascript array OK but not wrapping it in a call to a callback function!

OK, here's the meat. To make a JSONP call on PCA, you need to provide an extra parameter to the call. I found this mentioned randomly on this page of the PCA site.

You can either supply CallBackVariable or CallBackFunction in the call querystring, and bob's yer uncle.

Venting! jQuery Validation is a great plugin but its documentation is crap! So much cool stuff is hidden away for want of decent docs. If enough of you agree with me, I might have to write some! Watch this space.