Skip to main content

A little lesson on binding

· One min read

I've been writing JavaScript for the past 10 years for my work, and there are still things in the language that trips me up. A very good example is on binding.

Given the setup below, I would have been a little hesitant as to what the right answer is.

LG has won me over

· 2 min read

About a year ago, I bought my wife and I a new phone for each of us. For her it was a Galaxy Note 5. For me, I got a LG G4.

At that point in time, the G4 was considered slightly below par compared to the Note 5, in terms of price and branding. I had aimed for a V10 but there was completely no news about it being available in Singapore.

Despite being a flagship phone for Samsung, there were plenty of reasons for not choosing the Note 5 then - the stylus problem, the non-removable battery and the lack of external storage. I had no regrets not selecting the Note 5.

Installing Disqus

· One min read

So I've gotten around to installing Disqus for this blog. This post is just a test post for testing the commenting system.

(2023 February note: Disqus was not enabled after the switch to Docusaurus)

Patching with GIF DIFF

· One min read

I've recently had the opportunity to work with some remote teams to collaborate on a project. One question that cropped up was how do I pass the project specific changes to the remote team members without committing the credentials to the repository.

Running SWF Files

· 2 min read

I was recently posed with a question on how to run Adobe Flash files in the browser. As far as I know, you can write a simple HTML page to embed the Flash file (SWF) in a page and load in the browser (http://superuser.com/questions/116352/how-can-i-play-an-swf-file-using-google-chrome). I also recall that any decent browser would be able to load the SWF file as-is without having to do anything extra.

However, loading the SWF file in Chrome on Linux does not work; loading the file causes Chrome to prompt the user to download it - definitely not the reaction I was hoping from the browser. Trying to solve this problem lead to learn a new thing about MIME types in Linux.

Backbone Events

· 7 min read

Backbone events are a powerful way to write responsive user interfaces with fewer lines of codes. This article attempts to give a detailed breakdown of the events and the parameters available for the callback functions.

The results in this article are applicable for version 1.2.3 of Backbone.js

The test is performed by instantiating instances of ExperimentModel extended from Backbone.Model and ExperimentCollection extended from Backbone.Collection.

The model is first added to the collection to test "add" on the collection and then a properrty is set on the model.

var expModelA = new ExperimentModel({ id: 'a' });
var expCollA = new ExperimentCollection();

Back to Basics

· 3 min read

When I started my formal education in computer science, I had to take a module on programming with the C language. I remember this was a module that caused many of my peers to re-think their decision to study computer engineering; the concept of pointers was so foreign to many of them that even the smart ones scored poorly.

AppEngine Header Length Limit

· 3 min read

I rely heavily on Google AppEngine which is a platform-as-a-service (PaaS) offering that I can deploy my apps on without having to worry about the actual server instances powering the application.

Contrast this to infrastructure-as-a-service (IaaS) where I decide on the number of servers to spin up for my application.

The benefit of a PaaS offering is an abstraction of the underlying server stuff (and all the nitty gritty server admin issues).

This is great for the developer because the weight of the server admin hat that you have to wear is made a lot more manageable. The tradeoff for this abstraction is the lock-in that you have to endure as a developer.