Archive for the ‘Blog’ Category

Book Review: Relentless by Tim Grover

Monday, May 13th, 2013

9781476710938This is Tim Grover’s list of what he thinks will get you from being good to “great”. Tim Grover has helped several elite athletes who are already very good (mostly basketball players) become the best. To name a few, his clients include Michael Jordan, Charles Barkley, Kobe Bryant and Dwyane Wade. So obviously he knows a thing or two about what makes these athletes the best at what they do. And a lot of them have attributed their success to him, so he does have clout in this area.

When I started reading the book and got to his list, it became very clear to me how most of them are pretty obvious – such is the case with most self-help books. But it has a certain edge to it, because it is very direct and honest – and even though they are obvious, for reasons I can’t comprehend myself – most of us choose to ignore these basic principles and try to make compromises along the way. And for the first few pages, I became engrossed and truly immersed in the book but then I read further and the more I read, the more I feel like it has quite a few points that I can’t possibly agree with.

Am not sure if it was Tim’s intention to portray it that way or if it’s just my perception but he basically classifies somebody who is relentless to a guy who focuses only on this one thing – and one thing only — and that is to excel in whatever his profession is. You are so obsessed with winning that it basically just takes over your life — you form a shell around you and you use everybody else (your teammates, or co-workers) as pawns to achieve your goal. I know these people exist and for the most part, they are better at their craft than everybody else – there are quite a few who are exceptional. But all of these people are jerks, they treat everybody else as inferior to them and they generally don’t make good husbands/fathers. I’m sure Tim doesn’t intend to turn otherwise “nice” people into jerks but I feel that a few of them after reading this book will become just that.

For the most part though, I get what he is saying – You work and push yourself harder than everybody else – you hold yourself to the highest standards imaginable and you don’t let external forces get you down. Easier said than done, that is why I feel that most people will just ignore this main principle and instead, follow the other rules – such as the ffg.:

  • You have a dark side that refuses to be taught to be good.
  • You’d rather be feared than liked.
  • You trust very few people and those you trust better not let you down.
  • You don’t recognize failure, you know there’s more than one way to get what you want.
  • You don’t celebrate your achievements because you always want more.

This book is so full of cliches, it is amazing that nobody found it corny – except me. I for one, also do not agree with most of what he said regarding the list above. Yes, there would be times when you need to assert yourself and be dominant. But it really depends on the situation – you can’t expect others to respect you if do not respect them. To gain respect, you need to prove that you are worthy of it . . . Michael Jordan didn’t come out of college and start yelling out at his teammates – it took time. That is why I feel like Kobe was arrogant when he pushed both Shaq and Phil Jackson out the door — according to Tim, that is the “Cleaner” attitude. But as you recall, Kobe needed Phil Jackson to win the titles he’s won after Shaq, he really couldn’t do it himself and he had to learn that the hard way. You can’t apply the “Cleaner” attitude in all situations . . . especially to your wife, if you value your marriage.

Overall, I think it is a good book but you would have to know when to draw the line . . . Tim doesn’t offer any insight on where that line may be. In fact, if I understood him correctly, there shouldn’t even be a line . . . there are no compromises on the path to greatness . . . or to being a complete ass.

Blogging at 30000 ft above ground

Sunday, March 17th, 2013

As I write this I’m somewhere in the skies near Florida. It’s amazing how you can get internet up here . . . Just wanted to write something coz I got nothing better to do.

Infographic Wednesday

Wednesday, March 6th, 2013

I love coffee so much and the occasional tea once in a while that I just have to share this infographic . . .

Hackathon . . .

Wednesday, January 30th, 2013

There is an upcoming weekend hackathon that is extremely interesting to me – it’s the Hacking Health hackathon in Vancouver.

According to their website, this event is a national organisation dedicated to fostering collaboration between health and IT experts. It’s basically an event where healthcare professionals meet technology experts to discuss and collaborate over IT solutions to solve meaningful problems and make a difference in the health of patients and communities.

Why this strikes a chord within me is because I almost went to medical school and in fact, my major in university is actually Medical Technology. I have always thought of merging my technology skills with my knowledge of the health/medical sector and this is the perfect event to do just that.

Online Learning

Wednesday, January 9th, 2013

There have been several recent developments in the e-learning space and the experience is becoming less daunting and friendlier. The courses are also becoming more immersive and increasingly interactive – social features also give the user the impression that they are part of a classroom instead of being isolated and independent. I have taken paid and free courses online and a few of the free online courses are surprisingly better.

