Cate’s National History Day projects goes to the US National finals

Every year high schools everywhere have their students work on projects as part of the National History Day.  The student compete at the school, then at the county and state and nation level.

Cate’s project made it to the California State competition and she went to the US Nationals

Nazi Propaganda

Android Development: Troubleshooting Nested Fragment

Screen Shot 2015-03-20 at 9.27.54 AM

Screen Shot 2015-03-20 at 9.27.54 AM

I am working on an Android app which takes the menu data from API display the dinner, drink, dessert menu and allows a customer to add items they are interested in into a ‘cart’ for the wait staff to look at and discuss the item the customers are interested in.

I’m using the project as a learning experience.  In the last week I was struggling with getting Android Fragments to work properly because I have nest Fragments.  The app has a main Activity, with a tab viewer, 3 Fragments and Fragments inside those 3 Fragments.   My app would often crash when I swipe back and forth and it looked to me like the Fragment::onCreateView() was called multiple times which was what the Fragment lifecycle was suppose to do.

I traced this down to the Android core code dealing with Fragments and thought maybe the problem is with the v4 API.

I have tried these 3 routes and I’ve finally found the fix this morning

  1. Replace the default Android Tab layout with PagerSlidingTabStrip ref: Android Guides from CodePath
  2. Use code to create the Fragment instead of using layouts, this didn’t work either
  3. Finally from this stackOverflow article (link), a gem that mentions Nested Fragments are support now at version 4.2+ Android SDK

What I’ve learned

  1. StackOverflow is very useful but there are conflicting answers
  2. The Android SDK is complex because there are so many backward versions, but having the Android source code to step through is invaluable. Also the main documentation did not talk about Nested Fragments being supported.
  3. Having Gradle to manage dependencies is fantastic

When I’ve found things to be useful, I have been adding the to my Android bundle

link: Your kids will not be grateful until they are 30 years old. NYTimes: All Parents Are Cowards

This article reminds me of how I felt as a single parent with Cate.  Scared, protective and constantly worried.  As she is heading to highschool, I wish to teach her to be independent, free thinker, know to fail and recover.  For other parents, this article is a great read amd a reminder that being a parent is a thankless job, but that is circle of life.

NYTimes: All Parents Are Cowards

Return on investment of online marketing for restaurants using Yelp, Yahoo, Google, Facebook

I Privé

Screen Shot 2015-02-13 at 9.34.08 PM

In helping my friend’s modern Japanese I Privé raise awareness, we decided to try to pay for marketing on Facebook, Yelp, Yahoo, Google.  Here is what I’ve learned about the effectiveness of these companies.  Keep in mind that is this my owner personal experience and not based on a large marketing budget and only apply to a small restaurant.

When we think about marketing, it’s not just about driving people to visit the restaurant, it’s also about building a relationship over the long term so that we can communicate with current and potential customers.  The return on investment focused on long term relationship as well as sustained value.


Yelp is the first platform most people think of when they want to find a new restaurant. When we started the restaurant, we agreed that building a good reputation on Yelp is the primary focus.  To do that, we have to focus on awesome food and great service and the Yelp ratings should take care of itself.  We also agreed that we have to be listening and responding to any negative feedback and act on them.

We did pay Yelp for advertising in one of his previous restaurants and noted that the ROI for paying removing competitor ads, hosting a video, pay for view ads for similar restaurants was about $3 / click to our page.   We thought that was not worth paying for.  The main reason was that for a new restaurant, we wanted to build a good reputation on Yelp rather than just driving traffic.  So we decided to pay $0 on Yelp but focused a lot of time responding to customer.

We do love Yelp’s transactional business model.  The integration with Locu for $20/ month.  The integration with online reservation with for $99/month.   These services are well worth the money.  I did an analysis of Opentable, the cost would have been about 8 times the rate of  We had the luxury of too many people wanting to get in, so we didn’t need the exposure of Opentable for immediate term traffic.

Future: We spend 50% our time focused on paying attention to Yelp and responding to our customers.  We would love to integrate with Eat24 as well once the pricing model looks better.

Screen Shot 2015-02-13 at 9.17.36 AM


When we looked at our referral data for our website, Yahoo and Bing combined to have < 1% of referral.  We decided to first focused on improving our SEO and make sure when users looked for ‘i prive’ they would find us.  We worked on this for 3 months, even thought the current search for ‘i prive’ still has a suggestion for ‘in private’, our website appears to be #2 in the search result.

