- Calendar -

March 2010
Mo Tu We Th Fr Sa Su
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31

- Archive -

- Browse By Random Tag -

- Most Commented -

- Random Favourites -

- Blogs I Like -

- Email Viruses Received -

- My Geek Code -

-BEGIN GEEK CODE BLOCK-
Version: 3.12
GIT d-- s: a- C++ UL++ P+++ L+++ E--- W+++ N+ o-- K- w--- O- M-- V- PS+++ PE-- Y++ PGP t++ 5+++ X R tv b+ DI+ D++ G e h r+ y+
--END GEEK CODE BLOCK--
Get The Encoder
Get The Decoder

- My Blog Code -

-BEGIN BLOG CODE BLOCK-
B6 d+ t++ k+ s++ u-- f i++ o+ x+ e l c-- --END BLOG CODE BLOCK--
Blog Code Encoder
Blog Code Decoder

- The Internet is Cool -

- Nifty Blog Toys -

RSS Feed

- Content License -

Blog

Transit as Art

This is a beautiful example of what people can do when public organisations like the TTC make their information available to the public for mixing and mashing. Kieran Huggins put this together using data from MyTTC.ca, music from last.fm and coupling it with some OpenGL code, produced this awesome video:

Click here for a larger, prettier version.

Howard Zinn on Modern American Politics and the Future of the Left

Howard Zinn, author of A People's History of the United States talks about an Obama Presidency and how merely electing him will not be enough for real change. For that, we need direct action:

On My Plate

I'm struck suddenly by the number of things to which I've committed myself in my "off" hours:

  1. My Municipal Collective idea
  2. Stephen's girlfriend's site (just HTML layout etc.)
  3. Wordpress fix for Stephen's Civics Education Network site
  4. Mapping project for the VPSN
  5. A complete rewrite of this site (it's been 2years)
  6. A ticket selling project with my brother

Aside from #1, all of the above are technical in nature and require a serious amount of attention. Looks like I had better put a dent in these this weekend.

Lay Off Dion

So Stefan Dion is finally leaving. After a short time in the Big Seat and holding the dubious honour as only the second Liberal Leader to ever not win a federal election, the Long Knives have come out for Dion and he's now effectively on his way out.

And while I can understand the bitterness from the Liberals (they are used to winning after all) I think that they would benefit from a step back before shouldering him with all the blame.

Where do we begin? Was it the gutting of the health care and the environment by the Liberals under Chrétien and Martin? The rise of the NDP and the Greens? What about the sponsorship scandal in Quebéc? Or maybe it was the two generations of disenfranchisement the West has had with the party since Trudeau's Salmon Arm Salute?

The fact is that the Liberals have long been in decline and frankly, they've been completely undeserving of the leadership of this country even longer. They have a lot to answer for and this typical arrogance of their being Canada's ruling party is at the root of their problems. Liberals have to stand up and take responsibility for their actions on health care, the environment, in Quebec and the West. Then and only then will they be entitled to govern this country.

So lay off Stefan. Sure he made some bad calls, but he should in no way shoulder the bulk of the responsibility for the Liberal loss. His party didn't deserve to win. It's that simple.

The Five Stages of Refactoring

Big thanks to Corey for brightening my day with this one:

  1. Disbelief
    • "Who wrote this!?
  2. Anger
    • "I'm not cleaning this up!"
  3. Bargaining
    • "Okay, we'll fix up this module if you promise we'll just rewrite everything else."
  4. Depression
    • "This is never going to get any better."
  5. Acceptance
    • "I'll just create a wrapper..."

Passchendaele Opens Tonight

I've been waiting for this movie for three years.

Paul Gross' new film, "Passchendaele" debuts today and is playing at the Paramount (Scotia) Theatre downtown at 7pm and 10pm. For those interested, Melanie and I will be going down to the 10pm show and you're all welcome to join us.

The National post has a wonderful article explaining the history of the movie and why it's so important that we support it, and for those looking for more detail, the official site has loads of information as well as the trailer.

How the Conservatives Lost Their Shot at a Majority

This wasn't the only reason of course, but a number of political expert-types are pointing to this video as a major reason for their losses in Quebec. Without a good number of seats in Quebec, there was no way for any government to acquire a majority in the House.

Just after Harper made his idiotic comments about arts funding going to "rich people and their extravagant galas", a Québecer published this video on youtube and made some serious rounds throughout the provice as well as across this country. If you haven't seen it yet, it's worth checking out:

Vote: Because You Can

It's that time again. I've talked about this on a few other occasions but thankfully, the subject never gets old. It is, after all, the thin line we've collectively drawn against the dogmas of dictatorship and divine right. In Canada, we assert our collective will and dictate the ideals that will lead us forward. Sometimes we make poor decisions and elect people undeserving of leadership. Often, we vote out of fear, or a lack of confidence in our options. In every single case however, we elect the government we deserve.

I can only hope that in this election, I'm right when I say that we deserve better than we've seen in the past.

Giving Thanks

Inspired by K-dot's similar post, I present to you a list of things for which I am thankful:

  • My family
  • My chosen family
  • My friends
  • My job
  • Good grammar
  • In-suite laundry
  • My view
  • Clean air
  • People who fight for the environment
  • My memories
  • Good pizza and ice cream
  • My health
  • The Creative Commons
  • Harry Potter
  • The rain
  • Free software
  • Bittorrent
  • Wikipedia
  • Grandma's cooking

Stylesheets in Facebook

I wrote a fun bit of code for doing Facebook apps and thought that I would share.

One of the big problems with Facebook's app system is styleising text. You can't include an external file because they won't let you. This leads a lot of designers to write their code directly into the style="" attribute in the HTML. This can get ugly fast, and is the reason external .css files exist in the first place.

To remedy this, you can create the usual .css file externally and then call this helper function to get the job done for you. If you have to use paths etc in it, you can even pass a key/value pair dictionary to it to swap out keywords so that a strings like this:

	background-image: url('http://domain.tld/path/to/some/image.png');

Can look like this:

	background-image: url('[[images]]/image.png');

The call for this type of thing would be just:

	print '
		<style type="text/css">
			'. Helper::css('myStyle', array('images' => 'http://domain.tld/path/to/some')) .'
		</style>
	';

Here's the soruce if you're interested:

<?



    /**
    *
    * Helper functions for the view
    *
    * \author Daniel Quinn (corporate at danielquinn.org)
    *
    */

    class Helper
    {

        /**
        *
        * Simple templating engine for cascading style sheets since
        * Facebook doesn't like the idea of including external .css
        * files.  Instead, we keep the files separate then call this
        * method with a series of key/value replacers if need be.
        *
        * \param  file  Full path for the css to include
        * \param  vars  A dictionary lookup of key value pairs to be
        *               replaced in \a file.
        *
        */
        public static function css($file, $vars = array())
        {

            $in = file_get_contents("$file.css");

            $src = array();
            $dst = array();

            foreach ($vars as $k => $v)
            {
                $src[] = '[['. $k .']]';
                $dst[] = $v;
            }

            return str_replace($src, $dst, $in);

        }

    }



?>

Not revolutionary, I know. But maybe it'll help somebody out there.

pit-faulty