Archive for July, 2008

Dynamic CakePHP models without class definitions

July 25, 2008

Here’s a nifty CakePHP feature I stumbled across yesterday:

You can use a model without creating a file for it or defining a class for it.

Call a model from your controller or define relationships in other models as normal, and that model can be saved, fetched, recursed, etc, using normal “$this->ModelName->foo()” calls.

Without a model class you wont have any relationships or validation rules defined on the model, but this is still a useful feature.

I often have tables whose only purpose is to populate a drop-down list and/or keep the database normalised. A table of country names, for example.

In the past I would have created a bare-bones class for the model with nothing in it, but now I don’t even have to do that.

I’ve tested this using PHP5 and it works on the latest stable version of CakePHP (1.1) and the 1.2 beta.

I suspect this wouldn’t work for PHP4 though because of the comment that you should declare a model’s name inside its class when using PHP4.

Mini review: Appleseed Ex Machina

July 20, 2008

Borringggg. We nearly walked out. The whole film was just clichés and “seen it before”s.

My only interest was trying to decide if a PC with a decent graphics card could render the movie in real-time (conclusion: probably). It wasn’t unattractive animation, just very simple. You might need to remove a stick of RAM to authentically* capture the jerkiness that plagued a lot of scenes though.

* Haha, I split the infinitive.

Mini review: The Girl Who Leapt Through Time

July 10, 2008
Click for a full review from someone else who likes to writes things.

Click for a full review from someone else who likes to writes things.

Funny and enjoyable, thumbs up, worth seeing. A bit like Groundhog Day but things get quite poignant. I didn’t agree with the ending.

The trailer is a bit lame so here’s a funny clip
(need sound).

The lead-up to that’s pretty good too… :P

Metal Slug

July 6, 2008
Metal Slug

I am yet to find a screenshot capturing of spirit of Metal Slug. Getting close. Click pic for more.

Metal Slug is video gaming’s Rambo or Commando. So much so, I actually thought the game had been released in the 80s rather than 1996.

I’ve been having fun playing it via WiiStore. Mostly I love Metal Slug for its detailed and humorous pixel art.

P.S. Remember playing Badlands? That awesome car game with four steering-wheels…

These are some bad lands.

WiiStore is so slow

July 1, 2008

I suppose I didn’t have the best of luck.

  1. Turn on Wii.
  2. Open WiiStore, store is set to New Zealand rather than Australia.
  3. Check options, no country option.
  4. Quit WiiStore.
  5. Open settings, change country to Australia.
  6. Open WiiStore. “Must accept new Internet Terms & Conditions.”
  7. Quit WiiStore.
  8. Open Wii Internet settings, accept Terms & Conditions.
  9. Open WiiStore. “Your system settings are corrupt. Contact support.”
  10. Reboot Wii.
  11. Open WiiStore. “Unable to connect. Would you like to try again?”
  12. “Try again.”
  13. “Your country has changed. Would you like to continue?”
  14. “Yes.”
  15. “Please accept new Terms and Conditions.”
  16. “Accept.”
  17. “Thank you.”

Incidentally…

Number of contracts I had to agree to so I could:
Convert WiiStore from New Zealand to Australia Physically move from New Zealand to Australia
2 0

It’s $18 NZD for 1′000 Wii Points, compared to $15 AUD.