I love Codecademy. You learn at your own pace and they have been adding tracks at a dizzying pace the past couple of weeks. The hands-on coding exercises are great and the discussion forum serves as a way to interact with users taking the same tracks.

I have also tried Coursera and must say that the courses there are very intensive and quite a few give you credit via a certificate or letter of attendance. Main difference here is that courses run on a set schedule and you must be able to complete a week’s worth of coursework to keep up. It does take more discipline to finish assignments before deadline and you are required to grade your peer’s assignments as well.

I’m also delighted with ixl.com with regards to supplementing my daughter’s learning at school. It provides several math exercises based on the school curriculum. It is very well designed and my daughter loves the immediate feedback. So instead of generating your own practice questions, IXL provides the questions and based on how well your son/daughter is doing – it adjusts the difficulty level automatically.

The future of e-learning is looking very promising indeed and perhaps there will come a day when this would be how the majority of people get their education.

Holiday Greetings . . .

Tuesday, December 18th, 2012

It has been quite a while since my last post. I have been busy doing mostly email campaigns for the past 2 months and the holidays are fast approaching so things are kind of slowing down. It has been a productive year for me as well – I have started on a new diet regimen (no soda, no wheat, no rice) and have been exercising religiously for the entire year . . . My 2 year old is still keeping me busy at home so I don’t really have a lot of free time but I do enjoy being a father once again.

This will most likely be my last post of the year so have a happy holiday season and check back in the new year!

[UPDATE] Here’s some holiday cheer

Put a Flickr feed into your page

Friday, October 19th, 2012

I found a jquery plugin that puts your Flickr public feed into your website. Shoutout to the developers of this fine plugin!

Now let’s get straight to the code:

This is how you call the plugin:

$('#gallery').jflickrfeed({
	limit: 14,
	qstrings: {
		set: '72157624900621129',
		nsid: '7375559@N02'
	},
	itemTemplate: 
	'<li>' +
		'<a href="{{image_b}}"><img src="{{image_s}}" alt="{{title}}" /></a>' +
	'</li>'
});

Where set is the set id that Flickr assigns to each photoset you create . . . to get this number, simply go to your Flickr homepage and click on a photoset. Once you are looking at your photoset, the URL should look like this – http://www.flickr.com/photos/USER/sets/############/ – the numeric digits at the end of this URL is the set id. The nsid parameter is your Flickr ID, it is a bit tricky to get this information but go to this page and it should show you your Flickr ID.

You can bundle this with jquery Cycle for slideshow presentation or with jquery Colorbox for a nice photo gallery. Here is a more in-depth demonstration with code samples.

Plugin Options

