Duncan's blog

October 29, 2016

Crossword solver

Filed under: Javascript,jQuery,Web — duncan @ 4:12 pm

Here’s a little something I built for myself, with the intention of helping to complete crosswords. It’s quite annoying when you’ve got 80 – 90% through one and with only a few obscure words left to complete.

This lets you:

  • create a blank crossword
  • fill out any letters in it you’ve already got
  • look up words for any you’ve only got some of the letters for

It doesn’t as yet let you save them and re-load.

The front end uses jQuery; server-side it’s using ColdFusion, with a dictionary of 90,000+ words.

Anyway, here it is; let me know any feedback:


June 10, 2013

Scotch on the Rocks

Filed under: Coldfusion,Javascript,Web — duncan @ 5:49 pm
Tags: , , , , ,

I’m just back from this year’s Scotch On The Rocks in Edinburgh. This used to be a ColdFusion-specific conference but now positions itself more for general web-development (although I’d guess easily 80-90% of attendees were CF-developers).

My colleague and ColdFusion über-blogger Adam Cameron wrote up a much better-written post about the whole event. I simply wanted to jot down a bunch of things I’d taken note of during the talks, probably more for my own benefit for future reference than anything else. These are going to seem really disjointed, apologies for that, but I’ll try and annotate them with lots of useful links. I’m also writing all this up several days after it all wrapped, so I might mis-remember some of the details; let me know anything incorrect.

Day One

1. HTML5 Mobile App Development with PhoneGap

Mark Lassoff from LearnToProgram.tv

A quick example (and fun presentation) using HTML5 and PhoneGap to develop a working app for multiple mobile devices. Useful for me, because at this stage I’m not doing any real mobile development, but I expect that to change.

He was using Sublime for his editor.

The viewport meta tag he used was something like

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

PhoneGap and Cordova are basically the same thing

For doing a device ready check he did this:

