Pimsleur Rules

Oliver Brown
— This upcoming video may not be available to view yet.

I made an interesting loan from my local library a couple of days ago; Pimsleur Complete German I. It’s a lot better than I expected. Whether it really is as good as it seems I can’t really judge since I haven’t really got to any material that is completely new to me.

The progress feels fairly slow but to be honest it isn’t any slower than most book-based courses should be since it forces you to do the exercises you might normally just gloss over.

For anybody considering learning a language I strongly suggest trying to find a copy of the Pimsleur course for it (i.e. not buy if you can avoid; they’re expensive).

Just to prove I’m not the only one who likes this, check these comments from someone learning Spanish.

(Unfortunately they don’t do Finnish by the way.)

Pay-per-click advertising getting interesting

Oliver Brown
— This upcoming video may not be available to view yet.

A quick search on Technorati for “ppc” reveals lots of cool information I didn’t know about.

MSN, Ask Jeeves and Yahoo! have all either recently released a competitor to Google Adsense or about to and Google are about to considerably change their keyword state algorithm. You will soon be able to keep badly performing keywords active by simply bidding higher (meaning if you “pay” $50.00 per click you can rank number one - even if you get no clicks).

The only thing left to wonder is if the competitors will offer a Google Adwords type program to web publishers too.

The Marketing Microscope Search engine optimization and Online marketing

Back again…

Oliver Brown
— This upcoming video may not be available to view yet.

Well after being incredibly busy for a few days I actually have time to do stuff now.

Unfortunately blogging is not a priority since I have work to do for IVDC.

The most important bit of news is the indefinite closure of OrbWars.

OrbWars 6 Coming Soon

— This upcoming video may not be available to view yet.

Update This page previously contained a statement regarding the closure of OrbWars down over a year ago - BUT OrbWars will be returning soon, check the website over at http://www.orbwars.co.uk for more details once I get it all finished!

Simple caching in PHP5

Oliver Brown
— This upcoming video may not be available to view yet.

I’ve just written a script that reads from a few webpages and I faced a problem of the servers sometime being slow and delaying my page display, so I decided to write a simple caching object:


class cache {

    function __construct($path='.') {
        $this->path = $path;
    }

    function cache($name, $callback, $args) {
        if (file_exists("$this->path/$name")) {
            $this->callbacks[$name] = array($callback, $args);
            return implode('', file("$this->path/$name"));
        } else {
            return $this->save($name, $callback, $args);
        }
    }

    function save($name, $callback, $args) {
        $text = call_user_func($callback, $args);
        $fh = fopen("$this->path/$name", 'w');
        fwrite($fh, $text);
        fclose($fh);
        return $text;
    }

    function __desctruct() {
        if (is_array($this->callbacks)) {
            foreach ($this->callbacks as $name => $callback) {
                list($callback, $args) = $callback;
                return $this->save($name, $callback, $args);
            }
        }
    }
}

You call it using:

$cache = new Cache();
$cache->cache('MyFunc.txt', 'MyFunc', 'an argument');

All it does is save the output of the function to a file with the given name. The clever bit is that the output it sends to the browser is the content of the file; it doesn’t actually call the function until the end of the script execution and so doesn’t slow the output to the browser down.

  • Start sending output.
  • Output cached result of function.
  • Finish sending output.
  • Call function and save to the cache file.

It means the content will always be slightly out of date, but in a lot of situations that may not be a problem. Quick note, this is only really possible (at least the way I’ve done it) in PHP5 because it requires destructor support.

Why people think Finnish is a hard language

Oliver Brown
— This upcoming video may not be available to view yet.

This page lists the 2253 forms of the word “kauppa”, Finnish for “shop”. Finnish is highly agglutinative so having a lot of forms for each word is expected . But this is rather more than most people would predict I think. It isn’t as bad as you think since Finnish suffixes embody concepts most languages use several words for. i.e. Finnish uses longer words in most sentences but there are fewer of them.

This is cleverly embodied in the quote from this site: “Why lose time and energy saying ’the committee that takes care of negotiations concerning the truce’ when you can use a simple little word like ‘aseleponeuvottelutoimikunta?’”

Beam me up Scotty

Oliver Brown
— This upcoming video may not be available to view yet.

Well it seems a bit late since it’s everywhere else, but I thought I should at least mention the recent death of James “Scotty” Doohan. For more information visit CNN.

Google Moon

Oliver Brown
— This upcoming video may not be available to view yet.

Google have put a load of satellite images of the moon along with data of various moon landings to provide us with Google Moon.

Plugins

Oliver Brown
— This upcoming video may not be available to view yet.

I’ve apparently installed two pugins for Wordpress. One is simpletags allowing me to add Technorati tags to posts easily, and the other is bstat, a nice stats plugin. So we’ll see if they work.