At the 3rd month of opening, we decided to spend buying native ads on Yahoo Gemini.  The Gemini ads appear on mobile, desktop and search on and other * sites.  To my surprise, we saw a 0.07% click through rate.  While that doesn’t sound like a lot, the CPC was $0.48 which is almost 6 times better than Yelp.  (While the CPC on Yelp is higher, I do agree the quality of the acquisition is way better on Yelp because people are looking to each that day or that week)

I also love the Yelp check in deals, because we get to see how many people checked in for the deal and how many redeemed.

Future: We decided to continue to buy ads on Yahoo in order to build brand awareness and expand our reach.  There are some drawbacks in the granularity of the demographics and geolocations we can target to.  It’s at the DMA level and not on the city level.


We bought Google Ad words ads which would show our ads on affiliates and on Google search for certain keywords.  Very surprisingly, the Google Ad Words was not very cost effective.  We had a CPC of almost $1.11.   We were getting 40% of our web traffic from, without paying them anything.  They did a great job of refreshing their index and our SEO worked really well.

Future: For restaurants, Google Ad Words would drive clicks, but I cannot retain a long term relationship with the customers after that first click.  We decided to stop and just pay attention to continue to improve our SEO and also the integration with Google+ into the search results is effective for coupon promotions.

Screen Shot 2015-02-13 at 9.14.43 PM


I am not a personal user of Facebook, but I was surprised at how well Facebook marketing was.  For a CPC of about $0.77, I’m able to get a Facebook like.  From that point on, I’m able to market to about 10% of the audience via free news feed.  Then I can boost my feed post to about 4,000 people for about $50.00.  This is great to keep people engage on a weekly basis as well as do one time promotions of coupons.

Future: The bulk of marketing dollars will go into gaining Facebook likes for the next 6 months as well as posting photos to keep users engaged.  Also it seems like people don’t really mind when we post about 1 photo a day.  It’s not like email spam, because you can ignore the news feed posts.

I Privé Facebook
I Privé Facebook


From the beginning, my vision is to build a relationship with customers.   Customers who subscribed to our email list will only get 1 email per month, never more than that.  We get almost 250% better open rates than the industry norm.  It’s a great way to build a long term communication channel with our customers.  Email coupon campaigns have proven to be hugely effective.

Future: I think we continue to keep up our part of the bargain, never spam our customers and we built the email list.  We are growing about 50% a month here, so it’s worth to keep on investing.

Screen Shot 2015-02-13 at 9.15.37 PM



What surprised me is how ineffective Google campaigns are.   Facebook demographic targeting, the real time feedback about how effective each ad is really has pushed Facebook forward and convinced me to open up most of our marketing budget.  Yelp’s checkin deals are effective as well for restaurants.  Ultimately, we want to own the relationship with our customers, so the most valuable marketing is our email database.  And the surprising dark horse has been Yahoo Gemini ads.

Re: HTML5 Dev Conf: JavaScript Programming Style and Your Brain with Douglas Crockford

Watch his talk on YouTube

  1. Programming is one of the hardest things humans do
  2. Programming uses Head and Gut, we don’t really know how we do it
  3. JavaScript: Good Parts. Bad Parts.  It was done in 10 days and released to the wild
  4. JSLint : defines and professional subset of JavaScript
  5. JSLint will hut your feelings
  6. Example: braces should be consistent.  Javascript forces on the right because there are cases (return statement that forces this)
  7. We are constantly making mistakes, this is why rational people don’t do programming
  8. “That hardly ever happens”, is another way of saying “It happens”
  9. A good style can help produce better programs. Style should not be about personal perference and self expression

link: 12 Books That Every Leader Should Read


01+01(Photo from my restaurant I Privé)

I listened to Bob Sutton’s podcast on Scaling Excellence Successfully podcast fro the Center for Social Innovation podcast at Stanford

I checked out his blog and found a list of books he recommends.  I’ve put To Sell is Human, By Dan Pink. in my SF library queue.  (I removed the referral code from the link)

Check out his blog

Find that one true sport you love

Tony at Yahoo Google badminton tournament

Tony at Badminton Tournament

In high school I played badminton for 4 years. I liked the sport, but did not love it.