window.onload = function() {
  document.addEventListener('deviceready', init, false);

function init () {...}

Mark was using the DDMS view in Eclipse for debugging.


2. Mobile Frameworks Shootout!

This talk was scheduled to be by Steve Drucker of Fig Leaf, but it ended up being delivered by his CEO, Dave Gallerizzo. It was a comparison of three major Mobile frameworks.

jQuery Mobile:

  • works off one file for entire app, but in reality you would split it into separate included file
  • good for automatic filtering of lots of data
  • probably use Backbone.js for getting data
  • editors: Aptana Studio, Codiqa, Theme Roller, Brackets, Dreamweaver
  • no MVC framework
  • need 3rd party plugins – Backbone, Google jquery-ui-map
  • good for small apps

Sencha Touch:

Appcelerator Titanium:

  • Eclipse-style editor
  • MVC/XML based
  • good for native app features. Limited forms functionality
  • good for integration of audio/video/photos for native devices


3. Quit your boring 9-5er

Kay Smoljak mentioned all the following:

I’m not convinced it’s a viable idea for myself, but it was an interesting presentation anyway.


4. The number one ingredient behind (technical) success: Team

John Peebles of peebs.org and getadministrate.com gave an engrossing presentation on team building. Some random links he mentioned:

And my favourite quote of the conference, “The plural of anecdote is not data“. Although apparently the original version of the quote was the inverse of that, “The plural of anecdote is data“, but that version’s much less widely used!


5. Zombie Code

Marco Cedaro of cedmax.com speaking about bad javascript code, and going into specifics of writing better code using the AMD pattern. Although a lot of what he mentioned could also apply to other languages too. Slides available here. Some things he mentioned:

I need more time to read up on some of this stuff before thinking of using it.


6. How To Destroy The Web

Bruce Lawson of Opera delivered the most enjoyable presentation of the conference, an ironic look at how we as developers limit our websites (and much more besides).


Day 2

1. Cultured Localisation, or ‘How not to offend one billion people’

Ryan Stenhouse gave the first talk I saw, which had quite a small crowd… unfortunately this was the least professional presentation I saw. I’m not usually critical, but this didn’t meet the standards set by everyone else. His talk was just over 20 minutes compared to the 50 minute slot everyone else I saw filled. His presentation skills were sorely lacking, and he seemed genuinely embarrassed by the end. I’d been looking forward to this as well. The presentation was very similar in style and content to this one he did last year at a Ruby user group, which should give you an idea of what it was like.


2. Using personas in service design – continuously

Tuuli Aalto-Nyyssönen of Ambienta gave a fun presentation about how to use personas when planning and designing websites and apps. Some random things she mentioned:


3. Don’t become Agile, strive for agility

Chris McDermott talking about Agile and Kanban, quite interesting and introducing some things I wasn’t aware of


4. Frakking effective planning: not just for Cylons

Sally Jenkinson discussing technical planning from her position as a consultant. It wasn’t 100% relevant to me, but a good presentation nonetheless. She had a useful mindmap for common questions she always goes through when taking on new work, and I can see a similar approach (or a checklist) being of use to me.


5. Just Mock It: Discovering Mocks & Stubs!

Luis Majano of ColdBox talking about using MockBox when unit testing. I’ve seen him talk before, always entertaining. Adam wrote up a good description of this already, and we both picked up on some new ideas that we could apply to our unit testing. One thing he talked about – You shouldn’t amend your code to accommodate unit testing – this implies you’re probably making your code too complex, tightly-coupled or just aren’t mocking properly. Some links:

Phew, that’s it – mostly just a collection of links to various things which might be useful to me later. Overally – a good conference in all ways.

April 2, 2010

Poor form design

Filed under: Web — duncan @ 7:53 pm
Tags: , , ,

Making a booking on the BFI’s website. What’s wrong with this form design?

Yeah that’s right – how can my credit card have a Start Date in the future?

June 8, 2009

How not to do input validation

Filed under: Web — duncan @ 12:01 am
Tags: , , ,

Here’s a screenshot from a form I was filling in on the TV Licensing website. I’d just entered the date as 9/6/2009 instead of 09/06/2009. Obviously it’s too tricky for them to work out how to pad 1-digit numbers with a leading zero.

TV Licensing - Update your contact details

This falls into the same category as sites that insist you enter your username in either lower or upper case. Or that you enter your credit card without spaces or hyphens. Or that you format your phone number in a particular way.

It’s all putting extra work on the user for something that could be done automatically server-side with just a few lines of code at most. Not good practice!

March 6, 2009

PHP developers most satisfied

Filed under: Web — duncan @ 12:08 am
Tags: , , , , , , ,

As reported in The Register, developers using PHP are more “satisfied” than those using other languages.

The top languages were:

  • Actionscript
  • Flex
  • Javascript
  • Microsoft F#
  • Microsoft Powershell
  • Perl
  • PHP
  • Python
  • Ruby
  • VB Script

I know what you’re thinking, “what no <insert_favourite_language_here”>? For me, that’s “what, no CFML?”

The survey was done by Evans Data. To view the press release on their website you have to register. Then to view the PDF of the report, you have to register again.

The report is 27 pages, with a page given to each of the top 10 languages, and a bit more analysis for all the major categories of the survey. They surveyed about 500 developers and IT professionals. The survey is actually for scripting languages, which is why I guess it omits several obvious popular languages. The one language in the list that is perhaps of most interest for Coldfusion developers is Flex, of which they said:

As with Actionscript, with the exception of ease of use, users gave Flex relatively low marks across the board. It did receive the second highest rating of any of these languages for quality of tools, something that most likely is attributable to the resources and support that Adobe contributes to the Flex community.

PHP, Ruby and Python all seemed to do pretty well. I’d be interested to know if they just gave developers that list of 10 pre-defined languages, or if more languages were rated, but they limited the report to the top 10 of those by usage.

January 31, 2009

Google: all sites may harm your computer

Filed under: Web — duncan @ 3:36 pm
Tags: ,

Sometimes you may have noticed “This site may harm your computer” appearing under individual search results on Google. Today I noticed it appearing under every search result, no matter what I searched for.

Google safe search

Some kind of hiccup down at the Google server farm? There was a generic error message that came up later, and now it all seems to be back to normal.

It’s reassuring to see that even Google can screw things up.

Update: as reported in The Register and LifeHacker

Google later put out the official explanation of what happened: human error. They’d entered / into their list of bad sites, which equalled all websites. Oops!

November 25, 2008

Sith Sigma

Filed under: Web — duncan @ 11:59 pm
Tags: , , , , , ,

Found this interesting blog about management tips for technology organisations. Covering topics such as leadership skills, workforce efficiency, business intelligence, etc. Fairly typical to many other blogs on the same topic.

However, check the name: Sith Sigma. Yes, that’s right; it’s a blog from the Sith Lords, Darth Sidious and Darth Vader! They’ve obviously learnt many management and leadership tips while running the Empire. The title itself is a pun on Motorola’s Six Sigma business management strategy.

For example, here’s an excerpt from a post about Employee Performance Appraisals:

Storm troopers need to bring in Jawas for interrogation. Do we evaluate them on the sheer number of Jawas they bring in, or on the quality of the intelligence extracted from them? Obviously it’s a combination of both.

Another Storm trooper evaluation may have the very narrow categories of: 1) Following orders, 2) Number of prisoners who escaped.

