Tag Archives: tech

Optimize your closet, music library, and schedule

When should you stop looking for a better deal on a house? How much new music should you listen to vs. your classics? What’s the most efficient way to organize your closet? Which chores should you do first on Saturday?

These practical questions lack an intuitive answer. We experiment over time and act accordingly. There doesn’t seem to be a correct answer to any of them. Computer scientists have proved this wrong. In writing algorithms dictating computers’ actions, computer scientists have determined the most efficient ways to explore new concepts, sort large quantities of data, and organize a to-do list.

In their recent book, Algorithm’s to Live By, Brian Christian and Tom Griffiths explore these solutions and present them in a manner accessible to non-geeks. Find below a distillation of a few key points from their book. It’s worth exploring if you’re interested in this organizing your life.

Optimal Stopping

There is a best time to look for something and a best time to stop looking. Consider looking for a house in a fast-paced housing market. The most efficient strategy is to determine the total number of houses it is reasonable to consider in your search. Say 100.
The optimal stopping point is 37% of the # of houses you are willing to consider. Computer science has proven the optimal strategy is to pick anything better than the first 37% of houses you consider. This will prevent you from falling into the trap of stopping too early or late. Look at the first 37 houses with no commitments, then on the 38th house take anything that is better than the first 37.

This is a simplified rule. The book details how adding new parameters, like the ability to backtrack to previous considerations, will modify the optimal strategy. If you have quantifiable parameter (such as average home price per sq. ft in your market), you should utilize this data to bolster your dataset and set an average price/sq.ft threshold for choosing instead of strictly following the 37% rule.

All things beings equal and choices disappearing after you pass over them, picking something from a wide variety of unknowns, set the number of considerations you can reasonably make, look at 37% of them without choosing, then pick anything better than those first 37%. I’ll give one more example to illustrate. If you’re at your work holiday party and they have 100 unwrapped holiday gifts being pulled from a bag and you get the first choice whether to take what’s pulled or let it go forever to your coworkers…your optimal choice is to pass over the first 37 items in that bag and pick the first gift better than those first 37.

Attempting to explore why this is the case would be futile in a blog post. Suffice to say, computers often have to pick a way to solve a computational problem with limited resources. This is the best way for a computer to do this.

Explore vs Exploit

Life is always a balance of the novel and the familiar. We want to find new and exciting things while savoring those we love. Computer science also has insights here. There is no perfect answer as to the balance of your Pandora station (new “recommended tracks vs your library) but there is an optimal strategy: minimize regret.

To develop your perfect library with minimal regrets, use the Gittins Index (see red line in image). Starting on Pandora, or any new area of life, everything is new. After about 50 songs, you should listen to about 50% new songs. After 100 you should listen to 25% new to old songs. As you approach 1000 songs, listen to 3% new to minimize your regret level.

Listening to only new music will expose you to many songs you don’t enjoy. While listening solely to your library will prevent you from discovering songs you’ll love even more. The optimal balance to reduce regret is listed in the chart above. As your library builds, you’ll experience more variety and novelty within your library and thus be less bored by the familiar. The optimal music library size may be around 500, where marginal gains in new music level off. At that point, you can be 90% confident your music is better than the next random song in your “recommended” track list. Listen to a new song every 10 songs to minimize new-song regret and you’ll be on your way to building the optimal music library. This doesn’t account for boredom with your current library. It assumes every song in your library is of a constant enjoyment value to you. You could, however, factor in a certain enjoyment decay factor to account for this.

Sorting your DVD’s A-Z isn’t necessary. But there is a best way to do it. Don’t take all your DVD’s off the shelf and put one back, then place one more before or after, then one more in it’s alphabetized place. This is inefficient because every new sort task needs to be compared against the whole library.

The optimal solution is called merge sort. You break the DVDs into several large groups, then merge those groups together.

But, when in doubt, err on the side of messiness in ordering/sorting problems. Take the DVD home library for example. Unless you have a massive collection, it will almost always be less effort to search through your collection than to intentionally sort it. There is a better third option to random organization and alphabetical: Caching.

