I’m always looking for ways to improve my presentations. Oftentimes, I only get one chance to get my point across and I want to make every such opportunity count.
A Lesson from Twitter
Several months back I was addicted to Twitter. Any time I can pull out my phone, I would be checking my Twitter feed.
It's a time waster. Prolific YouTuber Dr Derek Muller describes it as a part of the distraction economy.
A little lesson on binding
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
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
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
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
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.
More tips for BackboneJS
Some time back when researching for Backbone JS stuff (I can't remember for what now), I encountered this post Lessons learned while working with Backbone.js.
This post was written a few years back, but I was still able to glean some gems from it. Specifically, the section "Simplified Object Copying" was something that could be applied on plain vanilla JavaScript.
Backbone Events
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
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.