Mr Speaker

mrspeaker's head in a monitor You find yourself at the entrance to the Hompage of Mr Speaker. In a darkened corner sits a trunk containing HTML5 games and some JavaScript tidbits. Next to it you spy a mastodon account. Exits are North, East, and .

The Shogun, and the video game

Mr. Speaker presents a brief historical comparision of Tokugawa Japan and the 1981 video game PacMan, in point form.

Introduction
tokugawa party

  • The first Shogun of the Tokugawa period was Tokugawa Ieyasu.
    He was a pretty dang good Shogun, heavily influencing japanese history and achieving almost unlimited power and wealth.
  • The first video game to spawn its own line of merchandising was PacMan.
    PacMan was created by Namco designer Toru Iwatani and is the best selling coin-operated game in history.

Definitions

  • Shogun means "Foreign barbarian subduing generalissimo".
    It was applied to Ieyasu after he defeated the Hideyori loyalists and other Western rivals.
  • PacMan has no meaning.
    It was changed at the last minute from PuckMan so that no one would graffitti the machines and make rude words.
  • Tokugawa Ieyasu was the major ruler throughout the Tokugawa period.
    The Tokugawa period was a time of peace that allowed visual and performing arts to flourish.
    The Tokugawa period lasted from 1603 to 1868.
  • PacMan was the major ruler throughout the 80's.
    The 80's was a time of innocence and neon that allowed anyone who so desired become a pop/rock star.
    The 80's lasted from 1980 to about mid 1988.
    pacman - funky looking level

Interesting point

  • There have been many periods (jidai) in Japan's history.
  • There has been only one 80's.

The mystery of the monikers

  • All of the periods had an alternate name. I don't know why.
    The Tokugawa period was also called the Edo Period. Edo was the name of the place that is now known as Tokyo.
    The Momoyama period (1568 to 1603) was also known as the Azushi period. The Muromachi period (1336 to 1568) was also called the Ashikaga period. An so on.
  • All of the ghosts in PacMan had an alternate name. I don't know why.
    • Shadow, Speedy, Bashful and Pokey had nicknames of Inky Pinky Blinky and Clyde.
    • Their Japanese names were Oikake, Machibuse, Kimagure and Otoboke.
    • Their nicknames were Akabei, Pinky, Aosuke and Guzuta.
  • They also had alternate names. I dont know why.
    • Their alternate names were Urchin, Romp, Stylist and Crybaby.
    • Their alternate nicknames were Macky, Micky, Mucky and Mocky.
  • The common ghost name in Japanese and English was "Pinky"

Summary and conclusions

  • No Shogun was ever called Pinky.

Playing with food

What a birthday I had this year.

I was given a Nutrigrain E.T. from a work colleague. Although I have had a life long fear of that horrifying (and most probably evil) movie character, I was impressed with the likeness and hopeful that once my colleague forgot about the gift I could flog it on ebay.nutriET
The next present I received was a tin of wasabi peas which I ate while admiring my new nutri-friend. Due to my equal mix of happiness and horror caused by simultaneosly thinking about my birthday and the ugly freak that Spielberg decided to unleash upon my untainted mind all those years ago, I became distracted and dropped a few of the wasabi peas on the floor.

As I picked up the last of the so-undeservedly-wasted peas, I noticed that it held a passable likeness to Waldorf (or is it Statler?), of "The Muppet's Statler and Waldorf" fame. Wow! What a birthday this was shaping up to be.
nutriET

Unfortunately my plans for seeking my fortune with these babies on ebay went bad that very eve, after I accidently ate the wasabi pea, and a rat or a bunch of cockroaches or something of similar capabilities ate half of E.T. Oh well.

I also got a bunch of other cool stuff for my birthday, but none of them looked like celebrities. I wonder if I could get Steven Spielberg to reimburse me for the dropped wasabi peas.

What’s that VBScript Object?

I recently needed to check for the existance and type of a VBScript object returned from a function. Perhaps you need to too.

I thought there must be a standard property of all objects, like, maybe, object.type or object.size or object.id or something. But I couldn't dig up such a thing. I needed to check what kind of object was being returned - a Microsoft.xmlhttp XML object, or a "Nothing" object....

My "GetXMLObjectViaHTTP" function it was grabbing some xml and looking for errors like so:

If Err.number = 0 Then
    Set GetXMLObjectViaHTTP = objXMLDocument
Else
    Set GetXMLObjectViaHTTP = nothing
End If

If an error occurred in the function I had to set the return type to "nothing" which is an object (apparently). I originally set the return value as an error number, then just "", but both wont work because of how I'm using the object returned:

Set objXML = GetXMLObjectViaHTTP( strXMLUrl )

You end up with Set objXML = "-1", giving the error "Object required: '[number: -1]'"

I was going to make a customer "error" class to handle it (which I ended up doing anyway...), but first I had a look around for other's solutions. I couldn't find anything, though eventually came across a VBScript function "TypeName()". Running "Response.write( TypeName( objXML ) )" gives:
"DOMDocument" if it was okay, and "Nothing" if it something broke. Which is like, totally testable.

I'm too lazy to look up when TypeName was introduced to VBScript (maybe since forever), but the server I'm testing on is version 5.7426.

UPDATE: I found a couple-a more cool things: VarType() returns a type code, rather than a name. Google for the type codes, they're everywhere unlike this function name.

Also, I never realised that you could do If objMyObject Is Null. I thought "Is Null" was only a VB construct. Anyhoo, thats useful in object detecter-ing too.

Fetching things with File Fisher

bluefishFinally got around to "finishing" this FireFox extension. I called it "FileFisher" and only just realised what a crappy name it is. Hopefully that'll get an upgrade in the next version... Anyhoo, FileFisher is a tool to download photos that your friends have been too lazy to meaningfully rename before they stuck them on the web. You use it anytime you realise that the file names you want have an obvious sequence - like image01.jpg, image02.jpg, image03.jpg... image50.jpg etc etc..

