Success and failure

If you try something old (or familiar, established, regular, comfortable, proven, standard) and you fail, people say you’re stupid.

If you try something old (or familiar, established, regular, comfortable, proven, standard) and you succeed, people say “Meh”. No special prize for you.

If you try something new (or unknown, reaching for the stars, unconventional, non-conforming, outside of comfort zone) and you fail, people say you’re stupid.

If you try something new (or unknown, reaching for the stars, unconventional, non-conforming, outside of comfort zone) and you succeed, people say you’re a genius.

If you’re going to be called stupid when you fail, why not venture into new territory and be a genius when you succeed?

How to tell if an egg is hard-boiled or raw

Do you know how to differentiate a hard-boiled egg from a raw egg? Watch the fascinating demonstration below:

There are 3 simple steps to test your egg:

  • Spin the egg
  • Stop the egg
  • Watch the egg

A hard-boiled egg will stop spinning after you stop it. A raw egg continues to spin even after you stop it. That’s because the egg yolk inside the raw egg is still spinning and swirling inside the raw egg’s shell.

Videography back story

So I recorded the actual demonstration a day earlier than the face-to-face video. I had to make sure the experiment worked first. Hey, I had to boil 2 eggs! The stove and I aren’t exactly close friends. Huh, why 2 eggs? Well, 1 egg was for backup, in case the original hard-boiled egg didn’t work out.

This meant I had 3 eggs to eat. Wait, where did the 3rd egg come from? Well, I scrambled the raw egg contents into some noodles. No food wasting, ok? So 2 hard-boiled eggs, and 1 scrambled egg with noodles. I do not want to see another egg in the immediate future…

That actual demonstration video was recorded on my digital camera, which is a little dated according to current standards. I can only get a 640 by 480 resolution, which is a far cry from the 1280 by 720 HD resolution I needed. Buuut, you use what you can get…

Interview with Karol Gajda (and other stuff)

Karol Gajda

So a few weeks ago, I managed to interview Karol Gajda, a Polish traveller, minimalist, online entrepreneur, guitarist and vegan. We talked about freedom, diet, challenges and fear.

They are all fighting for you to be normal. – Karol Gajda

Read the entire interview in the February issue of Singularity magazine.

The other stuff part

So while I was doing research on Karol for the interview, I read about his views on vegetarianism. In particular, on what he means when he says he’s a vegan. Now there are actually “levels” of vegetarianism. My friend called it the Vegetarian Continuum, which I wrote about in the August 2010 issue.

There’s the normal meat eaters. Then the Pescetarians, whose meat only comes from seafood, mainly fish. Then there are the “ovo” and “lacto” combinations, where you consume eggs and/or milk. Then comes the vegans, where you don’t consume meat at all (eggs and milk count as “meat”), or even have animal products in your lifestyle. Then we have the Buddhist vegetarians, where certain plant types are also excluded (the allium family, such as onions and garlic). And then we have the fruitarians, where your diet consists only of fruits, nuts and seeds.

Do you know about Buddhist monks seeking alms? Did you know they are not supposed to refuse any food placed in their alms bowls? Did you also know they cannot throw away food placed in their alms bowls? And finally, did you also know that if meat is placed in their bowls, they have to eat it?

Karol follows the spirit of vegetarianism, that of not killing another animal (or life). As do Buddhist monks. Here’s the thing. As a vegan, Karol doesn’t eat meat. BUT, if despite instructions or precautions or whatever, he ends up having animal products in his food, he will still eat it. For example, if he explicitly said to remove all cheese, but when the food arrived, it still contained cheese, he would still eat it.

Because if he didn’t eat it, it would be a disservice to the animal which died so it could be on his plate. If he refused to eat the incorrectly prepared food, most likely it would be thrown away. The animal was already dead. Throwing the food away meant that the animal died for nothing. Think about that the next time you waste food.

Obesity, overeating and possibly its cure

So here’s just a small idea I have about obesity (or at least the preventable behavioural type). In these modern times, when we no longer have to hunt for food, where food have become plentiful, we start to waste it. We continue to eat because there’s still more food, and not stop when we’re done and full. Economics then take over. More demand meant more supply needed. Which fed (no pun intended) back to growing demand. Which is why we now have Trenta sized Starbucks coffee.

The message seemed to be, it’s ok to have supersized food portions. The worse message is that, it’s ok if we can’t finish it. There’s still more food!

I don’t think it works the same way when Chris Anderson said it’s ok when we start wasting bits.

This is the power of waste. When scarce resources become abundant, smart people treat them differently, exploiting them rather than conserving them. It feels wrong, but done right it can change the world.