Here is a description of each one:

  • flickrbase: This is unlikely to be needed.  It is used to set up the url the jQuery AJAX call will need to be made to.
  • feedapi: There are a number of feeds that flickr makes available.  The default is the public feed.  Here is the list of all that are available: http://www.flickr.com/services/feeds/. This has only been tested on feeds that return photos.  So, for example, don’t expect good results using this plugin on the Forum discussion feeds.
  • limit: Set how many items you want to loop through.  Flickr seems to limit its feeds to 20, so that is the default.
  • qstrings: This is the most important setting. This is used to request the correct feed.  In my examples I use this to set the user id.  These are automatically added to the request url. Depending on which feed you use (http://www.flickr.com/services/feeds/) there are different sets of query parameters available: http://www.flickr.com/services/feeds/.
  • cleanDescription: Flickr puts all kinds of junk in the description it returns. By default this plugin is set to remove everything but the plain photo description.
  • useTemplate: Set this to false if you don’t want to use the plugins templating system.
  • itemTemplate: The template rules are described below.
  • itemCallback: You can add a callback on each item.  The scope is set to the container and the item object is made available.

Template

In order to make it really easy to use any kind of markup needed with this plugin, a simple templating system has been build in. Here is an example of a template:

<li>
   <a href="{{image_b}}"><img src="{{image_s}}" alt="{{title}}" /></a>
</li>

You can see that this is just basic html with a few special tags mixed in. All of the tags are surrouned by double curly braces. The plugin works by putting in the correct information for each tag and each item into the template.

The tags that are available depend on what flickr returns for each item. For the Public Photos API these are: title, link, date_taken, description, published, author, author_id, tags, and image. For the image property, the plugin uses the Flickr URL scheme to make several sizes available.

Image Sizes

The letter suffixes are as follows: (ie {{image_b}} where the image size returned is 1024px wide/tall)

  • s small square 75×75
  • q large square 150×150
  • t thumbnail, 100 on longest side
  • m small, 240 on longest side
  • n small, 320 on longest side
  • – medium, 500 on longest side
  • z medium 640, 640 on longest side
  • c medium 800, 800 on longest side†
  • b large, 1024 on longest side*
  • o original image, either a jpg, gif or png, depending on source format

* Before May 25th 2010 large photos only exist for very large original images.
† Medium 800 photos only exist after March 1st 2012.

The Callback Parameter

The plugin’s second parameter is a callback. This has the scope of the containing element and has the entire data response available. This is a great feature if you want to integrate this plugin with others. Let’s say you want to integrate it with colorbox. If you call $(‘selector’).colorbox() and then this plugin it won’t work. This is becuase the plugin is adding elements to the page after the colorbox call. This is even true if you call colorbox after this plugin. Since this uses ajax, your images won’t be added to the page until well after most of your javascript has run. (In computer time).

Instead, the trick is to use the callback function. This allows you to pass in code that you want to run after the images have loaded. So for example, you can do this:

$('#cbox').jflickrfeed({
	    limit: 14,
	    qstrings: {
	        id: '37304598@N02'
	    },
	    itemTemplate: '...example...'
	}, function(data) {
	    $('#cbox a').colorbox();
	});

Download

Download the demo and code.

Twitter feed (blogger.js) not working . . .

Monday, October 15th, 2012

[UPDATE] As of June 2013 – This no longer works, am sure there is a workaround but I have little to no time going around trying to fix this so instead, I’m going to hang it up and use Twitter’s official widget (which I should’ve done from the beginning) – https://dev.twitter.com/docs/embedded-timeline

If you have used Twitter’s blogger.js script to show your twitter feed on your website, then you must’ve noticed that it suddenly stopped working a few days ago . . . this is because Twitter has updated their API . . . so now, you would need to update the script below:


from
<script type="text/javascript" src="http://twitter.com/statuses/user_timeline/USERNAME.json?callback=twitterCallback2&amp;count=2"></script>
to
<script type="text/javascript" src="http://api.twitter.com/1/statuses/user_timeline.json?screen_name=USERNAME&include_rts=true&count=2&callback=twitterCallback2"></script>

where USERNAME would be replaced with your twitter username.

Blackberry Jam

Friday, August 31st, 2012

If you are wondering about the title of this post and if you guessed the smartphone instead of the substance you spread on a pb sandwich then you are correct. Yes, RIM might be flailing and kicking but they have just booked the Four Seasons in Vancouver for a day to host this event (probably their last?). I had the opportunity to attend this event mainly because they had a separate web track that discusses HTML5 and how it can be used to develop for the Blackberry platform but more importantly for other mobile devices as well.

Some of the more notable frameworks discussed were jquery mobile, sencha touch, dojo toolkit and zepto.js to name a few. The idea is to build these out and skin them using bbUI.js to make it look as close to a native BB app as possible by using the same graphical elements. You could take this further by using either WebWorks or Apache Cordova to build/package it as a native app.

If any of your are interested, Blackberry has released these presentations to the public and I have also made them available here:

  1. Building HTML5 Apps with Native Capabilities
  2. Advanced BlackBerry HTML5 Development: WebGL and Remote Web Inspector
  3. How to get that Native Look and Feel using bbUI & Alice.js
  4. Making the Most of Existing Public Web Development Frameworks
Dev Alpha device

Blackberry 10 Dev Alpha

They also gave up Blackberry 10 Dev Alpha devices. These look fairly OK but they don’t function as good – I know they are evaluation devices but I had no idea how far off Blackberry 10 is . . . the OS is laggy, boot-up time takes forever and it crashes quite a bit, battery isn’t very good either and it takes so long to charge. I have almost given up on mine . . . it is like paperweight . . . how can you test on it if it won’t stay on long enough? The browser crashes very often as well . . . to me, it seems like they are pretty desperate. To send out a half-baked OS on a device and courting developers to develop on it?? As the market currently stands, the Blackberry platform is on life-support and this doesn’t really give developers confidence in the product, how do you expect them to waste their time to develop for it?? Well, one upside to it all is that the screen looks pretty good . . . hope somebody develops a good music/video player so I can make use of it.