The Best Algorithm for Learning to Cook

Cook to eat and cook to learn




A meal has three interchangeable parts







Flavor agents dress up our three parts




Cooking methods turn these parts of the meal into different forms


Examples of carbs

  • Steamed carbs
  • Mashed potatoes
  • Pizza dough, pita, flatbread
  • Burger bun
  • Corn tacos, arepas

Examples of proteins

  • Burgers
  • Meatballs
  • Breaded and fried fish
  • Roasted meats
  • Braised meats
  • Curries

Examples of vegetables

  • Salad
  • Sauteed vegetables
  • Roasted vegetables
  • Grilled vegetables

Examples of flavor agents

  • Vinegar
  • Ginger
  • Garlic
  • Black bean sauce
  • Spices
  • Herbs
  • Capers
  • Mayo
  • Mustard
  • Honey









Now I just have to build it.


Designing Cooking for millenials


  1. Cooking for one every night is inefficient.
  3. Cooking education relies on recipes and not techniques.

What’s the answer?


Cooking for one





Recipes are broken for millenials





Cooking education relies on recipes and not techniques



What are recipes?

They’re a written way to communicate instructions for making something.









Cooking was not designed for millenials


To me, cooking means so many things.

Food is the basis for health and cooking is educating yourself about what foods are good for you and what foods taste good.


People cook differently than companies do and way healthier.

  • People cook with real food and companies cook with ingredients you can’t pronounce.
  • People don’t use as much salt, sugar or fat as companies do.
  • People prioritize taste and health and companies optimize on cost.


A lot of my family’s celebrations are centered around food. Cooking is passed down from one generation to another and I feel that I’m losing cultural heritage if I don’t learn how to cook. Cooking means community.


Economically, if I cook 6 meals a week, I can save 200 dollars a month.

I think people like the idea of cooking. I think cooking just has a bad user interface. For people who don’t have much experience cooking, it’s a large hurdle to cross.


Cooking has a bad user interface

  • Millenials are usually single which means cooking for one. Cooking every night for one is time and effort intensive.


  • Recipes are broken. They are meant for families who have a large kitchen, plenty of equipment, and a stocked pantry with lots of ingredients. Millenials (especially city dwellers) don’t have these things.
    1. Ingredients. Recipes often require 10-15 ingredients, so it’s hard to make things just from what you have. If you try to make chicken tikka masala one night and thai curry the next, you will have a lot of these ingredients that are not used very often, so there lots of leftover ingredients, which end up spoiling. The ingredient list that need 1 oz of sherry vinegar  means you need to buy a specialize item
    2. Equipment. Recipes need equipment like food processors and large mixing bowls that there’s not room to store. Using a lot of equipment means cleaning a lot of dirty dishes, so it’s a lot of work unless you have a dishwasher (not standard in New York).
    3. Presentation. Recipes are not visual and rely heavily on text to convey instructions. If Snapchat and Instagram are any indication, millenials love visual media.


  • Cooking education is lacking. Usually, cooking is taught by parents, who themselves may not be very good. Most education is focused on following recipes and not enough emphasis is placed on learning techniques so students learn to create their own recipes. When a beginner goes online to find a recipe, so many recipes that it’s hard to know what to pick.


What’s the answer? That’s next.


The Best Credit Card Rewards Calculator

There are so many articles about what the best rewards credit card is. They talk about all the features, pros and cons. Revolving categories. Redemption minimums. Cash back pretending to be miles. It’s really complicated.

You know what would actually answer this question once and for all? If we just calculated your expected rewards from each card and compared them. So, that’s what we’re going to do.


Credit Card Rewards Basics

Rewards are only rewards if you’re not paying interest. If you still have balances, pay them off before continuing. You should be paying off your balances every month for the rest of this to be relevant.

There are cashback rewards, there are miles at airlines or hotels, and then there are cashback points pretending to be miles. Here, we’re going to look at the first and the third types.

Length of credit history makes up 15% of the FICO credit score so you should have some cards which are open for a long time. Let’s see what are the best credit cards in the long run.


What’s the best cashback credit card to have forever?

You want the redemption rate to be the highest after the sign up bonus has already been obtained. This is the card that you will be spending most of your money on.

What you want to avoid is keeping a card with an expensive annual membership fee open for a long time. It’s not doing you much good.

Screen Shot 2016-07-07 at 4.47.10 AM.png

