Ignore changes to file with git

Useful for files like configuration file where you do not want to commit the changes. However, there is a confusion between skip-worktree and assume-unchanged. After reading from FallenGameR post 1, skip-worktree is for developer who want to make changes to the file but do not want git to track it. As the name suggest, assume-unchanged will assume the developer will not make changes to the file so it always assume the file unchanged....

March 6, 2015 · 1 min · Shern Shiou Tan

Empty Array [Js]

How do you want to empty an array in Javascript? Previously, I used to var arr = [1, 2, 3, 4]; arr = []; However this method has a big flaw in referencing. arrB = arr; // arrB = [1, 2, 3, 4] arr = []; // arr = [], arrB = [1, 2, 3, 4] According to [1], there are a number of alternative to empty an array. I prefer:...

February 16, 2015 · 1 min · Shern Shiou Tan

Code to learn, learn to code

Since I started learning to code formally at university, I always have doubt on programming class. Before enrolling into university, I learned to code through books and the Internet. But the programming classes during my bachelor degree were comprise of 4 hours of programming lecture on theory and 2 hours of programming tutorial per week. The classes were utterly boring especially for the lecture. I do not know how effective is the format for others but I personally felt I learn less than 10% in lecture and 40% in tutorial class....

April 6, 2014 · 2 min · Shern Shiou Tan

Function Return

Normally, synchronous function can only returns one value. Therefore, it is better for asynchronous function to follow the same structure (to resolve only one value). In order to return multiple values for each call, it is advisable to use data structure such as array, dictionary…

November 1, 2013 · 1 min · Shern Shiou Tan

Here Comes A New Challenger!

Two days ago at Orlando, Florida, RIM has just announce their upcoming product along with the spanking new Blackberry 10 (BB10). I am biased as I am working with BBX lately, I found that this announcement welcoming. Not mentioning the latest mobile gadget gimmickry, I am more intrigued on the development on BB10 natively. Up until now only iOS officially support app development natively using Objective-C. As for the other platform, Android support native development with NDK (but its awfully ugly when you need to integrate NDK with Java through JNDI)....

May 3, 2012 · 1 min · Shern Shiou Tan