JonLim.ca
RSS
  • Home
  • About
  • Coding
  • Photography
  • Books I’ve Read

Technology

Jan 25, 2012

Translation of the Letter Rogers Sent Me

Jon Lim Fail, real talk, Rogers, translation Canada, Telecom 1 Comment

Received a letter from Rogers today, announcing yet another price increase for internet and cable TV. They started off with marketing garbage about how awesome they’ve made my service (but actually mean nothing) and threw this in there:

However, over the past year, there has been an increase in the cost of providing you with our services as we continue to expand and upgrade our network and launch enhancements to serve you better. We have taken steps to minimize the impact that these increased costs will have on you. Remember, if you choose to subscribe to more than one service, you may be eligible for a discount.

I’ve gone ahead and translated it into Real Talk™:

In the past year, the greed of our executives and shareholders has increased while our services have stagnated. We like to pretend that we’re doing you a favour by only increasing it by a little bit, but in reality, we don’t give a damn. However, if you decide to throw more money at us, we’d be happy to shave off another dollar! We’ll get it back at the next price increase anyway.

Thanks Rogers, for being the corporate parasite of Canada.

Dec 28, 2011

Don’t Mess with Gabe

Jon Lim Gabe, Ocean Marketing, Penny Arcade Business, Video Games 0 Comment

Image: Penny Arcade – “Real Talk”

Gabe from Penny Arcade about Ocean Marketing:

‎I have a real problem with bullies. I spent my childhood moving from school to school and I got made fun of everyplace I landed. I feel like Paul is a bully and maybe that’s why I have no sympathy here. [...] I will personally burn everything I’ve made to the fucking ground if I think I can catch them in the flames.

Gabe just became one of my favourite people. More so. Seriously, don’t mess with Gabe, or any other Gabe for that matter.

Dec 6, 2011

Goofy Pictures and Reddit

Jon Lim Family Guy, Ollie Williams, The Working Group, weather Social Media, Television 6 Comments

During lunch today, I stood up at my desk and looked across from me and I said “Hey Brian, you know what I want to do? Draw Ollie Williams on one of the windows and have him tell us the weather for the day.” Brian laughed.

Brian always laughs at me.

But he said I should do it, and I was on my way. About 10 minutes later, I had a decent drawing of Ollie Williams up on the window, telling us it was cloudy.

Not bad eh?

Well, I went on to post it on Reddit thinking a few people might chuckle and potentially giving me an upvote. Boy, was I ever wrong.

The image above starts with the final count of the Reddit post as of this writing, and it climbed as high as 20th on the front page of r/funny (that I observed). The imgur stats are staggering: 9 hours up, 141,110 views, and 57.6GB of bandwidth!

I’m glad to have you in our office, Ollie, you’ve certainly made my day a lot more interesting!

UPDATE (12/7/2011): Final stats are amazing. 729 upvotes on Reddit, 198,146 views and 81.12GB of bandwidth on imgur. Madness!

Nov 13, 2011

Secrets of Grindea

Jon Lim Action RPG, Pixel Ferrets, RPG, Secrets of Grindea Video Games 0 Comment

I found this gameplay video of an up-and-coming action RPG called Secrets of Grindea from Pixel Ferrets, showcasing their 4-player co-op. It reminded me of Secret of Mana in terms of art style and gameplay, so I was immediately interested.

I can’t wait to give this a play with my friends.

Nov 13, 2011

Creating an Image with Dynamic Text in PHP

Jon Lim dynamic image, GD, image function, PHP Coding 0 Comment

As Christmas approaches, many of my friends have begun their countdowns to that wonderful holiday at the end of the year.

One of my friends started her countdown back in August, when she opened up her calendar and had to count the number of days until Christmas and continuously keep track of what day it was and where her count was. I told her that I could spend the 5 minutes to help her out using the power of the internets, and that’s how my Christmas page was born.

Today, I spent a bit more time spicing up the page. It now has a Calvin & Hobbes image that has a bunch of static text, but will update the number of days dynamically.

To preface: I had no idea how to do this, and found out that PHP has a rather sizeable GD and Image Function library. I used this example to start:

1
2
3
4
5
6
7
8
9
10
11
12
<?php
 
header("Content-type: image/png");
$string = $_GET['text'];
$im     = imagecreatefrompng("images/button1.png");
$orange = imagecolorallocate($im, 220, 210, 60);
$px     = (imagesx($im) - 7.5 * strlen($string)) / 2;
imagestring($im, 3, $px, 9, $string, $orange);
imagepng($im);
imagedestroy($im);
 
?>

Unfortunately, you can only use some LATIN2 font with imagestring(), and did it fit the style of the Calvin & Hobbes comic I was using, but it was a good start.

In order to load your own font and dictate its size, we can use imagettftext(). I had to include the Comic Sans (Don’t hurt me!) font file in the same folder as the PHP file.

Here is the complete code for my dynamic Christmas image:

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
32
33
34
<?php
// Filename: christmas-image.php
 
header("Content-type: image/png");
$string = $_GET['days'];
$im     = imagecreatefrompng("calvin_resolutions.png");
$black = imagecolorallocate($im, 0, 0, 0);
$font = 'comicsans.ttf';
 
$initialX = '153';
$initialY = '35';
$increaseY = '23';
 
$fontSize = '16';
$fontRotation = '0';
 
$firstline = 'What do you mean';
$secondline = 'there are ' . $string . ' days until';
$thirdline = 'Christmas?! What am';
$fourthline = 'I supposed to do until';
$fifthline = 'then? WAIT?! I am';
$sixthline = 'not a patient man!';
 