Caching is choosing a small portion of your library to be quickly accessible. Computers use caches to make memoryfaster. For this a good example is your clothes closet. The tendency may be to sort articles of clothing by type. This is not the best way. In order to have the highest likelihood of accessing the right piece of clothing, you should place everything back in the order of most recent use in a prominent place. Because in almost all aspects of life, what is used most recently is most likely to be used again. This also applies to papers on your desk. You shouldn’t try to organize them into a “logical” order. Placing the most recently used papers on top is the best, assuming these are papers that belong on your desk and aren’t for archiving.

Another note: Keep things where you use them.

For scheduling tasks, make your goals explicit. Prefer tasks with soonest due date, weighted by importance, with roadblocks of any size as a priority. If a new task comes that is due sooner than your current task switch to it if the switch in context seems merited. When checking your email, do not sort it by importance level before opening. Going at random will prevent the waste of time in the “metatasking” of email inbox organization. It’s almost always better to batch a bunch of tasks together to get cognitive momentum and remove distractions from your working schedule in at least 90-minute chunks and avoiding “metatasks” such as spending lots of time choosing what to do first. Have a system for prioritizing and stick to it. However, some jobs and situations won’t allow this and you’ll need to be cognizant of that.

Optimal Auctions
The optimal auction is called the Vickrey auction. Everyone bids once what they believe an item is worth. Then the winner pays the #2 bid. This prevents unneeded competition and potential misevaluation due to false trends in bids. An example of a pitfall in standard bidding wars: Consider five companies bidding on a bridge construction project. Consider: Company one bids $6 million instead of $8 million because of a surveyor’s error. Company 2 would have bid $6.25 million but is undercut by Company one so now bids $6 million as well even though they knew the project was worth $8 million. Now companies 3, 4, and 5 see the bids and are convinced the value of the project is somewhere between $6 and $6.25 million. The Vickrey auction would have avoided this by preventing comparative sequential bidding that leads to a battle over information.

Computational Kindness
It’s a common theme amongst my friends when asked “where do you want to eat for dinner” to say, “I don’t care, anywhere you pick is fine.” While feigning kindness this is a burden being placed on your friends. Without any information and parameters, choosing becomes more cognitively complex. In reality, it’s almost never true that anything is fine.

Computer Science and Mathematics can help us build a practical structure to life. Machines need to adapt to environmental changes and human demands like us. Observing how mathematicians use theory to design machines can be invaluable in implementing better systems in our own lives.


Two Websites for Finding Super Cheap Flights

Two essential 2016 resources for finding cheap flights

In the past 6 months, I’ve changed my strategy for finding cheap flights. I’ve booked some pretty incredible deals and skipped out on a few more. I’m now confident to share it publicly as a reliable and effective system for finding cheap flights to anywhere.

The strategic principles of airline savings from 2015 still hold:

Be flexible in your dates and destinations. Fly on Saturdays. Travel light.

Tools I’m using in 2016

Flight Deal

The Flight Deal is a Facebook page that curates the cheapest flight deals offered around the country each day. They use geographic targeting on Facebook to only show flights relevant to your local airports. I booked an upcoming flight from NYC to Tokyo for $398 using this method. Beware that the flights only last for a limited time (3-5 hours) You’ll have to be able to pull the trigger quickly. They will show you how to book your flights through the respective carriers. For Tokyo, this was a quick checkout on Air China’s website.

Other deals I’ve seen are $525 roundtrip for Philadelphia to Hawaii and $149 roundtrip to Belgrade, Serbia. The idea of a $149 flight to central Europe is unbelievable. To sign up for The Flight Deal visit their Facebook page and “Like” them. 


Skyscanner is a Scotland-based website dedicated to generating a searchable list of flight deals around the world. Unlike The Flight Deal, Skyscanner offers search functionality and far more flights. It allows searching by country, cheapest month, and flexible locations. This makes it much more useful for people with time constraints on travel.

With Skyscanner, I booked a $90 roundtrip flight from Miami to Ecuador. Search for all flights departing the entire US. From there you can view all international flight from the USA, in the cheapest month available, sorted by price. Skyscanner allows you to make your destinationEverywhere” which allows you to compare flight prices from 50+ countries departing from the US. At the time of posting the best deal I can find is NYC to Paris for $331 roundtrip in January with a possible stopover in Iceland.