Citi DoubleCash is the best in this case and that’s great because it also doesn’t have an annual membership fee, so you can keep it open forever without paying for it each year. Also, unlike cards that can only be used to redeem for travel, DoubleCash can be redeemed for anything.

I calculated these numbers using the average New York household spending from before. This example household spends $25,143 a year on their credit cards.


What’s the deal with Sign Up Bonuses?

Notice how I said that permanent cards don’t take into account consider the sign up bonus. Here’s why:

The best credit cards in the long term are not the best in the short term, because sign up bonuses make up a large part of the value of rewards cards.

Screen Shot 2016-07-07 at 4.53.24 AM.png

Compare the first year reward values to second year reward values. The red arrow shows Citi DoubleCash. It’s no longer the at the top of the list because all the cards above it have some sort of signup bonus.

If you average the signup bonus over the years that you have the card open, here’s what you get.

Screen Shot 2016-07-07 at 4.56.28 AM.png

As time goes on, the cards separate into two groups, one around $500 a year and another around $375 a year.

Now, looking at just the top cards in the first year compared to Citi DoubleCash.

Screen Shot 2016-07-07 at 4.58.25 AM.png

Notice how these cards start very high due to the signup bonus and then fall below DoubleCash over time. You could stop using the card once you have the sign up bonus, but that generally means having to cancel the card because these signup up bonus cards tend to have annual fees. Cancelling cards affects the length of cards open and so has a small negative effect on your credit score.


I don’t spend 25k on my credit cards in a year. Does the math change?

Remember that these numbers were calculated off an annual household spending of 25k.

What happens if you spend less?

12k a year

Screen Shot 2016-07-07 at 5.16.32 AM.png

Citi DoubleCash is still the best card in the long run.

Screen Shot 2016-07-07 at 5.18.22 AM.png

But, in the first year, we see some other cards with signup bonuses overtake DoubleCash.

If you spend less than 12k a year, you may not spend enough to get the signup bonus (ex. Barclays Arrival and Capital One Venture requires 3K spent in three months).

What happens if you spend more?

50k a year

Screen Shot 2016-07-07 at 5.30.25 AM.png

In the long run, DoubleCash still comes out on top. Interestingly, at 95K annually, Barclays Arrival actually equals DoubleCash.

Screen Shot 2016-07-07 at 5.27.22 AM.png

In the short run, DoubleCash is actually doing better now as the weight of the signup bonus is reduced by the increase in spending.


What about airline cards, American Express membership points and hotel cards?

They’re very complicated because they can be redeemed for different values depending on how they are redeemed. Another subject for another time.


What’s the best cashback rewards card?

For most people spending more than 8k a year, Citi DoubleCash is the best. It gives you the most money without considering signup bonuses.

There are many good cards above with signup bonuses and you could chase them, but it may not be worth your time. You might as well find a card that will last you a lifetime.

Sounds like dating.

We could be doing more with Human Intelligence








Coursera Machine Learning

How do New Yorkers spend their money?



How do New Yorkers spend their money?

Screen Shot 2016-06-29 at 5.27.07 PM.png



How do Americans spend their time?

Screen Shot 2016-06-29 at 5.37.10 PM.png



What does this say about society and technology?

Top Areas of Money Spent

  1. Housing
  2. Transportation
  3. Food
  4. Retirment Savings

Top Areas of Time Used

  1. Sleeping
  2. Leisure and sports
  3. Work
  4. Household activities





Life is distractions


The idea of distractions had been rolling around in my head.


Why am I thinking about distractions?







Screen Shot 2016-06-29 at 11.57.39 AM



Why is it a problem if we’re distracted and entertained?


  • How should I make a living?
  • What does it mean to love someone?
  • Why should I have children?
  • Should I relearn my native language?
  • How do I maintain my family’s culture?
  • How do I make society more fair?
  • Should I be eating animals?
  • Are we building Cylons who will destroy us?
  • How do I make my life matter?




What can we do about it?


















More about this idea


Note to Self: Infomagical

Ezra Klein interview with Andrew Sullivan

Crash Course Philosophy Existentialism

Bullet Journal


A Curriculum of Guides about Blocks in Objective-C

Recently, there was a question about blocks that I couldn’t answer so I took a note to review it.

I came upon some great articles. Seeing the same elephant described by different people invariably leads to a comprehensive understanding of the elephant (much in the same way that taking beginner swing dance classes from 4-5 people leads to better fundamentals).

With no desire to write an inferior blog post, I’m going to review the ones I found, much the same way that I review restaurants.