Here’s something else to think about. I can’t remember where I read it, but according to scientific studies, the more you eat, the shorter your lifespan. This is because your body is breaking down faster at the cellular level. When you eat, your body breaks down the food into useful materials and turns it into energy. That process wears down your cells. The more it does that, the more wear and tear your cells take.

Eat moderately. Don’t waste food. Don’t overeat, but don’t starve either.

Eat enough to live, then go do something awesome with your life. Then come back here and tell me about it.

Built-in styles for Excel Open XML

So a blog reader, Sebastien, once asked about built-in style numbers used in Open XML for Excel. I’m sorry to break the news to you. It’s not straightforward to use those built-in styles.

What are these built-in styles? Check these out:

Excel built-in styles

For instance, Sebastien was asking how to use the “Good” and “Bad” built-in styles. So the good news is, you can use those named styles. The bad news is, the various style effects (font colour, background colour, borders) aren’t automatically added in for you. From the Microsoft documentation of CellStyle:

This element represents the name and related formatting records for a named cell style in this workbook.

Annex H contains a listing of cellStyles whose corresponding formatting records are implied rather than explicitly saved in the file. In this case, a builtinId attribute is written on the cellStyle record, but no corresponding formatting records are written.

For all built-in cell styles, the builtinId determines the style, not the name. For all cell styles, Normal is applied by default.

Read the second paragraph again. It means even if you use the built-in style “Good”, you still need to create a style with the green background and green text font colour.

Since this is the case, I suggest you just stick to creating your own custom styles. It’s what’s going to happen anyway.

Now there is a magic number, 164. Your custom styles will start being numbered from 164 onwards. This implies there are 164 built-in styles (0-indexed). My search efforts only gave me a partial list.

Please refer to the ECMA-376 documentation for Office Open XML formats. Download the 1st edition, part 4. Inside, you’ll find a PDF. Turn to page 2135 (as of this writing. It’s page 2128 on the PDF itself though). You’ll find this:

Excel Open XML built-in style list

That list is probably that of “standard” styles. From reading the next few pages of the documentation, I believe most of those 164 built-in styles are due to internationalisation issues.

So my conclusion is, for the “standard” built-in styles you’re interested in, you still have to create the supporting style effects (font colour, background colour and the like). For the “non-standard” built-in styles, they are probably different based on the localisation of your Excel file. So you’re better off just creating your own custom styles, which I teach you how here and here. Or you can get my programming guide for detailed explanations and source code.

Man, spreadsheet code libraries are expensive!