This may seem like an ok set of metrics to evaluate a guard on, but we don’t want them to think that is the only aspect of their jobs. We don’t want narrow metrics to define the job. We may also care about: Initiative, efficiency, attendance record, prisoner health etc.

If it’s important to the organization, it should be in the performance evaluation.

November 21, 2008

Here be dragons!

Filed under: Funny,Software,Web — duncan @ 9:48 pm
Tags: , , , , , , ,

Trying to resolve an issue I’ve been having with the Adobe Flash plugin for Firefox. I found some useful tips at MozillaZine.org which at one point directed me towards the about:config page in Firefox.

Accessing the about:config page then brought up this delightful warning message.

here be dragons

There aren’t enough dragons in the software industry! Or humorous warning messages for that matter…

Humour aside, this is a great example of an easy to understand warning message. No redundant ‘Cancel’ button. No verbose jargon that would just get ignored. A Submit button that is related to the action, and thus might be read rather than immediately clicked on in a Pavlovian response.

November 19, 2008

Information you shouldn’t display to users

Filed under: Web — duncan @ 5:26 pm
Tags: , , ,

Received an email newsletter from some company, and decided to unsubscribe. Clicking on the link gave me this page:
Senior Send

For some reason, Senior Send have decided it’s a good idea to output what SQL they’re using to delete me from their client’s mailing list. This sometimes happens, especially with Coldfusion, when you accidentally get an error. It’s not a good idea to display this much information even then. It’s an even worse idea to display this to any or all of your users.

SELECT id,status_id, mail_subscriber.name FROM mail_subscriber WHERE id = 94523

found 1

And the URL looks like:

I wonder what happens if I just change the subscriber ID to anything else? How long would it take to write a script to loop from 1 to 94522 deleting all users?

Maybe they should have just passed my email address, or a UUID, or an encrypted version of my ID. Maybe they shouldn’t have output their SQL.

November 17, 2008

How not to display images

Filed under: Web — duncan @ 7:00 am
Tags: , , ,

Trying to register at xbox.com. For some reason their Flash detection seems not to work for me (using Firefox 3.04, Flash 10.0 r12). So they display an image telling me to "Please download Flash Player". If you look at the fullsize version of the screenshot, you’ll see the image looks sort of distorted.
xbox.com screenshot

It seems that Microsoft in their infinite wisdom, are stretching that image to fill the screen. This makes the text all fuzzy, and the female character they’ve used seem somewhat wider than her designer originally intended.

It’s kind of an amateur web technique. Often you’ll see it being done the opposite way, where a much larger image is squashed down to fit into a smaller space. In this case, the image often looks ok, but with the effect of increasing download time. If the end user is on broadband, they probably won’t even notice. However the amount of bandwidth your site uses will be higher than it should be. I saw a particularly bad example of this recently where two small logos on the page were actually very large .bmp files. The cumulative filesize of those files was over 750Kb. I converted them to .gifs, grand total about 10Kb.

The original image for comparison:
xbox original image

A separate discussion could be had over whether they even need an image on this page anyway. A simple text message telling me to download Flash Player would have sufficed.

Next Page »

Create a free website or blog at WordPress.com.