An Basic Slim Framework View Example

I had quite a time figuring out the basic use of the View object and templates with the Slim framework. Everyone seems to want to use a 3rd party template engine and I probably will too but I have no problem with PHP. But, it is useful to see the basic implementation first and then build on it subsequently with something like Twig.

Here is the simplest use of the Slim view, if you are not using a 3rd party template engine:

// Create the Slim app object

    $app = new \Slim\Slim(array(
        'debug' => true
    // Create a route for the home page

    $app->get('/', function () use ($app) {
        $app->view()->setData(array('foo' => 'bar'));
        $app->render('home.php'); //Slim automatically appends templates/ to the path for templates if not specified

If want to pass an array of values, do it like this:

$app->get('/', function () use ($app) {
        $app->view()->setData(array('foo' => $arr));
        $app->render('home.php'); //Slim automatically appends templates/ to the path for templates if not specified

The template home.php should be in a folder called templates:

       echo $this->data['foo'];

How to Remove LinkedIn Intro Email Account

LinkedIn Intro
LinkedIn Intro

I was very interested to try LinkedIn’s Intro plugin for iOS email.  I thought the idea had potential, but in the end I get email from people I know well and see everyday.  If I was in sales and fielded emails from an unfamiliar group of important people, this app might be a life-saver, but there is not much value for me.

There are three reasons why I wanted to remove the app, which easily outweighed its usefulness to me:

  • It doesn’t seem to let me import the Google calendars associated with my Gmail account (showstopper)
  • It routes all my email through LinkedIn which probably reads and stores information about my email.  I don’t need to make it so easy for Google, LinkedIn and the NSA to read all my email.  At least I can hinder LinkedIn.
  • There is a bit of a performance hit to my email when the little image and data are loaded about the sender.

Unfortunately, you can’t delete the account in the same way as a normal account.  In case you also want to remove the Intro account, do this:

  1. Go to Settings > General > Profile
  2. Find the LinkedIn Intro profile (there may be others)
  3. Delete it.

You will need to re-add the original email account.  Now only Google and the NSA will be reading your email!



UX Review: Panaramio


I’m currently researching geo-visualization for media files, and thought I would share some of my thoughts on how some of the best photo and video sites handle this challenging feature.

I haven’t been to Panaramio in quite some time, so I decided to took their latest version for a spin.  It was originally created in 2005 and sold to Google in 2007.

Since I am not currently a member of site, I wanted to get a feel for how the site is trying to get me engaged, the flow of the sign-up process and their upload process.

I was immediately excited by the fresh, full-screen satellite view and interesting photo.  The inset wide view map was great for orienting where in the world I was visiting.  Unfortunately, I found the experience got confusing quickly.

Continue reading

Liberals, Conservatives and Student Loans

I admit that I believe in fiscal conservatism and currently vote Conservative whenever I can. This post is one example why. The Liberal party, with a whopping 34 seats in parliament (30 more than The Bloc) has no platform to speak of besides a fluffy convention resolution but doesn’t mind dropping a couple catchy sentences about student loans and claiming the government is doing nothing:

To stay competitive on a global scale, the future of Canada’s economy depends on highly educated and skilled individuals in various trades and industries. Yet Stephen Harper’s conservatives aren’t doing anything to help.

“Stephen Harper’s conservatives” also known more respectfully as The Government of Canada, despite being so secretive and sinister, have actually posted their record on this exact subject.  I actually had to spend some time Googling it, since this page wasn’t even linked on their site.  Here’s the meat of it:  Continue reading

Tech, politics, kids and cooking.