Archive for February, 2008

Beatles Trivia

Friday, February 29th, 2008

A little music trivia on this Leap Day?

A friend recently posed an intriguing bit of Beatles trivia to a group of us. We were gathered to watch Julie Taymor’s, Across the Universe, an excellent collection of Beatles classics tied into a compelling (if a little contrived) story of love, war, drama, and of course, music! Here is the trivia question:

What of the plethora of Beatles’ songs start out with the exact words in their title, and in addition, start exclusively with vocals?

(more…)

Upping Productivity

Thursday, February 28th, 2008

So before we do a monster post about the super-duper new Commons Cam site we thought we’d share a little pre-lunch jam with you:

(more…)

Garfield Minus Garfield

Wednesday, February 27th, 2008

This has been all over lately, so allow me to embrace my inner lemming, and post it here, too.

Basically, it’s the Garfield comic strip with the Garfield the cat image and text wiped out. From the page:

Friends, meet Jon Arbuckle. Let’s laugh and learn with him on a journey deep into the tortured mind of an isolated young everyman as he fights a losing battle against loneliness and methamphetamine addiction in a quiet American suburb.

It’s the first time I’ve laughed at Garfield since I was eight. I recommend you check it out.

Throw Down 404 Errors in Cake

Tuesday, February 26th, 2008

Say you’re doing some simple display logic for a controller view:


function view($id=null)
{
    if ($id) {
           $this->set($data,$this->Model->findById($id));
    } else {
           return false;
    }

}

In a situation like this, you always want to handle the (inevitable) situation when someone requests an invalid ID number, at which point no data would be returned in the $data variable.

Luckily, there’s a handy little function called cakeError, which lets you call a variety of Cake errors. Most of the time, you’ll want a 404 error, but it also lets you call any Cake-standard errors (you can see the full list here).

Regardless, if you want Cake to display a “404 Not Found” error message if the ID isn’t found or returns no data, do something like the following:


function view($id=null)
{
    if ($id) {
           $data = $this->Model->findById($id);
           if (!$data) {
                 $this->cakeError('error404',array(array('url'=>'/')));
           } else {
                 $this->set('data',$data);
           }

    } else {
           return false;
    }

}

That will throw up Cake’s generic 404 error page and stop further script execution for ya. If you want to have a custom 404 page, add a file named “error404.ctp” to your /app/views/error/ directory.

A New Commons Cam, Coming Soon

Friday, February 22nd, 2008

We’re very proud of our popular site for Ithaca’s Commons Webcam! But we’ve been working on a new design, concept and features that will make the already super-fun one of Ithaca’s coolest sites.

Within a week the new Commons Cam will launch, with some great new experiences for users. We’re also incorporating weekly polls related to the Commons, downtown Ithaca and all things Ancient Wisdom.

In the meantime we’ve set up a great supplement to the new site: a Flickr group!  Join The Best of the Commons Cam group and submit your screenshots/downloaded webcam shots to the pool.

Exciting times are coming, and you’ll have to keep checking out exploreithaca.com for the new and improved Commons Cam website! Once we wrap that up we can resume band practice on Dark Side of The Moon.