Sunday, 7 December 2014

Some observations on the current trend of UI design

Desktop application

Compared to the UI in Mac OSX, the UI of Linux applications is usually not very attractive, but there are still some UI elements that make the applications a bit better.
  • Minimal border thickness: borders are useful to separate out areas of different functionality. Over the years, we can see a trend of decreasing border thickness to just a line.
    For example, the Arduino application on Linux has no border thickness between the tool bar and the tab pane. It has a border between the editor the status bar, which, in my opinion, could be reduced. 
    The Chrome app is another example with thin lines as borders.

Tuesday, 24 June 2014

Tibetan Dance

Thursday, 24 April 2014

Sparse coding

An ordinary least square regression does not apply regularization on the parameters we try to estimate. Often we regularize the optimization problem. This practice is know as shrinkage in statistics. The classic regularizer is the squared \(l_2\) norm of the parameters to estimate. This results in the familiar ridge regression problem.

Lasso stands for "Least Absolute Shrinkage and Selection Operator." It replaces the 2-norm in ridge regression with a 1-norm. Lasso is often used in sparse coding because it provides a sparse solution in the sense that many parameters are zero for large enough regularization factor.


Wednesday, 26 March 2014


CRF formulation

  • A CRF model consists of
    • F = \(<f_1, \ldots, f_k>\), a vector of "feature functions"
    • \(\bf{\theta} = <\theta_1, \ldots, \theta_k>\), a vector of weights for each feature function
  • Let O = \(<o_1, \ldots, o_T>\) be an observed sequence
  • Let A = \(<a_1, \ldots, a_T>\) be the latent variables
$$p(A = y | O) = \frac{\exp (\theta \cdot F(y, O))}{\sum_{y'} \exp (\theta\cdot F(y', O))}$$


Sun protection

Sun protection products experience

  • Kiehl's Vital Sun Protection: has Avobenzone which can produce radicals under photolysis. But this ingredient is very common in other products that are based on chemical sun projection, like La Roche-Posay sun screen with SPF 60. So far, I quite like Kielh's sun protection products be it the moisturizer with SPF15 or the pure sun screen. The biggest plus of Kiehl's sun screens is that it's not very oily.

How to choose/use sun protection products

  • Better to use none oily and nonacnegenic products
  • Need UVB and UVA broad spectrum protection.
  • SPF indicates the time you can stay under the sun without getting a skin burn. Normally it takes 20 minutes to produce redness on a light skinned individual. Multiply this number by the SPF of your product. Example: with an SPF 15 x 20 minutes of sun time = 300 … is how many minutes you can stay in the sun without burning. 300 minutes divided by 1 hour of 60 minutes = 5 hours of sun protection without a sunburn. So SPF 15 seems to be enough for a normal day for sun exposure on the way to work. If you go out during the middle of the day, maybe you can reapply some sun screen. SPF 25 will give 8 hours of sun protection which is enough for a day. 
  • The amount to apply is important as well. The SPF is determined based on 2mg/cm^2 usage. This is roughly the size of a coin for face. Japanese brands are usually more liquid, so usually we need 2 times the size of a coin for the face.
  • Too much sun screen, can cause burden to the skin as well: clogging the pores if the product is thick and oily. Seems like using moisturizer with SPF 15 is OK in winter and SPF 25 is necessary in the summer. If you are going outdoor for a longer time, use SPF30+.
  • Sun screen active ingredients:

Recommended products

  • Neutrogena Pure & Free Baby Sunblock Lotion SPF 60+ with PureScreen

Other resources

Tuesday, 25 March 2014

CoffeeScript coding standard


  • Prefixing names with '_' for private methods and member variables.