New work: Night Terrors Run

Night Terrors Run


I made a website for the first time in a hot second.  It’s for my friend Aimee who has a bad ass running club called The Night Terrors, which is in Toronto.

The site is pretty bad ass.  It compiles the last 30 or so images (it varies strangely…) from Instagram with the hashtag #nightterrorsrun and posts it.  To do this, I used Instafeed.js which is so easy that even I could do it.

To keep it ghetto, we hosted it on Dropbox, which explains the horrendous redirect.  Aimee’s registrar doesn’t allow domain masking.  I already knew how to do it in the past, but if you’re looking for a pretty good guide on how to do it, check out this guide from Sican Studios.



TOJam – Friday May 3rd!

A clip from our video game with a character not inspired by Arnold

TOJam  is coming up in about a month and I can’t wait.  I’ve already hollered at the people that I worked with during Toronto Global Game Jam to give it another shot.  There is something with the 48 hour format that is so attractive – the catharsis at the end of the weekend is something that I don’t really get from anything else in my life.

Anyway, while we’re on the topic, I haven’t blogged about my previous experience at the Toronto Global Game Jam.  I had a really amazing time working with a really impromptu team that was made at the last second.  I think everyone really pitched in with any skill that they could provide and strangely, we were one of the few teams that actually finished our game.

Check out the game that we made here!  We were actually fortunate enough to have the game actually featured on the Melon JS website for the framework that we used to make the game.  Any press is good press!  Hopefully I’ll see you all at TO Jam!

Using Sentiment Analysis To Improve the Luongo App

Oh not, not another goal let in by Luongo

So last night, Benji and I really stepped the Luongo app game up to another level by adding sentiment analysis in deciding what people were thinking.  Before, our main algorithm was really elementary and only detected people who tweeted the words “luongo” and “fault” and then counted all the tweets that had the word “not”.  We would then compare the number of tweets that had the word “not” (indicating that people didn’t think it was his fault) with the number of words without the word “not” (indicating that people did think it was his fault).

Here’s a snippet of the code so you see exactly what it’s doing:

