does not computre

Why can't I type "execute"? It keeps coming out as "executre".

This is an open question with a million dollar* cash prize for the correct answer.

* this kind



... dunno what I was on that day.... My bad.


I develop on a Mac, because my company thinks they're awesome. Sometimes, however, I have to take my work home with me, and because I'm sane, I have Windows. Of course, this inevitably leads to Issues.



One of the problems I occasionally come across in web apps is sanitizing user input. Japanese has two versions of each alphanumeric character, known as 全角 (full-width) and 半角 (half-width). Many users don't know how to differentiate between the two, and it can cause problems when inserting values into the database.



(this ain't gonna reveal the best side of my personality, so don't read it)


steal this dvd

You wouldn't steal a car
You wouldn't steal a handbag
You wouldn't steal a television
You wouldn't steal a movie.

Just rented a movie and apparently they are still using this. I first saw it as a teenager like a decade ago, and I thought it was idiotic then. Do I even need to bother explaining the logical flaws in the argument? Is there anyone out there who didn't immediately come to the obvious conclusion? How can they not have got rid of it by now? I can only assume it's been so successful in halting piracy that they cannot afford to do away with it.



I tend to look down on social media addicts, like those poor saps who cannot go for more than a few hours without seeing someone else's updates on Facebook. Don't they have anything better to do?

On a completely unrelated note, I was recently awarded the Enthusiast badge over at StackOverflow. It's for those dedicated souls who have [v]isited the site each day for 30 consecutive days.

[The fact that all I have to do in Chrome to get to SO is hit s followed by the enter key is probably a warning sign...]


a problem to <span> the pages

Never assume that you know everything. That's so obvious I'm not even going to explain it further. But also never assume that you know everything that you do actually know. Because you may know it, but you don't know that you know it when you need to know.


oh, and the reason is because...

... it makes the heart grow fonder. Also, I was busy.


Uncaught SyntaxError: Unexpected token ILLEGAL

When you're making an SVG embedded in an XHTML document, don't forget the namespaces!


condicionally amusing

I know it's pretty much accepted as an alternative spelling, but even so, at least once a month I see it somewhere online, and I giggle.



mini flashcards

Just made a quick guide, written in an incredibly patronizing tone, for the novice wishing to make some mini-flashcards.


The name suddenly makes sense. It is, after all, called "Microsoft Word", not "Microsoft Words". Presumably it is programmed to trim down any excess.



This is slightly bizarre. I was jumping through hoops trying to get a script to reset a dropdown after a successful ajax request. Quite pointlessly, as it turns out.


svg to vml or gif and back

God only knows what my grandfather would have made of the title of this post. Gotta love how fast language can change.


plaintext passwords is crazy, init

If you're accessing a MySQL database using PHP, you have to hand the mysql functions your username and password, as well as the name of the database you want to work with.


This is a massive security risk.




A tongue twister to limber up your labials before bed: 「赤パジャマ茶パジャマ黄パジャマ」



thirteen thirty-seven

Been waiting eleven years for this to happen! Finally....


What does the word "representative" mean? Go on, look it up. I'll wait.



I clicked by an ad for AOL email today. I clicked off the page before I noticed it, and only caught it as it vanished, so this might not be verbatim, but this is pretty much what it said:

"Does your email have you running around in circles?"

The implication being, of course, that running around in circles is complex and therefore bad.

Hmm.... I wonder what they could have meant. I'm sure there's a reference to a competitor hidden cleverly away in there somewhere, but I just can't spot it. This is the very definition of sly wit. The sort of bon mot that I have no doubt Oscar Wilde, had he been into failing internet giants, would have handed them for an ad campaign.



So if you are using AJAX to hijack a plain HTML/PHP form, and you have written the Javascript perfectly, and you're getting a 200 code so you know it's being SENT okay, but nothing seems to be coming back....



It's Golden Week! Happy four-day weekend, everyone! You deserve it! Except teachers.


A fruity twister for your tongue: 「李も桃もモモのうち」



If you ever need to create PDFs on the fly with PHP, I highly recommend you use FPDF.



A quirkily tricky twister of tongues this time: 「竹垣に竹立てかけた」

local sqlite db in android

If you want to include an existing SQLite database in an Android app, but all the tutorials seem to be telling you how to create one at runtime, go here:


Easy-to-understand and thorough tutorial on using your own database. Something, I might add, that should really have its on section on the Android Dev site.

BTW sorry for the total lack of puns in the post title. I shall do better in future, I promise.

aaaiiiIEeee 7/8 bug

