Randy Pausch – Time Management

Just as the Randy’s Last Lecture was inspiring, I found his lecture on time management even more useful, perhaps because I had such poor time management skills. The lecture contains lots of nuggets of wisdom that are practical and easy to follow. You might want to also download the power point slides to accompany when watching the lecture.


Randy Pausch – Living life to the fullest

Randy Pausch is lecturer at Carnegie Mello University. He is full of life, exuberance and humor. And he is dying from pancreatic cancer. Watch his uplifting and inspiring “Last Lecture” to find out about his message on living life to the fullest, a video that has been downloaded several millions times over the web. Alternatively, you can watch the shortened version of Randy’s talk on the Oprah Winfrey show.

Ant and Grasshopper – The Malaysian version

I got this interesting forward from a friend:

Older Version

The Ant works hard in the withering heat all summer building its house and laying up supplies for the winter. The Grasshopper thinks the Ant is a fool and laughs, dances and plays the summer away. Come winter, the Ant is warm and well fed. The grasshopper has no food or shelter so he dies out in the cold.

Modern Version

The Ant works hard in the withering heat all summer building its house and laying up supplies for the winter. The Grasshopper thinks the Ant is a fool and laughs, dances and plays the summer away.

Come winter, the shivering Grasshopper calls a press conference and demands to know why the Ant should be allowed to be warm and well fed while others are cold and starving.

TV1, TV2 & TV3 show up to provide pictures of the shivering Grasshopper next to a video of the Ant in his comfortable home with a table filled with food.

The majority of the Malaysian Parliment is stunned by the sharp contrast. How can this be that this poor Grasshopper be allowed to suffer so?

Khairy stages a demonstration in front of the Ant’s house. Nazri goes on a fast along with other Grasshoppers demanding thatGrasshoppers be relocated to warmer climates during winter. Most of the related people criticize the Malaysian Government for not upholding the fundamental rights of the Grasshopper.

The local newspaper & the Internet are flooded with online petitions seeking support for the Grasshopper (many promising Heaven and Everlasting Peace for prompt support or the wrath of God for non-compliance) .

Deputy Minister immediately passes a law preventing Ants from working hard in the heat so as to bring about equality of poverty among Ants and Grasshoppers.

Hishammudin makes ‘More Special Reservation’ for Grasshoppers in Educational Institutions & in Government Services.

The Ant is fined for failing to comply with 30% sharing and having nothing left to pay his retroactive taxes; its home is confiscated by the Government and handed over to the Grasshopper in a ceremony covered by maju ———.

Prime Minister announces to the whole Malaysia that this is part of the NEP and all have to respect, no questions asked and have to follow it.

Many years later…..

The Ant has since migrated to the US and set up a multi-billion dollar company

100s of Grasshoppers still die of starvation despite reservation somewhere in Malaysia and because of losing a lot of hard-working Ants and feeding the Grasshoppers, Malaysia is still a developing country!

All because the ANTS are still doing their work.

Laptop stands

Ever since I saw my friend’s laptop stand (Ergo-Q by Bakker Elkhuizen), I have become convinced that one is needed to alleviate my neck and shoulder ache problems, which is probably due to me constantly hunching over the laptop.

Problem is that there are simply too many options available. So I decided to list down the features I needed in order of importance:

  1. Usability – should raise laptop to at least my eye height
  2. Portable – light weight and slim to fit in my laptop bag
  3. Design – material that helps my laptop to cool faster
  4. Stability – must withstand my occasional bumps and accidents
  5. Price

I was lucky to come across Laptop Stands UK website which displays the pictures, specification and price of many laptop stand products (but strangely not those by Bakker Elkhuizen). Along with this website and googling, I narrowed down to the following models that met my criteria

  • Logitech Alto has a very nice integrated keyboard, stand and USB hub. There is also no indication as to the maximum tilting angle for the laptop stand and if it will allow variable height settings. The combined keyboard and stand appears to be useful but I am not sure if the laptop would wobble as I type on the keyboard due to the integrated nature of this product.
  • The Cool Laptop Stand which I later discarded as I was unsure if it allowed me to vary the height of the laptop and I was not sure on the stability issue. Plus it looked like something I could build myself.
  • U Top which is the cheapest of the aluminium fold-away stands
  • Lapjack which has a nice integrated document holder