When I went to UC Berkeley, I join the badminton club and we trained and competed against other colleges. We would travel both days on weekends, come back as a team, have dinner together and laugh about the tournaments. I played singles, doubles and mixed doubles. My feet would often have blisters and when my parents were shocked to see how much pain I was in, I told them I barely feel them during the games.

I truely loved the game. I setup practice nets in the garage and practiced serving hundreds of birdies a night.

The sport was the one ‘class’ that I truly look forward to.

After college, I dreamed about badminton, but because of work, having my child, Cate and being depressed, I was not able to play for 10 years.

When the wave of badminton gyms open up in 2006, I signed up with 3 coaches and they taught me and trained me for 4 hours each week. I biked to my sessions in Menlo Park, I would take public transportation for 3 hours to get to my sessions. I played tournaments. I was truly happy.

Today, I am able to spare time to play badminton at least once a week. When I am playing, I feel like the luckiest person. I have a sport I truely love, I am very good at it. Mostly importantly, I can walk to any gym in any country and talk badminton and build small relationships with my fellow badminton players. When I visited Bangalore, Malaysia, Seattle, China and Taiwan, I often walk up to people and just play pick up games.

I hope my daughter also is so lucky to have a sport she truly loves, and is good at. No matter how hard other parts of life get, she will know she has something she loves to fallback on.

Face to face meetings: when they are useful

burlingame tree

I’ve struggled with having too many meetings where I didn’t find them useful, but I felt that there is 10 minutes of useful information so I go to get that info.

This particular week, I’ve had several useful meetings. The 3 attributes of these meetings that made them particularly productive are

1) They are 30 minutes so it forces us to get to the point
2) It’s not one way sharing of information, rather it was setting context and then a lot of discussion and answering questions. In the end, both sides ended up getting what they wanted.
3) The right people was in the room, there is no “I’ll ask this other person later”

Before paying for recurring service, know how they make money

Grill oysters from I Privé

I am in a position to evaluate different point of sale systems for a restaurant I’m invested in (I Privé).  There are 3 different business models I have seen.

  1. Take a percentage of every credit card transaction, give away the hardware
  2. Hosted software, charge a recurring monthly fee per hardware device
  3. Sell one time hardware, one time license fee per device and optional support control monthly.

Let’s assume the restaurant makes $1 million in revenue, needed 3 POS systems, 5 mobile devices.

For option #1, that comes to $20,000 in costs.

For option #2, it comes to about $300 / month, $3,600 / month

For option #3, it comes down to $7,000 in one time equipment and $600 / year.

Over 10 years, $200,000 vs $43,200 vs $7,200

A quick back of the envelope calculation, tells me to go for #3, assuming all things being equal. Of course #1, #2 do look like they have more functionality and more extensibility.  And #1 and #2 also look like they are heavily staff, with ambitions to go public.  I don’t blame them since the revenue growth would be very high, but at the cost of the restaurant business.

Having the hunger to standout

tony yahoo anniversary

Out of a team of 10 people, how do you standout without making others look bad?

Figure out what is the BHAG. Out of the 10 features, bugs, on the list of todo, what are the most important pieces that move the needle?

Write down all your ideas about improving, developing those 2 things.

Ask to take ownership and responsibilty.

Look at them, rank them, carry them with you and work on them everyday.

Anything great worth doing is worth doing (almost) every day

2014-11-28 13.29.05

If you want to start doing something and improve and do it really well, I suggest you do it everyday. Even if it is only 10 minutes a day, find some time to do it. 10 minutes a day, 365 a year is 3650 minutes a year, almost 60 hours.

You will find that once you build up this habbit, it’s hard to even stop doing it.. You will get better at whatever it is you do.

Savor the moment

I’ve noticed that when I received really good news such as a pay raise, a promotion, really great results from a test (in college). The happiness level rises up for a very short time (less than 1 hour), then my emotion tappers off back to what it was before.

This could be the way my brain is wired. I tend to dwell on the negative, or what I could be doing better.

To try to reverse not savoring the moment, I try to remind myself to ride the high of the good news for at least a week. This works very well and helps me to be grateful for the good news and builds up my resilience for the bad news when and if it ever comes.

Spending time on things that matter

Christmas ornaments

When you decide on what to spend your time on at work, try to spend your time that you can actually make a big impact. Otherwise in today’s corporate world, you don’t get credit or acknowledgement on it.