results = tweepy.Cursor(,
q="luongo & fault",
for r in results:
#print r.text,
# r now contains one tweepy result object
if r.text.find(u'not') > -1:
n += 1
nn += 1
count += 1
if n > nn:
print "That was luongo's fault"
print "That was not luongo's fault"

Pretty basic.

Now, what we’ve done is we actually take the data that we get from the Twitter API and send it to another API called Sentiment 140 to do sentiment analysis on all of the tweets featuring the word Luongo.  Sentiment 140 will analyse each individual tweet that says if it’s a positive, negative or neutral tweet and then we count up that value like before.  The reason that this is better is because Sentiment 140 will actually look all words within the tweet which contain positive or negative values instead of just looking for only the word “fault” as a subject and “not” as the counter indicator.  For example, the following is a snippet from the JSON response from Sentiment 140.  It’s ranked as a negative tweet (negative tweet has polarity = 0):

Sorry we broke your goalie, mister. #Luongo #Canucks Go #Bruins”,”polarity”:0

Here’s a tweet that’s ranked as positive (postive tweets has polarity =  4:

@loveforthree Pretty good for a team that needs Luongo…”,”polarity”:4

So asides from showing that Bruins fans are terrible, Sentiment 140 does an excellent job at figuring out whether a tweet is positive or negative, especially compared to our previous algorithm.  There’s a couple of challenges that we’re facing, which is whether we’re only reporting on tweets with the word “fault” in them, or just assume that any tweets that are positive and negative during a game will generally have some bearing on the number of goals scored.

Our next step is going to be importing this script to a server so you can all start accessing it during games!  It’s gonna be cool.


Geeking out with Python – Was That Goal Luongo’s Fault?

Was that goal luongo's fault?

As some of you may know, I’ve been taking Computer Science 101 on Udacity, which is an online university which I think is fucking awesome.  Their structure of 1-5 minute youtube videos with quizzes shoved in the middle totally works for me compared to stuff like Coursera and MIT Open University.  But hey, what doesn’t work for me might work for you and vice versa.

Anyway, I’ve been relearning python (which I took in “real university”) and it’s been pretty interesting.  Udacity’s first unit is actually way more difficult than the entirety of my CS class, which I found pretty surprising.  The main thing that Udacity is really clear about is that programs are really just problem solving broken down into very basic steps.  That’s probably worth the price of admission alone (which is $0.00).

Late one night while watching a Canucks game, I found myself having a problem that I always seem to have which is whether the goal that was let in Roberto Luongo was actually his fault, or if my bias was blinding me.  Then it hit me.  What if we could create an app that would go on twitter and tell me whether people online thought it was his fault?  And that’s exactly what we did.  After signing up for the Twitter API key, we got to work hammering on the Tweepy module and started to build code on previously documented code.  It only took about an hour to build the first alpha version of the code, but holy shit it was the most exhilarating thing I’ve ever done on a computer.

We’re going to improve the algorithm that calculates the mood of twitter, but for the time being the code has spoken:

result of luongo app


Diving in face first with LAMP – Part 4: I fucking did it

First look at my LAMP Blog

From what I hear, men do not have the ability to give birth so I’ll just have to assume that this is what it feels like.  After a long ass time of fiddling with stuff, I have finally created my first blog on a LAMP stack.  Disclaimer: I did not write the PHP myself, I just copied and pasted it from this Cutting Edge Tech (which was an awesome guide!).

So why was this project important? Well, asides from proving to me that dreams can come true, building this blog really taught me how front-end development and back-end development come together to make the websites that we know and love.

It’s a lot like when I first started watching skateboard videos.

When I watched my first skate video, my mind was blown in a way that could never be unblown again.  Up to that point, my skateboarding experience consisted of rolling outside of my friend Daniel’s house or the skateboard park at the local park.  The Tiltmode Army video (that I got from Westbeach on Boxing Day) was the very first time that I saw “street skating”, which was people doing tricks on the street.  From that day forward, I never saw architecture the same again.

That set of stairs? Perfect for a 360 flip.  That rail? Dying for a kickflip to crooked grind.  Everything on the street became a canvas for what trick could be done on it.  Even to this day, I’ll see a big ass handrail on the street and thing of what awesome trick I would love to see be done on it.  I think that building a blog with a LAMP stack is the same thing.  I can see how things are made.  Wordpress?  Looks like PHP linked to MySQL with some nice CSS on top.  Facebook?  Looks sorta like PHP and MySQL but crazier.  I’m probably not entirely right, but at least now I have a glimpse into the interactions between the front-end and the back-end and how information is retrieved and stored.

I’m barely scratching the surface of what it takes to see a web app and see how that problem is being tackled, but I am starting to sort of get it.  It’s been a really rewarding experience to bang your head against a wall for so long and finally see something come of it.  I’m already googling other easy PHP/MySQL projects to do for the future and I hope I get even more skilled at how to do this stuff.


Thanks IBM support chat. You are the worst.


The following is a completely real chat between me and IBM Websphere is fucking terrible

Chat InformationPlease wait for your IBM Sales Consultant to respond.
Chat InformationYou are now chatting with ‘Brian P.’
you: Hi Brian
you: I have a quick question about the eCommerce Edition of Websphere
Brian P.: Welcome to IBM’s Pre-Sales Chat.
you: I’m compiling a report regarding the features of websphere
you: I want to know if Jquery sliders, as well as other Jquery features are enabled by default
Brian P.: To be honest, your best bet is to use Google.
Brian P.: It is the easiest way to find information
Brian P.: I used IBM Websphere%Jquery sliders and found information
you: What is google?
you: Sorry, what is a google?
Brian P.:
you: is this a feature of websphere?
Brian P.: No, it is an application online that helps you find information
you: so if I buy websphere, I will get this google
Brian P.: Sterling Commerce was execellent at adding information to the web
Brian P.: No, Google is a search engine for information
you: So how do I buy a google
Brian P.: Google is a search engine only
Brian P.: Go to
Brian P.: For information only
you: I just had a word with my boss, and she is very interested in buying a google for our enterprise
you: How much is this engine?
Brian P.: This search engine is free
Brian P.: go to
you: We do want the IBM google
you: We don’t trust such an unknown company, we prefer to work with IBM
Brian P.: Ok, may I have your name, company name, and address?
you: Thank You Brian P, I have all the information I require. much success.

Raspberry Pi + XBMC = great hacking fun

Raspberry Pi


After months of hearing about this device from blogs and on reddit, I finally was able to get my hands on one of these devices from my coworker.  I spent the better part of yesterday trying to get Raspbmc, a linux distribution based on XBMC on my device and for something that cost $35 dollars, I’m tremendously impressed with how well it’s performing.  That’s not to say that there aren’t any flaws (you can’t really change the fact that the device is, and always will be slow) but it’s definitely a fun project for anyone that’s interested in stepping their linux game up.


Canucks game on SportsDevil

I was able to get everything up and running and was able to stream some of the canucks game using the SportsDevil add-on.


Highly recommended!


Diving in face first with LAMP – Part 3: Good is the enemy of great

That time Marge Simpson is in police training and climbs over a wall when there's a door.

After a couple hours of trying to manually install the LAMP stack, I’ve officially decided to give up on the manual install and just use TASKSEL to do it for me. TASKSEL is a command that will automatically do very common tasks, such as setting up servers, installing common programs and, of course, install a LAMP server.



Here is literally the only line you need to type in order to set up a LAMP server:



sudo tasksel install lamp-server



Why did I give up on setting up the LAMP server manually? I’ve decided that the level of headaches from setting up the server manually in Ubuntu was just not worth the amount of time that I was losing from not advancing in learning. Every minute I spent investigating why things weren’t working was making me jaded and contributed to the slowing pace and interest in completing the overall goal of writing my own blog in PHP.


I’ve always had an ongoing inner monologue about actually knowing everything about a certain task and knowing enough to be proficent at doing the task. For example, when I first started playing bass guitar in high school, I taught myself how to play specific songs using tabs which taught you where to put your fingers rather than learning musical theory. I got good enough at some songs to the point where I was able to play in front of my high school for a lunch time concert. However, I was overwhelmed with the constant feeling that I was a huge fraud and that I was basically guitar-heroing and not really a valid musician (a massive concern when you’re a kid in high school).


I ended up saying “fuck it” and sold my bass guitar on craigslist.


Flash foward to a couple years ago when I first started cycling. I was convinced that I wanted to build my own bike from scratch, until I learned that the holy grail of being a bicycle mechanic was the ability to build a wheel. Now, building a wheel is something that requires an insane amount of concentration and precision – but most of all experience.  Almost all tutorials of wheel building will stay that a wheel is properly tensioned when it “feels” right or, I shit you not, it “should be a G [musical note] with plain-gauge spokes and an A [musical note] with butted spokes” when plucked with your finger. Clearly, that is fucking insane.  After a couple of months, I once again was like “fuck it”, but instead of giving it up I just bought a set of wheels on ebay and was able to get on the road. Ever since then, I’ve become an avid cyclist.


I learned that you shouldn’t let the egotistical act of being an expert stand in the way of actually doing something. Hopefully, by building a LAMP stack the easy way (with 1 command) will allow me to actually continue to learn more about developing and keep moving foward.

Building a game in 48 hours at the Toronto Global Game Jam!


The coolest thing I’ve heard about this year is the Toronto Global Game Jam!  For 48 hours, over 300 people are going to be gathered in teams to build a new game from the ground up, with hundreds of cities around the world doing the same thing on the same weekend.  I have no idea what is going to happen, but it sounds like a nerd fest of epic proportions.  I’m looking for a team to join, so if you are looking for someone with some product and writing skills – shoot me an email @ contact (at)

For more info, follow @Torontoggjam and @IGDAToronto on twitter – see y’all there yo.

Diving in face first with LAMP – Part 2: I only know how to do this command and the command immediately after be a linux user.
Immediately, I’m running into issues with Linux.


I really like the command line interface, it really gives you a direct sense of what the computer is doing.  For example, if you’re using Microsoft Excel and trying to open a massive file, the app will just freeze and you’re not sure if the program is working or crashing. For me, the best part is that if I type in a command and I get the next line returned, it worked.  And it’s also really cool to type all this stuff and have your screen explode in text like you’re hacking the Pentagon. 


The downside for me is that if it doesn’t work, you’re shit out of luck.  Since I’m working off a tutorial, any outdated information or any sort of situation that isn’t outlined is going to completely derail this entire process.  But I guess that’s technically the fun part.

Continue reading →