For the more adventures DIY person, you might want to try building your own laptop stand but perhaps with different material that might better conduct heat.

PS: I ended buying the Ergo-Q for about half the retail price from ebay. I been using it for the last 6 months (yes, this this post was drafted more than 6 months ago) and extremely happy with it as it has significantly reduced my neck, shoulder and back pains from using the laptop. I would happily recommend this product to anyone without hesitation.

Minimum salary required to maintain a family in Malaysia

What is the minimum monthly salary a Malaysian person needs to earn to sustain a young family? Here are my estimates assuming the young family consists of a working father, a housewife and two dependent children.

  • RM1200 – Meals (30 days x 4 people x RM10 per person per day)
  • RM750 – Monthly house repayment (low cost housing for 30 years)
  • RM500 – Monthly car repayment (proton sage for 7 years)
  • RM300 – Petrol and road tax
  • RM300 – Children’s education fees
  • RM200 – Monthly insurance and medical bills
  • RM100 – Electricity and water bill
  • RM100 – Phone bill
  • RM150 – Miscellaneous

That totals to RM3600 per month. Assuming the EPF rate of 11% and approximately around 9% income tax, the working father has to earn a gross salary of RM4500 to have a take home salary of RM3600.

When trying to figure out the income distribution, I came across this article from Aliran published in 2004 that tries to address the same question I posed here. While I believe their estimates are more conservative and simplistic, the conclusion is similar.

Using their household income pyramid with my estimates shows that only slightly over 10% of the population earns RM4500 and above.

Visualizing missing values

Much of statistic analysis of data containing missing values requires the assumption that missing values are missing at random. Yet, it is common for many people to simply assume this without any check. It could even be difficult with high dimensional data where eyeballing a small section at a time could miss out consistent pattern.

Here I will show an easy way to quickly visualize the missing values for a matrix or dataframe in R. It also helps to identify any alignment issue in the data.

plot.missing <- function(mat, sort=FALSE, main=”Location of missing values”, …){

image2 <- function(m, …) image( t(m)[ , nrow(m):1 ], … )

mat <- 1*is.na(mat)
if(sort) mat <- mat[ order(rowSums(mat)), order(colSums(mat)) ]

image2( mat, col=c(0,1), xaxt=”n”, yaxt=”n”, main=main, … )
box(); grid(col=4)
ticks <- c(0,0.2,0.4,0.6,0.8,1.0)
axis( side=1, at=ticks, labels=round(quantile(1:ncol(mat), ticks)) )
axis( side=2, at=rev(ticks), labels=round(quantile(1:nrow(mat), ticks)) )

Next, we create some artifical data to run the codes through it.

m <- matrix( rnorm(500000, mean=1.5), nc=50 ) # 10,000 individuals and 50 questions
m[ m < 0 ] <- NA
m[ sample(1:nrow(m), 7000), 11 ] <- NA
m[ sample(1:nrow(m), 8000), 35 ] <- NA
for(i in sample(1:nrow(m), 500)) m[ i , sample(1:ncol(m), 40) ] <- NA

and execute the codes:

plot.missing(m, sub=”Original positions”,ylab=”Individuals”, xlab=”Questionaire number”)
plot.missing(m, sort=T, sub=”A sorted view”, ylab=”Individuals”, xlab=”Questions asked”)

The picture on the left shows the location of the missing values (denoted as black ticks) with respect to the matrix that was used to generate it. So here you can clearly see the question number 11 and 35 have large amounts of missingness, perhaps these are of a sensitive nature. The horizontal strips show that some individuals were less responsive than others. The causes of missingness should be investigated. whatever the reasons, the poor responses will interfere with downstream analysis and some may want to remove them from further analysis.

Location of missingness

After identifying which variables and samples are least responsive, the next question is what is the information or missingness pattern after removing these. And that question is answered by the picture on the left. Note that the axis numbers have been removed as they are meaningless here.

America America

Anti-american song based on the music of a nice Tamil and very well edited. And I learned a new word too – “bushit”