Click on the first image and load it into a browser tab. Now start FileFisher from the tools menu. You will see the current URL in the top bar of FileFisher, and many wierd options below it... What we are going to do is swap the "sequence number" part of the URL for our token.... so if the URL in FileFisher is "http://www.allThesesImages.com/media/image01.jpg" manually change the "image01.jpg" to read "imageAA.jpg".

fishfisherThen set the numbers you want to try and grab... so, say you want to grab image1.jpg through to image99.jpg, put "1" in the start field, and "99" in the end field. Choose your download directory and "go fish". The AA bit will be substituted with each number in turn, and the files downloaded.

It works with any file type - but for zip, wav and other filetypes that download rather than displaying in the browser, you'll need to paste the URL directly into FileFisher. Filefisher has a couple of other tricks up it's sleeve too, but you can read all about them in the Help.

Theres heaps planned for the next version, but I have a very short attention span and it's amazing it got as polished as it is now. As it stands, the program is filled with bugs and strange behaviour so let me know what interesting and wonderful problems you find.

So get crackin' and install FileFisher v0.4 (for Firefox 2.0.* and below)

The Old Lady and the handdrier machine

The old lady and the magpies

Google may have noticed that I recently deleted a whole swag of posts from this blog. The posts were all titled "The old woman at the bus stop who I cycle past everyday said:" and the body of the posts contained a (usually one sentance) transcript of what the old woman had chirpped to me as I struggled up the hill to work.

She always said something different. "Tough going today!", "You'll never get in the Olympics at that rate..", "Where's your hat today?".. In a flash of inspiration I realised and once I collected 50 or so posts it really would have been an item of interest and beauty. It was not to be. I ended up collecting about 4.

It wasn't my fault, honest. First, a couple of families of magpies set up home right near the bus stop. And they were swoopy little buggers. After a few days of having shattered nerves I changed route with the intention of resuming the posting once the lil' magpies was all grown up.

Then I got a new job and never saw the old lady again.

The new job

I had to go for an interview for the new job. Running late, I decided to ride in on my pushy. That was silly because it was the hottest October day recorded since they stopped using the Fahrenheit temperature scale. I arrived dishevelled and sweaty. Consulting a toilet mirror confirmed I looked like a long-time homeless person wearing a suit. My bike helmet had given me a hair-do which some how made it look like an attempted comb-over. I tried to fix my hair but all attempts only worsened the sitution.

Running out of time and patience, I stuck my head under the hand drier machine. As I went to fix up the devestation I thought that move would have caused, I realised a hair-styling miracle had occurred. My hair look snazzy. Better than ever, I'd say. I didn't even have to touch it. All I could do was adopt a Fonz stance and say "'eeey!"

New job: Part 2 - the job
Dual screen B S O D
Needless to say, with a Fonz-like level of confidence I got the job. I have a desk and a chair and a plastic cup for the watercooler that says "Neverfail" (a Coke subsidiary I think...) I've used the same cup for several days and so far it has lived up to its name.

On the first day of work I spilled coffee on my shirt. I didn't notice till I went to the toilet. I took off my shirt and washed it in the sink, then dried it under the hand drier machine. The hand drier machine has already saved me twice.

I don't know how many people saw coffee on my shirt but didn't tell me. The old woman at the bus stop who I cycled past everyday would have told me.

Javascript. The demon of space.

dos screen

Javascript - the demon of space... Only you can pre-emptively strike on these possibly hostile space vehicles which may or may not be plotting to attack you or an ally of yours.

Deamons of space is a DHTML javascript game I started and will hopefully never complete. Once you figure out the odd "braking" system you may find it a little easy... So to make the game more difficult, it doesnt work in Firefox. This should add a significant challenge.

When I get a couple-a-hours free I'll fix it up for Mozilla. I think (hope) I was just not using getElementById(). It was my best effort at object-oriented javascript at the time. I'll put the "source code" here too to save having to grab 'em all.

P.S. The "demon of space" line comes from the stunningly brilliant and hilarous sci-fi musical thriller - Naked Space, or as it was also known, The Creature Wasn't Nice starring Leslie Nielson. A film that requires several viewings to understand the attempted jokes. Time well spent. "Pressure..... The demon of space."

Track: Non-breaking space

non-breaking space
Another not so new track. Thought I'd whack it up. Non-breaking space was getting a swag of radio play on Sydney's fbi radio, which was fun.

Clikity cricks and trickles with too much reverb but lovely beats. And you can never have too much reverb.

Non-breaking space [~2.8Mb, mp3].

Be the moderator you want to be.

It's hard work being a Slashdot moderator . The importance of such a task can not be overstated. The fate of the the quality of critical information rests solely in your hands.

But how can you know, as you go to mod that post "-1 overrated" that the poster really is half-wit and not a sublime genius whos intricate balance of insightfulness and poetry has sailed clean over your head? You need my Slashdotter v0.01 extension for Mozilla Firefox!

slashdotter extensionSimply right click on the posters name and click "Slashdotter". A helpful popup screen will magically appear and display a summary of the user's recent comments - as well as a handy "average post score" which will greatly assist your moderation decisions: "Average score 1.222222? -1 troll for you... Average score 3.9? Must be +1 insightful..." Its that simple.

Firefox
Works on the thread starter's and all replier's user name - anywhere it says "<post title> by <user name>" basically. Employing all the latest hi-tech html parsing techniques, Slashdotter is almost sure never to fail. In fact in my 25 minutes of testing, I have only been able to break it a few times. Havent tried it on my linux box yet either. But anyway....

So install it now!