//imagestring($im, $font, $px, 20, $string, $black);
imagettftext($im, $fontSize, $fontRotation, $initialX, $initialY, $black, $font, $firstline);
imagettftext($im, $fontSize, $fontRotation, $initialX, $initialY+$increaseY, $black, $font, $secondline);
imagettftext($im, $fontSize, $fontRotation, $initialX, $initialY+($increaseY*2), $black, $font, $thirdline);
imagettftext($im, $fontSize, $fontRotation, $initialX, $initialY+($increaseY*3), $black, $font, $fourthline);
imagettftext($im, $fontSize, $fontRotation, $initialX, $initialY+($increaseY*4), $black, $font, $fifthline);
imagettftext($im, $fontSize, $fontRotation, $initialX, $initialY+($increaseY*5), $black, $font, $sixthline);
imagepng($im);
imagedestroy($im);
 
?>

The positioning of the text is specific to the Calvin & Hobbes image I used, and I made it easier on myself by creating a variable for the X and Y positions as well as the amount I wanted to push the next lines down.

All you have to do now is refer to the PHP file and pass the variables through the URL.

<img src="christmas-image.php?days=<?php echo $remainingDays; ?>">

The PHP file will create a PNG that has the updated text. That was pretty simple, no?

Sep 24, 2011

Games I’m Playing!

Jon Lim blog, Games, Video Games News, Video Games 0 Comment

One of those things that I get asked semi-often: What games are you playing?

I don’t have all that much time for video games, but I do set aside from some time for gaming because it’s a fantastic outlet for me during really stressful times.

That said, check out my new Games I’m Playing page to take a look at what I am playing!

Sep 8, 2011

Quit Hijacking My Typos, Rogers.

Jon Lim Google, hijacking, internet, OpenDNS, Rogers, typos Technology, Telecom 0 Comment

My fingers are fat and stubby, and they can be a little stupid at times. I’m okay with that. I have learned to love them.

However, while surfing at home, my fat fingers occasionally will enter an incorrect or incomplete typo and take me to an error page. It usually looks like this:

Upon seeing this page, an electronic signal is sent, via your Rogers connection, to the brain of one of their executives. He wakes up from his slumber (their executives are in perpetual slumber, due to being so encumbered from all the money they pilfer) and emits an audible “Yippee!”

Our cute and cuddly little executive then falls back asleep, dreaming of his next pillage and plunder scheme. (“Hey, let’s make a bank!”)

If you don’t want to disturb that executive’s peaceful slumber, feel free to jump onto alternative DNS providers such as OpenDNS and Google. (Thanks Jason, Justin, and Moeed!)

Happy surfing!

Aug 29, 2011

Rogers Customer Support Hotline: An Exercise in Frustration

Jon Lim customer support, Fail, Rogers Technology, Telecom 5 Comments

Enough said.

Aug 27, 2011

Google Docs Spreadsheets: Using COUNT with Multiple Conditions

Jon Lim Excel, Formula, Google Docs, Spreadsheet Business, Coding, Technology 0 Comment

This past week, I spent a good amount of time analyzing our current customers with PostageApp and figuring out some of the metrics that we use to determine the health of Postage. Of course, there’s only one tool for the job: a spreadsheet.

Being somewhat familiar with Microsoft Excel, I figured this would be a piece of cake to do on Google Docs Spreadsheets, considering I won’t be doing anything ridiculous. I’d just have to record all of our data and use a bunch of math to figure out some numbers.

Then I hit a snag: I couldn’t count the number of rows if I had more than one condition.

I was using the COUNTIF function to count the number of rows given a specific value inside a column, but it would fail if I tried to do more than one at a time.

I searched for solutions and found quite a few, but many that did not work, especially with Google Docs Spreadsheets. Finally, I stumbled onto a solution: using COUNT with FILTER!

What?

Here’s an example, multiple column data sheet that has some string information along with numeric information:

Let’s say I wanted to get a count of how many rows there were with ’223′ under the ‘Derp Column’ and ‘Herp’ under the ‘Herp Again’ column. (Don’t ask, I’ve been on Reddit far too much.) This is the formula you would use to get that count:

1
=COUNT(FILTER(B:B ; B:B=223 ; C:C="Herp"))

The important part here is the FILTER function. The first parameter (B:B)) is the row or column which you are trying to sort through (should be the one you are applying at least one condition on), which in our case is column B (‘Derp Column’), and any other parameters (as separated by the semi-colon) are conditions which you are applying to filter the row.

The result should be, of course, 1.

You can be pretty flexible when applying conditions. For example, you can also use this to figure out how many rows have a number greater than 100 in ‘Derp Column’:

1
=COUNT(FILTER(B:B ; B:B>=100))

This is a really neat way to quickly sort and count through data programmatically, and I hope it can be useful to those of you who are using Google Docs Spreadsheets to do calculations like I am!

Cheers.

Jul 8, 2011

Away for the Weekend

Jon Lim Canon T2i, electronics, iPhone, Kindle, weekend getaway Blog, Life, Technology 2 Comments

Tomorrow morning, my friends and I depart for a weekend getaway to a cottage for the weekend. I am excited and I cannot wait to eat, drink, and be merry with fantastic company.

I am trying to minimize the amount of electronics I bring along (since I always seem to bring the entire store) and I am only bringing the following:

  1. My iPhone: Not so much for making calls or tweets, but just to be able to stay in contact if necessary and to play all of the music that I have downloaded in preparation.
  2. My Kindle: I am going to spend a lot of time sitting around and relaxing with a cool drink during the day, and what better way to relax than to read my many books?
  3. My SLR: I’m going north to beautiful scenery over a lake with friends. Do I really need to say more?

So it’s still a lot more than most people ever bring along, but I’m a digital native, sue me.

Have a great weekend, folks!

1 2 3 4 5

Back to top

© JonLim.ca 2012 • Themify WordPress Themes