There seems to be a weird form submission bug in old versions of Internet Explorer (i.e.* 8 or earlier).


installing Native American Tribe

If you need to install Apache and, like me, are still running Vista, GO HERE NOW:

How to Install Apache 2.2 on Windows Vista

It is a very simply-written guide to a fairly complex process.

spot the mys(ql)take

Spot the mistake time again:

  "INSERT INTO users (username, password) ↲
    VALUES($user, $pass)", 


somewhat of a pet peeve

So today I'm somewhat vexed. Actually, it's not just today, it's the past six months or so. There's an awful misuse of English going on, and it seems to be spreading like Marmite on toast. That is to say, it spreads very well, but with the consequence that you are left with a piece of delicious bread covered in Marmite, an industrial solvent which the British often mistakenly use for making sandwiches.

So the spreadage is bad. I hope that's clear now.



This time we present a well-known tongue-twister: 「生麦生米生卵」


snow small feet

My right knee and left foot are at the same height,
but my legs are still straight. Yet I endured the pain
in order to take this photograph. For you.



Next in our series on tongue-twisters: 「東京特許許可局許可局長」




snow place like home

So I was standing by this junction, and the traffic light was green, and yet no traffic was moving. Why?



Japanese tongue-twisters are fun. Let's start off with an easy one: 「庭に2羽ニワトリ」


z-index not working?

This is the third time this month I've had this problem. I'm writing it down here in the hopes that it won't happen again.



Icicles? I think not. We gotta invent a new word for these babies. Ladies and gentlemen, I give you awesomenicles.


a decade later and still its not right

I remember making fun of MS Word's spelling and grammar checker, back in the days when it first came out. My best friend and I spent several hours one afternoon just typing in words and giggling at the suggested corrections. The only one I can recall now was our home town of Ilkley, which yielded alkali - for some reason that sent us into paroxysms of laughter (well, we were 13 - pretty much everything sent us into paroxysms of laughter).

It's not as if Microsoft hasn't had the time or the resources (new!Solitaire). How does Word still do things like this?

conference blues

Why is it that whenever people attend a conference, they always number among them those who think that it is cool to badmouth said conference? Even if it is interesting. Even if it is providing opportunities to enhance their skills and enable them to engage in more effective work, even further their careers. Even though they are enjoying themselves. Why is it cool to constantly make fun of it?

I'm no stranger to the sarcasm, and I get the whole "conference = boring" stereotype. It's a safe topic of conversation for people who are only occasionally acquainted with one another, for who would argue? Well, I did. I said, "No, actually, I am having a good time. Aren't you?" Apparently that wasn't cool. I ended no small number of conversations with that line. Well I'm sorry. I thought we were in teaching because we wanted to teach. I thought that any opportunity for improvement would be eagerly seized and made the most of. What an idiot I was.

I, for one, enjoyed the conference. Having been to it five times over the past few years, I can honestly attest that this year was the best. Not a single workshop didn't but yield some priceless nugget of inspiration. The keynote and guest speakers were a joy to listen to, and I've already implemented some of their ideas in class, with great success.

I care about being a teacher. I have done ever since I met my first really good one in junior high school. I'll do anything to make myself into a person who can inspire a new generation of kids the way that one inspired me.


making hijax jQuery form submit

Kinda obvious now, but I was tearing my hair out for a long time over this.

If you are trying to hijax the default submission of a form, with Javascript or jQuery, you need to make sure the .onsubmit() or .submit() is referencing the form, not the submit button.




One of the first things I did, and one of the first things many programmers do to test their logical skills, is find a way to test for prime numbers. I've always had a thing for numbers, and primes are just weird.

In case you don't know, a prime is a whole number that cannot be divided by any whole number other than 1 or itself. To test whether a number is prime, therefore, we just need to divide it by all the whole numbers that are smaller than it. If it can be divided by one of these numbers, it is not prime.

Here's a simple script that tests if a number is prime or not.



One hundred billion (Zim)dollars to the person who can figure out what this says.


new kanji

I hereby present this humble offering for inclusion in the next version of the Japanese language, whenever it is released.

misleading ad

So... tell me what's wrong with this picture.

weird .test() behaviour in Javascript regex

In a previous post, I described how I implemented a search of words contained in an XML file by using a regular expression defined by the user. Well, I ran into a weird problem.

wildcard search using RegExp

So one of my current projects is the Vocablinator, a dictionary of the words used in the JHS English textbooks in Japan. Believe it or not, this is actually quite useful to some people.

unnecessarily .lengthy problem