The Iron Giant – the best unknown animated movie

November 9th, 2009
The Iron Giant at Wossis?

Wossis? The Iron Giant!

When I first saw The Iron Giant, I went looking for it because I saw it in a list of animated movies on Wikipedia. I’d never heard of it but it seemed to have rave reviews. I still can’t believe how good it is! There was apparently some hiccup with its marketing at the time of its release, and so it was never properly promoted.

I love this movie, the characters are wonderful, the animation is great, but it also has a really strong story, with a feel-good ending that makes my throat hurt and my eyes leak! I think it would have the same appeal for almost anyone who watched it.

There’s a sequence in the movie where Hogarth teaches the giant robot some simple words. I wondered if it might make a good flashcard sequence for wossis.com, and got a little carried away! The cardset I made is not really ‘learning’ any more, it’s more like a comic strip! I think that’s interesting in itself. Have a look and let me know what you think:

http://wossis.com/cardset/35e6a/the-iron-giant.html

Streamyx dead AGAIN, DiGi never lets me down

November 8th, 2009

I’m enjoying ‘slowly loading pages’ at the moment. Streamyx has been completely dead since midnight yesterday night. It’s the usual thing – the DSL light is on on my router, so there’s a carrier signal, but the router’s log says:

Timeout waiting for PADO packets
Jan 1 18:14:42> Unable to complete PPPoE Discovery

At least, that’s what the D-Link router says, my Caremo router (which I usually use, as the D-Link seems to have a fault on the ethernet ports) says

Couldn't get channel number: Transport endpoint is not connected

I’ve stopped serving a couple of sites from home, this time permanently. I moved my last couple of Works-In-Progress to a US server last night, the others have gone to servers in the UK. Living here is easy in some ways, but a significant handicap in others – Internet access probably the biggest example. We’ll probably leave late next year. I have mixed feelings about that, but there’s currently no credible sign things will improve here in the next 5 years.

DiGi

DiGi

We use a DiGi EDGE USB adapter when Streamyx is bad. EDGE is a slower technology than DSL: peak transfer is something close to 26KB/s (so YouTube is not really bearable), and latency is high. It does allow us to keep working though, and in our experience, has been 100% reliable as a service. We have *cough*quite a few*cough* computers here, but the DiGi EDGE adapter is really meant to be used by just one. To reduce load on the DiGi connection, we run one old PC with the EDGE adapter in it as a gateway machine. It also has a squid proxy cache on it, so that when we look at the same pages, or download the same updates for Ubuntu, they’re served super-fast by our cache – the second time!

While I can’t recommend a DiGi EDGE (they do have 3G in some locations, just not where I am) connection to anybody who wants to watch movies online (or even look at big pictures!), if you want to get some work done (maintain some servers by SSH, check email, download software – overnight), you should definitely consider getting a DiGi EDGE connection – as a backup at very least. We downgraded our Streamyx connection to the minimum 512kbit/s package when we got our DiGi adapter. Just having it means we no longer suffer heart attacks and brain haemorrhages when Streamyx cuts out in the middle of a job!

– Update –

Our local TM technician, Fairil, told us on the phone today that there’s a dead piece of equipment in one of the cabinets here, and that lots of people are very angry. Surprise… What bothers me is that I when I reported this fault to TM, they didn’t appear to know there’s a fault – and I made my report 16 hours after the fault occurred! If our local guy knows, why doesn’t TM? Aaaaarrrggghhhhhh! Where is my phone call saying “re: your report, dead equipment, replacement in 2 days”? In the UK, I would have got flowers from my ISP by now!

That last bit probably isn’t true. In ten years of using Internet in the UK, my connection was out for 1 hour, once. And a man came from the ISP came to my house the day before to tell me it was going to be down. And it was cheaper than Streamyx. And faster. And the man in the ISP van was probably paid 5 times more than the TM man who never comes.

Why does it have to be so BAD?

Who would Jesus bomb? Lucky find on YouTube

November 4th, 2009

Saw this on YouTube, liked it a lot. No more to say on the subject right now, than: watch it, experience an emotion, keep it to yourself. OK, you can tell me, as long as you don’t want an argument. I’m posting this purely for ‘liked it’. A lot.

To save you the obvious search, the songwriter/singer is David Rovics.

osCommerce Malaysia shipping modules – all updated

November 4th, 2009

These old shipping modules no longer work since Pos Malaysia’s last website change in January 2011. I’ve replaced them all with a single shipping module that should give your customers a faster response, be more reliable and more flexible. See Shipping widget module page at spider.my and the original (now slightly out of date) blog entry Spider.my shipping modules for Pos Malaysia.

The osCommerce Malaysian shipping modules (malaysiastate, poslaju, posmyair) have all been updated. The new versions are available from http://lolyco.com/contributions/