Either decide not to work on it, or if you decide to spend X% of time on it, do an awesome job at it.

We all multitask and work on multiple things, try to trim those that you cannot give full attention to.

Back of the envelope calculation

Embrace the fact that you won’t get the exact number right.

But make sure to get the order of magnitude correct. Should you be getting 50, 500, 5000, 50,000 customers?

If you get 30,000 page views, 6,000 clicks and 50 customers what that’s a good marketing return on investment?

Once you have mastered being able to do quick < 5 mins back of the envelope calculations, the you can make decisions faster and more accurately

On passion

When you are working on something time passes by without you knowing it.

When you start creating a list of things that you want to continue improving and you’re actually getting them done.

Whenever you have a free moment when you’re thinking about it or doing something for it.

You wish you have more time to continue working on it.

You are very lucky to be passionate about something.

Reading :, James Patterson, Lisa Tse and Brendan Gregg


My reading list this week:

James Patterson, Cross my heart

  • I couldn’t put this kindle book down.  One of his best best books and story line.  The ending was interesting and left me really want to read the next book in Nov.

Getting back to Objective C a bit on

  • I love the simple and get to the point writing

Shanghai Girls from Lisa Tse

  • Recommended by my wife to understand life before the cultural revolution.  I was born a little after the start of the revolution.  Reading it at 5:30am this morning for about 10 minutes. So far, I would say a 5/10 interest level.  Hopefully it’ll get better

Systems Performance book by Brendan Gregg

  • This is part of our reading list at work, so far it’s very useful information to brush up on fundamentals of computer science


Math Get To 24 iOS App

Math Get To 24 iOS App

My daughter Cate designed the logo, intro video and the entire app screen for this fun math game. Try it out and let me know what you think.

download on

The 24 Game is an arithmetical card game in which the object is to find a way to manipulate four numbers so that the end result is 24. Addition, subtraction, multiplication, or division are used.

The game has been played in Shanghai since the 1960s, using ordinary playing cards, but now it comes to your iPhone.

You can play by yourself or head to head with another player for a unique 2 player challenge.

If you get 3, 5, 5, 6 then a correct answer would be 3 * (5 + 5) – 6.

Other easier 3*8, 4*6 combinations are (2+1) * (4+4) or (2+2) * (1+5)

Difficult ones are the ones where division comes in 6*8/(7-5)

3 Levels for all age groups

Easy for 6-8 : 1 point
Medium 9-12 : 2 points
Hard 12-99+ : 3 pionts

Father Daughter team
– Designed by Cate
– Music by Will – featured on
– Engineered by Tony


iOS Simulator Screen shot May 30, 2014, 1.37.54 PM iOS Simulator Screen shot May 30, 2014, 1.38.06 PM

Saturday reading on senior iOS Developers

icon for Math Get To 24

Let me tell you how it actually is, because I write iOS apps.  A fully-dedicated senior iOS developer is way more expensive than you think.  I’m not talking about “some guy whose LinkedIn profile says he is a senior iOS developer, let’s send his profile to HR.”  I mean, a person who can read your ARM assembler, lecture on the finer points of Core Data, coordinate with graphic designers, draw mockups, tell you what is going to pass Apple review, solve customer problems, be a primary on the sales call with the client, negotiate the cost, write the proposal, know what’s in the HIG, come up with a class diagram that doesn’t suck, give presentations to management, train any developer in your organization, and actually get the coding done.  Specifically, a guy who you can lock in a room with a Macbook for three months and he emerges without any oversight or management from anyone, with  That guy can go from interview to interview and never even hear a starting offer under $125k, or $175k in the valley.  Never even hear.  That guy has Apple HR calling him saying “we know we can’t poach you, but maybe you can recommend someone?”  Apple HR.

What is the best advice you have ever received? (from Quora)

This is from Quora

Find something that fully engages your mind. And your heart. For that is the way to happiness.

Push harder. Do better. Never give into complacency. Be wide-ranging in your interests, and decisive in your judgments. Give every opportunity the benefit of the doubt. Always go the distance. And don’t buy uncomfortable shoes.

Think for yourself. Be realistic, but not pessimistic. Listen.

Do not let shyness rob you of pleasure. But be careful when you are the center of attention, the light there is blinding.

Do not lie, cheat, or steal, even when everyone else in the country is.

