Skip to main content

· 2 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.

· 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.

· 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)

· 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.

· One 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.

· 6 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();

· 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.