Malaysiastate v0.03

Users of the malaysiastate shipping module (for local deliveries) will be pleased to see I’ve finally solved the ‘failed to open stream: No such file or directory‘ problem in malaysiastate. I had always thought I didn’t have this problem, but while looking at the error log while working on the other two modules, I saw the error! Actually, it’s only a warning on my server, so that’s why I didn’t see it before.

The malaysiastate error is caused by osCommerce seeing the “.inc.php” file which contains the shipping prices and interpreting it as a shipping module, so it tries to find a language file for it. There’s no language file (unless you told me about the problem and  I recommended you create an empty one to make the error go away!), hence the error. The new version is exactly the same as the previous version, but the shipping prices file is now just “.inc” on the end (minus the .php).

If you want to update your previously installed version to v0.03, all you have to do is:

  1. rename your existing malaysiastate.example.inc.php and malaysiastate.inc.php files to remove the ‘.php’ from the end of the filename.
  2. copy the v0.03 shipping module into your includes/modules/shipping/ directory. No need to ‘remove/install’, unless you absolutely don’t want a visitor to see a ‘cannot quote’ message while you’re half way through updating.

Poslaju v0.10 v0.11* and Posmyair v0.11

Howard Sim from www.cigs-mart.com reported that his GoDaddy hosting didn’t support the page-fetching methods I’d used previously in the shipping modules. He sent me a recommendation he’d found to use the cURL libraries. I use cURL all the time from the command line, but for some reason didn’t think of it when I originally wrote the shipping modules. I’ve added cURL support to these two modules as an editable option on the shipping module admin page.

To upgrade your existing versions of posmyair and poslaju, you’ll have to:

  1. make a note of your existing module settings
  2. remove the modules using your admin panel (because the editable module options have changed)
  3. copy the posmyair.php or poslaju.php file into your includes/modules/shipping/
  4. install and edit the module settings. Choose cURL or PHPv5 if you can (see below), or PHPv4 if you absolutely have to.

User-Agent change

I’ve changed the User-Agent that’s reported to Pos Malaysia’s webserver by posmyair and poslaju. Unless you use the PHPv4 setting, the shipping modules send two (extra) items of data to Pos Malaysia’s webserver. One is the URL of your website as “Referer” – something like “http://fantasticmalaysianeshoppe.com/”. The other is the “User-Agent“. I’ve added my email address at lolyco.com to the end of the User-Agent string, so it now looks like:

“osCommerce posmyair Shipping Module (sean(a)lolyco.com)”

or

“osCommerce poslaju Shipping Module (sean(a)lolyco.com)”

Previously, it was the same but without my email address. You’ll never see the User-Agent string, only Pos Malaysia’s web admin will see it. I’ve added my email (instead of yours) in case the admin gets upset about the way the shipping module fetches the data from his server. Rather than she sends an angry email to you, and you not know Whiskey Tango Foxtrot she is talking about, she can send it to me instead.

I would be prepared to make the email address overridable, so that you can send your shop admin email address, just in case you want to receive the angry emails instead of me. Let me know your opinion on that one.

* Howard Sim pointed out a careless copy-and-paste in poslaju, so one more version!

Code golf at Stackoverflow. Byte array substring searching.

October 25th, 2009

I don’t know what I was searching for when I found this ‘code golf’ challenge at Stack Overflow. The challenge was to find a substring of bytes in a byte array, returning the start position. It cost me half an hour or so, so I thought I’d post my attempt up for posterity. Many of the answers were aiming at presenting the code in the fewest characters possible, so that’s what I did too.

I didn’t do an in-depth survey, but it looked like a lot of the contributions were naïve string search, as is mine. Better search algorithms exist, so be warned! Here’s my 116 characters of Java:

int m(byte[]a,int i,int y,byte[]b,int j,int z)
{return i<y?j<z?a[i]==b[j++]?m(a,++i,y,b,j,z)
:m(a,0,y,b,j,z):-1:j-y;}

Not pretty! I have to confess to writing it with whitespace and if-else first, before stripping out the whitespace and converting if-else to (boolean expression)?statement-if-true:statement-if-false. One thing I noticed in an early attempt is that you can remove the whitespace between the ‘return’ statement and ‘-1’. Should you ever need to do that, you know who to thank!

Before you complain about the missing javadoc markup, the first byte array is the string to search for. The second byte array is the string to search in. The two ints following each byte array are the start index in each (typically zero – it saves me having to write another method to do that, and hence, precious characters in my golf!) and the length of the byte array – to save me using the lengthy ‘.length’ property! The method returns, as per spec, the position of the first matching substring or -1 if a match is not found.

Some of the really short contributions are from alleged programing languages with built in substring handling. You’ll forgive me if I sneer at those attempts and say they’re not really programming languages, they’re applications with complicated interfaces.