The Guides

Mike Nachbaur: Using GCD and Blocks Effectively

Tutsplus: Objective-C Succinctly: Blocks

AppCoda: Introduction to Objective-C Blocks

Apple Working with Blocks

Matt Nunogawa Objective C Blocks: Summary, Syntax & Best Practices

Conrad Stoll Blocks, Operations, and Retain Cycles

I’ll be looking at:

  • explanation of why it’s important
  • completeness vs depth
  • the example code
  • ease of transferring examples to projects
  • how beginner friendly it is

Which should I read first?

Starting from Square One

Go with Tutsplus: Objective-C Succinctly: Blocks. It’s short, has useful examples and memory is well explained with diagrams. It stops short of retain loops though, which is a vital topic. Also lacking is why blocks are used (when would I want to use a block? what would I have used otherwise?).

AppCoda (Introduction to Objective-C Blocks) is really known for their app tutorials. They explain very well why you would use blocks and lead you through an example of how it would be used in a practical situation with an actual app.

Mike Nachbaur: Using GCD and Blocks Effectively extends deeper into asynchronous callbacks, introduces Grand Central Dispatch, and the idea that retain cycles can happen.

For Programmers from Other Languages

Matt Nunogawa (Objective C Blocks: Summary, Syntax & Best Practices) writes his blog directed at programmers from other languages and overviews blocks with greater examples for retain cycles and how to avoid them.

Bonus: Conrad Stoll (Blocks, Operations, and Retain Cycles) writes about a real example of a bug that his team faced with retain cycles and blocks.

For Quick Reference After Learning It Once

Apple Working with Blocks documentation can be a bit dry and doesn’t give much guidance for when to use it, but if that doesn’t bother you, then by all means go ahead. It’s very comprehensive.

How I deleted all my local Evernote notes and recovered them

I am not the first nor the last idiot to delete all my local Evernote notes. Given that they were in a local notebook, you can imagine how important they were to me. Commence panic.

Events leading up to the catastrophe

1. I updated Yosemite.

2. Evernote starts acting up and won’t let open.

3. I go to the app store to download Evernote only to find that I can only “Install” it. Hit install.

4. Find all local files missing. Have a heart attack.

How to Recover your Local Evernote notes

1. Turn on hidden files.

Hit Command + Spacebar to bring up spotlight and search for Terminal

After opening terminal, it should look like this:

Screen Shot 2015-02-01 at 9.54.02 PM

Close all of your finder windows

Enter this line in Terminal and hit enter

defaults write AppleShowAllFiles TRUE

Nothing will happen. Open Finder again and you will see grayed out files. Those are the hidden ones.

2. Restore notes from Time Machine

Go to Macintosh HD/Users/yourUsername/Library/CoreData

It should have be empty.

Open up Time Machine and go back to an hour ago when you still had the com.evernote.Evernote folder. If you don’t have Time Machine enabled, then you’re out of luck. Sorry. Should look something like this.

Screen Shot 2015-02-01 at 9.58.47 PM

The green files there are your Evernotes.

Hit restore and you will find them in Finder.

3. Delete Evernote from Applications

4. Download Evernote from the website if you had installed Evernote from the App Store

5. Install Evernote again and find your files

Why did it happen?

Installing Evernote from the App Store replaced my old version of Evernote with a clean one which synced with the server. Unfortunately, my local notebooks were not synced with the server, so they were lost.

Why does this solution work?

Evernote Installed from the App Store and Evernote downloaded from the web and installed store their notes in two different places.

Evernote from the App Store puts their notes in the folder:


Evernote downloaded from their website puts their notes in the folder:


This makes sense because Apple wants all the files for the apps in the App Store to be neatly organized in one container. Normally, when you install a program, it will add file in lots of different places.

Installing Evernote from the App Store deleted the data from the folder where Evernote from the website would typically store it’s files.

You just have to put it back by restoring from Time Machine and getting the right Evernote (the one from the website) to read the files from the right place.

What attempts did not work?

Replace the CoreData folder in the container with the restored one

You would think that simply moving the files from the CoreData folder into the container that App Store Evernote uses would be sufficient, but in fact that Evernote will create a new folder to store it’s notes because the longAlphanumericString is not the same as the one it was expecting.

The notes simply will not open in Evernote or worse tell you that it has an unspecified owner and for you to log out.

Copying the .enspot files directly over also did not work

I will be keeping my notes synced from now on

What use is privacy when you lose your data?