There are no known, predetermined, absolute values. We create our own morality. A good person judges his actions by the effects they will have on others, and by estimating the result if everyone behaved the same way.

Don’t look for the meaning of life. Supply it.

Return your calls, and answer your mail. This alone will set you apart, as many people are either too rude or too disorganized to practice this simple courtesy.

To be born into this country of freedom and opportunity, but with a disability that renders both outside your grasp, may be the cruelest trick that fate can play on an infant. You have no disabilities. Always remember that.

A heart never heals, but it does get stronger.

Trello to track life goals

I use Trello to keep track of my long term life goals.  I setup ‘organizations’ for ‘health goals’, ‘work goals’, ‘money goals’, ‘family goals’.

Then setup boards for each goal.

I still use Remember The Milk for single task todo.   Using Trello allows for multiple taks for each goal.  I also look over all the goals to remind myself what my long term goals are to keeo me focused.

One change I am making is to copy what Marissa M. does with writing down a list of todo for the current day on paper.

Trello for life

Yahoo Open House on Node.js, Olympics, Personalization

’Tis the season to talk tech, have some drinks, and hang out at Yahoo! 
This Thursday we’re hosting our Pre-Holiday Engineering Open House and Good Time.  If you made it to our first open house, then you know not to miss this one!
We will be talking tech, serving cocktails + mulled wine + snacks, and having an appearance by our very own Sanjay Claus and Elves.  Seriously?  Yes, Seriously.
We will have lightning talks on:
* Node.js  — How Yahoo is rebuilding our biggest sites on Node.js
* The Olympics — how we serve the crazy load and keep medal counts, video, blogs, and articles flowing and up to date
* Personalization — a bit about how we rank and serve a personalized list of stories to you
Come on down this Thursday evening and chat informally with the engineers that make it all happen.  Have a snack and a drink.  It will be a fun and enlightening time…  Then take Friday off ;)

Yahoo Homepage and Verticals Open House

Ever wonder how often we release the Yahoo Homepage? Or how big a speed boost Yahoo Sports gets by doing Edge-side Assembly?  Curious to hear the tricks we use to keep CSS bloat free and forward-compatible with things we haven’t even dreamed up yet?

You’re in luck! Our engineering teams are hosting a casual evening mixer with food, drinks, tech talks, and in-depth breakout sessions.

Topics for this Open House are:

  • Shipping code super-fast at massive scale – How we build, test, and release the Yahoo Homepage.
  • Edge-side Assembly, Caching, and Resiliency – How Yahoo Sports cut their TTFB and improved site-up.
  • Stencil UI/UX – How we are using the principles of Atomic CSS and standard design patterns to keep page weight down and stay “forward-compatible”.

Come hang out, talk some tech, and have a good time with us.

Yahoo has plenty of on-campus free parking and is conveniently located near two VTA stations.

See you soon!

Contact me if interested

November 21, Thursday 5:30pm

1-liner setup for your development environment


ydev setup <anything>

I did an informal poll at Yahoo, and also with candidates who interview with Yahoo.

When they join a new team, how long did it take to setup their dev environment.  It ranges from 30 minutes to a day, and even several days.

I asked them what if I pour water on their dev box, how much effort would it take to setup their environment again.

Usually people looked at me like I was crazy, and then they say 1/2 day, and they have to look up a twiki page, or some notes.

The effort I am pushing for at Yahoo is for any dev env to have a single line of setup, to install, verify it works, and takes less than 1 hour.

This tool would track

  • how many developers install it
  • how many failures, successes
  • how long it took

My team and I built the ydev tool that does exactly that.  We love it and so do many others.

Picking Samsung Galaxy S3 over iPhone 5

In trying to pick iPhone 5 or Samsung Galaxy S3 to replace my Blackberry.

I was torn and have switched back and forth for the last 4 days. I finally found an old document written on November 1, 2011 7:52 AM in Evernote.  I wrote this document when I had the Blackberry and why I actually enjoyed having it.  It’s nice to have an objective document written before any of these phones were released.

The winner is Gallaxy S3 for me personally

Must Haves

– replaceable battery S3 wins
– easy to type up emails S3 wins
– allow for internet tethering S3 wins
– easy to read screen to read nytimes, software documentation without eye strain tied
– easy to type up tasks and capture meeting notes tied

Nice to have

–  easy to deal with large volume of emails tied