I did more market research on commercial code libraries that create, edit or otherwise manipulate Excel spreadsheets (specifically using .NET languages (C# *ahem*)). Mother of columns and rows, they’re expensive! The mid-range products are about US$ 500 and the high-end products start at about US$ 1000. And that’s just the per-developer license. If you have more developers, or need a site-wide license, then you’re looking at thousands of dollars. If you consider license renewals, or subscription renewals, the options can boggle your mind.

So after thinking it through, I have to increase the price of my programming guide (Spreadsheet Open XML From Scratch). As ironic as it sounds, it might be the best thing I need to do. Simply put, my product is not expensive enough.

You will do well if you read some psychological books on human purchasing behaviour. It turns out, as studies show, there is a “perfect” price for every product (or service) for the intended audience (or market if you prefer) at a particular time period. Veer too far from that perfect price, either too cheap or too expensive, and you might need Herculean powers of persuasion to get the customer to buy.

And here I thought I was pricing my guide too expensive… I want to thank the people who’ve already bought my guide. You’re awesome.

So here’s the thing. I’m increasing the price of the guide from US$ 47 to US$ 97 (but please check the product page for current price since I might have changed it. Again…). And I’m doing it on 1 March. Why am I not doing it earlier? So you can buy the guide at the current price if you so choose. And because I’m busy writing my magazine and updates to the guide.

There are updates to the guide? Yes. And if you have anything you want to learn about creating spreadsheets from C# (or VB.NET) and with the Open XML SDK, now’s the time to tell me.

Then buy the guide at its current price, and get the updated version (soon). You get full working source code (not a code library, source code) that you can use with complete freedom (no license fees, no GPL’s, no license requirements, no need for attribution). Use the source code in a personal project or commercial product. No problem. And you get in-depth explanations of concepts taught for a particular task.

Buy it now before the price goes up. Leave comments here if you have specific Excel creation/editing tasks you want me to cover in the updated guide.

On cultivating self-resilience

There was this Wall Street Journal article about Chinese parenting that made some waves. And I’m telling you not all Chinese are like that. I can say that because I’m Chinese, and I didn’t get straight A’s, and my dad didn’t force me to study, and I turn out ok. My dad did wallop me, but not because I got a B. More on that later.

One point I want to highlight in the article:

Western parents are concerned about their children’s psyches. Chinese parents aren’t. They assume strength, not fragility, and as a result they behave very differently.

[Emphasis mine]

When I was young, my dad used to call me lazy.

“The weather is hot. Remember to drink more water.” said my dad.
“I’ll do it later.” I said.
“Don’t be lazy.”

“Clean up your room.” said my dad.
“Rrrrgghh” I said.
“Don’t be lazy.”

I don’t remember being told to do homework. I just do it on my own. So being told “lazy” must be about other stuff. It hurt being called lazy, since I wasn’t really lazy. As time went on, I realised my dad didn’t really think I was lazy. It was just an expression to say I should be doing stuff that should be done.

Best yourself. (Straight A’s optional)

I think I told you before about my English tuition score. When I was young, I scored a 76 out of 100 in an English test. It’s not exceptional, but I scored the highest in the class. I went home happy and told my dad. He just said “Why so low?”

Now that might be seen as a classic “Chinese Straight A” syndrome, but I don’t see it that way. The lesson I learnt wasn’t to triumph over everyone else, but to triumph over myself.

I was 10 at that time.

And it’s not like my dad will jump for joy if I get straight A’s you know…

[Skip to 1:50 mark if you’re impatient]

Not bad. Now I don’t have to kill you.

On excessive meaningless praise

Disclaimer: The following isn’t a racist comment. It’s just an observation.

So a while ago, my aunt told me something about American game shows. In particular, “Jeopardy”. The contestants, when asked to tell the audience something about themselves, would say what they do for a living and their hobbies maybe, and then:

“I have a lovely wife and 2 beautiful daughters.”

My aunt found that funny, because we Chinese would hesitate to say that our wives are lovely and our daughters are beautiful. At least not on national television. The statement just doesn’t come naturally to us. And my aunt is in a position to say that, because she has 4 beautiful daughters.

I give you another quote from the article:

The fact is that Chinese parents can do things that would seem unimaginable—even legally actionable—to Westerners. Chinese mothers can say to their daughters, “Hey fatty—lose some weight.” By contrast, Western parents have to tiptoe around the issue, talking in terms of “health” and never ever mentioning the f-word, and their kids still end up in therapy for eating disorders and negative self-image. (I also once heard a Western father toast his adult daughter by calling her “beautiful and incredibly competent.” She later told me that made her feel like garbage.)

I repeat:

Western parents are concerned about their children’s psyches. Chinese parents aren’t. They assume strength, not fragility, and as a result they behave very differently.

Those adjectives (“lovely” and “beautiful”), is it for the benefit of the father, the mother, the audience, or the daughters? Think about that.

Tell the truth. It hurts, but we have to assume that our children can take it. If they can’t, well, they’re going to suffer more when they grow up.

I was caned

I was caned for being irresponsible

I’ve been caned by my father before. Not for getting B’s, but for irresponsibility.

At a young age, I was given a lot of freedom. My friends had curfews, such as being home by 7pm. I didn’t. Well, not exactly. As long as it’s not too late (the unspoken limit was midnight), I was ok.

The only thing I needed to do was tell my father where I was. There was this one time where I went to my friend’s place to play computer games, and I stayed a little too long. I think it was maybe 8pm when I got home.

My father was furious. I didn’t tell him where I was. I didn’t tell him if I would be back for dinner. I didn’t tell him anything. So he walloped me.

“Go get the cane.”
*sniff sniff*
“GO GET THE CANE!”
*whimper rush to get cane* “I won’t do it again!”
*hooot piack!*

Yeah, my dad made me get the instrument of my punishment. That’s how he rolled. But after he caned me, he would get ointment and apply on the areas where he caned me. He didn’t punish me for the sake of punishment. It was because I was irresponsible, and made him worry.

That said, he did cane me when I failed my Chinese spelling once. What, a Chinese failing Chinese spelling tests? It didn’t happen often.

On cultivating self-resilience

Build self-resilience

From what I’ve read, Western parents (mostly American) are too lax with disciplining their children. Or they go overboard and beat children without showing the children what it was they did and why they were beaten. I know it’s illegal to beat anyone, even if they’re your children. Just don’t go the other extreme and not discipline them at all.

That said, Chinese parents can be too strict. I should know, because I’ve heard that some Singaporean Chinese children don’t really have a life outside of school, tuition classes and extracurricular activities (that their parents had painstakingly chosen for them).

I didn’t have tuition classes after I was 11 years old. Mainly because my father couldn’t afford it. I grew up learning to be responsible and be self-reliant. After school, I went home by myself. I bought lunch and dinner by myself. I did my homework without being told. I chose the secondary school (high school) I went to, mainly because my father couldn’t read English and he didn’t know which school was good and so he couldn’t care less. I chose the junior college I went to because my father couldn’t read English and he didn’t know which school was good and so he couldn’t care less. I chose the topics I studied in university because my father couldn’t read English AND BECAUSE IT’S MY LIFE.

He let me choose the path I want to walk. Because he taught me to be responsible. To be self-reliant. To be self-resilient.

Ultimately, the children of our future needs to be able to weather the vicissitudes of life. Too lax a discipline, and at the first crack of pressure, a person might turn to drugs to escape. Too strict a discipline, and at the first crack of pressure, a person might go all out and let loose the pent up frustration.

The balance is to be resilient enough.

CNY Food Shutdown

So I made a short video

[click through to the blog if you can’t see the video]

In Singapore, during the first 2 days of Chinese New Year (which are also public holidays), there’s practically no food to be bought. Let me explain.

The majority of the Singapore population is Chinese. No sane and rational Chinese food stall owner will sell food on those first 2 days. In fact, most venues (food or otherwise) will close up shop. In recent years, businesses have started to be open on the second day (they used to only start on the 3rd day) or even the first day, due to the poor economy. This leaves enterprising Malays and Indians who will provide food for the hungry Chinese, and charge exorbitant fees (I think it can go up to 50% higher than their normal price).

You know what’s available? McDonald’s. The fast food restaurant is open every day, public holiday or otherwise. They just get the Malays and Indians (and sometimes even enterprising *cough desperate cough* Chinese) to work. One of the perks of a multi-racial society, I guess.

What’s interesting is that, during those first 2 days of CNY, the entire island of Singapore goes quiet. Except for occasional lion dance troupes with their drums banging along the road, travelling to their next destination. It’s a public holiday, so even the Malays and Indians might just go “What the hashbrown” and just sleep in. I don’t see this even for our National Day.

What did you say? Me, cook? Who do you think I am, Jamie Oliver? I can barely avoid hurting myself just boiling water. [I actually intended to say that in the video, but forgot. I was very nervous. You can’t script too much, and you can’t improvise too much. Another thing learned…]

So, I’m curious. Do you have holidays where your entire country basically shuts down? Let me know in a comment.

Bezier curve inflection points

Adrian Colomitchi wrote me an email about an article I wrote. It turns out that I was wrong about the inflection point section. I was trying to figure out what Timo meant by “loop tips”, and I figured it could be an inflection point.

So here’s how Adrian describes inflection points:

If you drive or ride a bicycle: inflection points will happen when you switch your direction from left-to-right or vice-versa.
The inflexion points have 0-curvature (and infinite radius)… for an instant you travel straight (because you are switching the direction).
By contrast, the tip points will have maximum curvature.

Here’s how the inflection points should actually look like (screenshots taken from Adrian’s site):

A Bezier curve with no inflection points:
Bezier curve with no inflection points

A Bezier curve with one inflection point:
Bezier curve with one inflection point

A Bezier curve with two inflection points:
Bezier curve with two inflection points

You can find out more about inflection points on a cubic Bezier curve on Adrian’s website.

If you have anything to add about inflection points (or Bezier curves), comment below.

Epic rabbit cuteness contest

This is just a fun contest I’m holding. A couple of days ago marked the start of the Year of the Rabbit for Chinese New Year. So I want you to vote on which rabbit is the cutest. Here are the contestants:

Contestant #1

Rabbit contestant 1
[original image]

Contestant #2

Rabbit contestant 2
[original image]

Contestant #3

Rabbit contestant 3
[original image]

Contestant #4

Rabbit contestant 4
[original image]

How to vote

You can:

  • Email me
  • Vote on Twitter using the hashtag #epiccuterabbits
  • Comment below

Results will be tabulated and released in the March 2011 issue of Singularity. I’ll also write a short post here to announce the results. No personally identifiable data will be released. If you’re really shy, you can comment anonymously (for this post, I’ll accept non-obviously-spammy-looking comments that are legitimate “vote” comments)

I don’t have any cool prizes to give away (do I hear future sponsorship?), but aren’t those rabbits cute? Do it for the rabbits.