Skyscanner’s database is not perfect. Some flights you find may be sold out.
These two websites are now my two most popular. For the spur of the moment trips, The Flight Deal offers some insanely low prices. If you’re interested in being a bit more selective with your destinations and dates, I recommend Skyscanner. If you need very specific times I still believe Google Flights and Airfare Watchdog are the way to go.


Finding Local Events

Finding local events

No matter where you live there are interesting people doing interesting things in interesting venues. There was a period in my life when I accepted this and let it be. Then there was Facebook. As a high schooler, my friends and I would find parties and events on Facebook that we weren’t explicitly invited to, but that weren’t specifically unwelcoming to us. We walked in on a ton of interesting situations with people we didn’t, or only marginally, knew. We hung out with graduate students, Russian techno heads, suburban white kids, and people about to go off to war.

Since then I’ve taken it upon myself to use Facebook Events to find events that will open my mind, provide me with free food, and meet interesting people.

I’ve learned to roll wontons with the Johns Hopkins Asian Student Union, gone to a “beach” party in a house filled with sand. I ate plates from 60 fine dining restaurants for $25. I’ve gotten excessive amounts of free drinks and food. I’ve made friends with engineers, eaten as many Shake Shack burgers as is physically possible, and watched someone put their hand through a wall in anger after a disappointing sporting event.

All this I heard about on Facebook. Whether through friends or the public at large, there are events happening every day on Facebook.

The methods have changed a bit over the years. The level of detail with which you can search Facebook’s event database has gotten more robust. Here’s how you can find relevant events on Facebook.

You need a Facebook account to take full advantage of this feature, but some of it may be available to the public. The main dashboard to refer to is https://www.facebook.com/events/upcoming. This has the full spectrum of events going on associated with your account. It’s primary functionality is to show the events to which you’ve been invited. As far as I can tell there are a few main aspects of Facebook’s events features:

Events near you

Learning to manipulate this url can make adjusting your searches for events easier.

Events near any particular place


This is where the magic happens. You see all public Facebook events happening in any given place at any given time. If you’re traveling or free on a particular date, you can drill down your search to accommodate you needs.


Facebook forces all events to fall into one of the following categories:

Food · Drinks
Sports · Fitness
Fine Art · Crafts
Film · Photography
Performing Arts

This allows you to sort out the type of event you’re looking for in both the time and place you’re interested. 

Secret additional parameters
Other searches not included in the Events functionality can also be helpful. For instance, if you want an event with “Free” in the title you can search within Facebook “events near me called ‘free’”. You’ll have to play around to get the correct search language as Facebook is finicky about that.

Other useful Facebook searches
“Local events hosted by my friends that are upcoming”- See what your friends hosting.
“Local events my friends are attending that are upcoming” – See what your friends are attending.
“Events near Philadelphia, Pennsylvania attended by my friends that are upcoming”- See local events in other places your friends are attending.
“Popular with Friends Near Copesville, PA”- See popular events your friends have shown interest in.

My go-to search is to dig through Food and Drink events on upcoming weekends near me. This oftentimes reveals the major events in the big cities near me and smaller events that I wouldn’t have found out about otherwise. I mark myself as “Interested” in all the events I want to attend and review my selections as I plan my schedule.

Other sites to search
Find your local events site. In Philly, the go-to is http://www.uwishunu.com. A simple Google search will help you find a good site to crawl for events.

yelp.com/events has a good listing of events. Bonus points if you can grab “Elite” status and get invites to special events around the country. Here’s an example:

Before you ever pay for a ticket at an event make sure you search the web for promo codes. For instance, Groupon offers$10 off for any new account purchase. I saved $15 at a Wine and Cheese festival by finding a code with Amtrak. Search the event name (e.g. “Philadelphia WIne and Cheese Festival”) on Google + “promo code”.

You can broaden your results by utilizing Google’s Search Tools time range function on Google Search. Search something like: “reception” “philadelphia” -$11..100 -ohio -oh for results only in the past week. Some interesting things pop up that you won’t find otherwise.

Good luck and happy event-finding!