Jul 15, 2014

Using a Memory Palace to Remember Decks of Cards

After reading Josh Foer's excellent book Moonwalking with Einstein, I decided to give the Memory Palace technique a try. The book is even reviewed by Bill Gates, who writes that it was one of the most interesting books he read during the summer of 2012. Anyways, much to my complete shock, I tried this technique and discovered it was effective in helping me to memorize and recall an essentially superhuman amount of information, almost effortlessly.

Within 6 days of starting, I was able to memorize 520 cards (ten 52-card decks) in about 90 minutes, and then recite them backwards! Here's how I did it, and how you can do it too.


Technique
All you have to do is envision yourself walking down a street or through different rooms in a "palace" and place various objects at different locations.  To recall those objects again, simply walk through in your mind starting from the first location (or the last location backwards). You'll see that without much effort, you can recall all the objects you placed there.

That's it! The following are tricks I use in order to make the recall even more vivid. Mindblowingly, the first time I remembered multiple decks of cards, the cards feel so vivid and permanent in my mind that I'm facing a problem that I thought I'd never face in my entire life...how to get rid of the cards so I can reuse the Memory Palace.

1. Imagery at each location
Try to create an outrageous image of something very tangible to associate with each physical location. For example, one of my locations was a driveway, where I placed a gigantic hamburger there. Another location was a grass-covered soccer field, where I put a gigantic pink aircraft carrier. The more outrageous,  the better. Use strange colors, textures, and relative sizes. You can technically get by without adding an extra image at each location, but adding the image provides yet another hook.

2. Dynamic story
After having created a static image to associate with each location, you now have both a location and an object to create a dynamic memorable story. Use your imagination and creativity to think of the most ridiculous stories possible, like witnessing Grumpy Cat in a sparkling Elvis costume eating Godzilla, or you jumping through walls and getting impaled by a row of spikes that strangely feel like cotton candy.

3. Personal story
The more personal the static image and dynamic story, the easier it is to remember. Lewd, politically incorrect, and taboo objects, actions, or stories work particularly well. In order to have a free conscience, I suggest not including family members and close friends in your generated personal story, hehe.

...

Example: Periodic table of elements used to remember 4 decks of cards
Despite having a graduate degree in physics, I've never taken the time to learn all the elements in the periodic table, much less their order. However, I was able to memorize the entire list, the order they are in, and starting from any item on the list can  traverse them backwards and forwards at will. Here is an example story I constructed to memorize them. Once I had this story, I now have 118 places in which to place cards. The way I was able to memorize 4 decks of cards was to use 104 (2 x 52 cards) of the 118 slots of this particular memory palace, and go through it twice.

Periodic Table
In the corner of my bedroom, there's a speck of dust (Hydrogen) that's floating (Helium) upwards. I see a battery (Lithium) in the opposite corner barrelling (Beryllium) upwards as well and lands on my wire shelf, doing nothing and I get bored (Boron). On my other shelf, there's a toy car (Carbon) and as I walk out of my room, I see the night (Nitrogen) switch. There's OxyClean (Oxygen) in my bathroom that gets spilled on the floor (Fluorine). As I walk towards the living room, I bang my knee (Neon) on the table and check the internet wireless router that's been sooooooo (Sodium) slow lately. My apartmentmate's dog is reading a magazine (Magnesium) and I walk to the bookshelf to see alumni (Aluminum) newsletters. I hear someone yelling outside the window silly (Silicon) things, and I jump out of the window to see the shopkeeper who is so old he might as well be a fossil (Phosphorus). Across the street at the laundromat, there's a strange smell that Hugo Chavez is saying that George W. Bush left (Sulfur). In the back of the laundromat, there's a Clorox (Chlorine) bleach bottle. People sitting there leave suddenly and are gone (Argon). As I leave the laudromat, there's someone smoking pot (Potassium). Someone exclaims "Cal, see him?!" (Calcium), so I scan (Scandium) the sky. As I walk down the street, I see entitled (Titanium) left-wing protestors railing against the white/vanilla (Vanadium) man. I almost get runover by someone riding a chrome (Chromium) bike. It's hot, there's clothes iron (Iron) across the street. I walk to the next corner where there's a giant corn on the cob (Cob). My friend Nick (Nickel) from childhood is standing across the street. A cop (Copper) is arresting someone for making bad jokes, making bad zingers (Zinc). Raj Rajaratnam from the hedge fund Galleon is on the corner in a sailing ship, a galleon (Gallium). Since it's the World Cup, a triumphant German (Germanium) is waving the flag, in contrast to the an "Ar"gentinian who looks despondent, even "Sen"ile (Arsenic) due to their country losing. I walk across the street and see Selena (Selenium) Gomez and Justin Bieber. Crossing the street, there's a bro (Bromine) pointing to Superman on the other side of the street (Krypton). Strange, there's a red and ruby (Rubidium) crystal. Walking further down the street, I see another German, but this one's a strongman (Strontium). I have yet (Yttrium) to go to the Planet Fitness across the street. There's a staircase that's somewhat Z-shaped (Zirconium). On the second floor, I see Keanu Reeves from the Matrix, Neo (Niobium) sitting in a chair. A girl I know from high school named Molly is in one corner wearing denim (Molybdenum). An Israeli CTO I know stands in the corner and says "Tech-ku-nology" (Technetium) in an Israeli accent. Doctor Ruth (Ruthenium) is along the wall. In the other corner is a guy I know who's a Rhodes (Rhodium) scholar. In the middle of the room there's a knight or a Paladin (Palladium) doing a strange dance in full armor. I walk into the men's lockerroom, and walk counter clockwise, see silver (Silver) in one corner, AutoCad software in the other corner (Cadmium), a Native American in the other (Indium), and the tinman (Tin) from Wizard of Oz in the other corner. There's acrimony and animosity (Antimony) in the room, so I GTFO and jump through the walls into the Chase bank across the street with tellers (Tellerium). There's a WhiteCastle restaurant that I've been entered and exited and dined once at, or input-output-dined (Iodine) one time. Walking further south towards Central park, there's a street at a diagonal making an X (Xenon). Julius Caeser (Cesium) is down the street, and Barry Greenstein (Barium) tells me to turn right. So I jump and land (Lanthanum) at a Dunkin Donuts. Across the street there's the joker saying "Why so serious?" (Cerium). At a Brazilian-owned deli in the next corner, there's an Indonesian guy I know with last name Prasedeo who is holding a dime (Praseodymum). I now go express down towards Times Square, stopping at the Museum of Natural Histroy, where Keanu Reeves as Neo shows up again but is holding a dime (Niodymium). At the Trump Tower on Columbus Circle, Donald Trump has great wealth but people are protesting him , so there's an epic battle (Prometheum). Walking across the street, I see my barber named Sam (Samarium). Walking into Times Squares, there's a lot of European (Europium) tourists. Gandolf (Gadolium) is doing some sort of magic at the Armed Forces Recruiting Center. There's a Halal cart guy wearing a turban (Terbium). As I walk towards the NYC public library, there's a hipster spouting bad poetry, or bad prose (Dysprosium). Katie Holmes (Holmium) walks by. Walking towards Grand Central, I see some evangelists, or Extremely Religious Buffoons = ERB (Erbium). My sister Julie comes after, but with a lisp it's Thulie (Thullium). At the top of Grand Central, there's an angry bum, or a bitter bum, bitter ryhmes with Yitter (Ytterbium). A hippy is playing a lute (Lutetium). Now I head back to the NYC library and I descend the steps, stopping halfway (Hafnium). In the middle of Bryant Park, there's strangely sunbathers getting a tan (Tantanium) even though now it's nighttime. Walking to Nikola Tesla corner, I just think of his ill-fated agreement with JP Morgan, where he should've just held his tongue (Tungsten). Fastforward down to the 24-hour fitness right near Madison Square Park. I walk in and Rihanna (Rhenium) is to my left as I walk in, Dr. Oz is at the front desk (Osmium), tanning booths irradiating (Iridium) people, and people playing Starcraft downstairs, where I'm in platinum league (Platinum). 24-Hour Fitness is so much more expensive than Planet Fitness, so I save money (Gold) by teleporting to the midtown one. It's filled with people, so it's hot and the temperature (Mercury) is rising. Look at all (Thallium) these people, who will lead (Lead) them? Teleport to Madison Park and there's a bistro (Bismuth). Michael Pollen (Polonium) is talking and I think of him as a famous ass, or a ass that is starry (Astatine). I sit in a park bench and think this whole startup is rad (Radon). My cofounder from France (Francium) is standing in the corner of the park, and I do snow angels in the sand and angels are radiant (Radium). Right in front of the ShakeShack, I think of how the long line and how people should be moving faster or acting faster (Actinium). Thor (Thorium) is standing on the corner, measuring the way home with a protractor (Protactinium). Radioactive material while waiting for the light to go (Uranium). I am stuck in the median, and the cars wizzing by me resemble a trident (Neptune). I walk into the street to retrieve a $100 bill so I can be richer or more plutocratic (Plutonium), but get hit by a giant truck with a "Made in America" (Americium) sign. I get thrown into a snack stand and await for the cure (Curium). A girl I know who went to school in Berkeley (Berkelium), California (Californium). Einstein (Einsteinium) is at the entrance of my work. Enrico Fermi (Fermium) is waiting at in the lobby, and people are leaving (Mendelevium) the elevator. I go to the third floor of the building, thinking of all these Nobel (Nobelium) Prize winners. Front desk has Lawrence (Lawrencium) of Arabia. The common area is filled wth people who scatter as I walk in, somewhat similarly to Rutherford (Rutherfordium) scattering. George Dubya (Dubnium) Bush is in the closet as I walk down the hall. I see a girl who seems like a cyborn (Seaborgium) in the corner office. Niels Bohr (Bohrium) is sitting in the next room. David Hasselhoff (Hassium) is down the hall. Now I walk up the steps listening to tunes from the Meitner (Meitnerium) brand stereo. On the fourth floor, there's a lady I know standing there, or a dame standing (Darmstadtium). Next room is a giant rat, or rodentia (Roentgenium). Now the last few take very little visualization since they're so easy to remember easy. Basically just walk down the hall and up the stairs to my office, putting the following into the different corners haphazard order: first corner (Ununbuntium), second corner (Ununtrium), reception area (Ununquadium), stairwell with Weird Al singing "It's all about the Pentium" (Ununpentium), first corner of the next floor (Ununhexium), common area with lots of people like it's school in September (Ununseptium), and then finally my office, where I'm writing this right now (Ununoctium).

- Kevin

Jun 8, 2014

Clouds, Clients, and Computing Costs

I've been a bit excited/obsessive lately diving head first into the wondrous world of Amazon Cloud Services (AWS) with a $10k credit under the AWS Activate program as a perk of the accelerator my company MedNexus just finished. The degree of obsession has been such that I've downloaded the developer manuals for 39 of the services, many spanning 300-700 pages each, and plan to read them all since I find it intrinsically fascinating. Catching glimpses of this personal, scalable, always-on supercomputer that's experiencing an exponential decrease in the price/performance ratio, got me thinking a bit about the tension between server side and client side operations, programming, and applications

Computing has come full circle, starting with the original model of computing as a thin client attached to a mainframe, to the era of independent personal PCs, and now increasingly back towards the mainframe, which is now called the cloud. This trend towards the cloud is so powerful, that such companies as Intel, Dell, HP, and Microsoft, are starting to see their profit margins and value propositions change for the worse with respect to Google and Amazon.

Many take the extreme view that all computing will trend towards the situation at the start of the information age, the thin client connected to a powerful mainframe. Though this trend is undeniable, was thinking of modeling it economically with respect to three basic computing resources: (1) communication, (2) computation, and (3) storage.

I'd like to qualify my analysis by noting that practically, there exist other "higher level" issues such as security, developer resources, and management time, but these are less quantifiable and less fundamental relative to these basic computing resources. Furthermore, there exist even more basic resources such as energy, heat, and entropy (which are themselves fundamentally interwoven), but for this particular model in this hastily written informal blog post, those abstractions introduce more complexity than is useful, even though they would lead to a more accurate and richer model.

For each of the three basic resources: communication, computation, and storage, let's take the limit as each individual one goes to infinity or zero, while holding the other two constant.

In the limit of infinite communication capabilities via wifi, landline, 4G, carrier pigeon, and so on, the economics makes it such that the mainframe with thin client model works best. In the limit of zero communications, then the personal device is best. Of course, a continuum exists in between.

In the limit of infinite computational resources, the mainframe model makes sense as well, since it's possible to achieve economies of scale via hundreds of thousands of commodity hardware servers spread across a multiple datacenters, much more easily and cheaply than through a handheld or desktop device. The limit of zero computational resources doesn't really make sense to consider for this model. (As an aside, it's interesting too to consider the idea of computational irreducibility, as discussed in Stephen Wolfram's "New Kind of Science", where essentially some programs cannot be shortcutted by any other means than to simply run the full program from the beginning - with the physical world itself being the ultimate program encapsulating all others. In this case, economies of scale would make it more feasible to have a large scale cloud do the computations, and transmit the final products to the thin client.)

Finally, in the limit of infinite storage, it would seem that this favors the personal device model since, for example, you could download all of NetFlix or the Google index for personal use. Though the main limitation in this line of reasoning is that this "infinity in the palm of your hand" would become outdated at any time greater than t = 0.

So it seems theoretically, infinite communication and computation favors the mainframe model, whereas infinite storage favors the personal device model.

Of course, reality is much messier. For one of many tangible examples, these fundamental resources of communication, computation, and storage don't have prices attached to them to even come close to permitting efficiently interconversion between them. For example, what are the relative costs of keeping in local storage on the client side a collection of 100,000 high definition movies vs. streaming them from a cloud server on demand, especially as the price of storage drops on both the server side and the local client side and furthermore complicated by the increase in internet bandwidth? Hard to say, at the least.

So looping back to the original considerations about client side vs. server side, of course many other factors need to be accounted for, since the real world does not have a vastly disproportionate amount or price difference between these resources. Even if a definite solution could be calculated at t = 0,  there's still plenty of uncertainty going forward in the relative price/performance ratio of the three fundamental computing resources of communications, computation, and storage, especially since the market is not perfectly efficient to interconvert between them. That being said, it was instructive to consider these issues with respect to a clean and low-dimensional model.

Anyways, glad to get these thoughts articulated, they've been swimming in my head for the past few days as I've been ramping up on AWS, which makes me feel like a kid in a candy store. :)

- Kevin

May 27, 2014

Requirements for Creativity

“When art critics get together, they talk about Form and Structure and Meaning. When artists get together they talk about where you can buy cheap turpentine.”
- Pablo Picasso

I've been thinking a lot lately about what constitutes creativity, especially in the context of very practical concerns involving MedNexus' full stack (tech infrastructure) and business development, that continue to ramp up and I need to think "outside the box" to solve problems at various levels of abstraction, risks, uncertainty, and timescales. (As an aside, thinking outside the box is excellent, but in the chaos and uncertainty of a startup, determining where exactly is the box itself is more important.)

I take the view that creativity does not arise from anything mysterious, intangible, or otherwise opaque. Rather, I believe creativity requires the mastery of (ideally, or at least a very good working facility with) the mundane tasks, boring facts, and mechanical skills that constitute a domain.

In music, there's no improvisation until the musician has enough skill to play an instrument so well that various chords and melodies can happen without almost no conscious effort since they're already internalized. In programming, here is no creative architectures or elegant optimizations of the code unless, for example, a given language's syntax is internalized, along with sound software engineering and basic computer science concepts. A physicist can't make any headway in research without internalizing such basic tasks like calculus or basic concepts like conservation of energy and moment.

To be creative, you must first have internalized all the simple stuff, so your mind is free to entertain higher-level thoughts and imagine possibilities, unburdened by lower-level issues that can be made rote. In other words, to transcend and to be creative, you must first internalize and master the pedestrian stuff that already exists.

This is one view, that's always subject to refinement - what are your views towards creativity?

- Kevin

May 16, 2014

The Entrepreneurial Mindset

MedNexus is currently on the second iteration of its platform, and we have received our fair share of cynicism and rejection along the way. Most of it has helped refine our value proposition - and also brought us to unbelievable lows, where all hope seemed gone.

It is inevitable that investors, market veterans, and even customers will at one point or another shut you down. But your job as en entrepreneur is to take their advice, and take no heed to their skepticism.
The establishment is full of "experts" who will look for reasons why it can't be done. But your job as an entrepreneur is to get busy finding ways to make it work, knowing that maybe, not in 1 month or in 3 months, but in 6 months you will eventually prove them wrong.
The establishment will look at your competitors as an excuse to give up. But your job as an entrepreneur is to try to change the world, not worry about what company X or Y is doing. There will ALWAYS be competition.

There's a reason those people are with the herd and not standing where you are. Innovation takes a certain philosophical mindset, a burning desire to change the status quo, which gives you the mental resiliency to move mountains (and trust me, starting a company is as close to that as it gets). I like to think of myself as an optimist-realist: I try to be pragmatic in the short and medium term, navigating the daily challenges thrown my way and keeping my eyes open for cues from the market. But more importantly an unflinching optimist in the long term, which allows me to get up in the morning and keep forging ahead, even when nothing seems to be going right.

Apr 14, 2014

Hunger to Succeed

What makes an excellent entrepreneur?

I've been asking myself this question a lot lately. It's been two years since I quit my job to pursue entrepreneurship full-time. I've read, discussed, and/or thought much about this question. There exist many opinions - some very well-qualified and some not so qualified - on the characteristics that constitute an excellent entrepreneur.

From my observation and experience, the following traits are the most important and necessary: general IQ, education, specialized knowledge, risk appetite, work ethic, and access to capital. However, any subset of them are insufficient.

The one missing element that unifies all these traits, and whose absence acts as a veto on the strength of all of them, is the Hunger to Succeed. This desire must be insatiable, obsessive, and totally all-consuming, or else all the other traits are insufficient. The hunger to succeed must permeate all thoughts, both when awake and when asleep, to an extent that it dominates everything.

The incorrect perspective and mindset, that I find in many startup enthusiasts:
"I'm going to see if I can get that next raise and promotion, and if the opportunity presents itself, then maybe, just maybe, I'll give entrepreneurship a shot. Hopefully, I can make some money. I'm kinda scared of failing and looking stupid. What things can I put on my resume and LinkedIn profile to show I'm interested in entrepreneurship? I need work-life balance and a general normal life."

The correct perspective and mindset, that I find in some other entrepreneurs and myself:
"I want to succeed so bad that everything else simply doesn't matter. There's no hedging, I'm "all-in." I have absolutely no desire to include another line on my resume or LinkedIn profile in order to secure my next job - I want this venture to make any other job optional. I'm willing to sacrifice everything and work until I drop. Work-life balance be damned. Living a normal life are for people who will never get much accomplished in their lives."

Most of the day-to-day in early-stage entrepreneurship is gritty, annoying, mundane, unsexy, etc. The victories and successes are small, infrequent, and fleeting, but the failures, frustrations, anxieties, and general pain are constant and loom large. The only real way to continue despite these issues is to have that insatiable hunger to succeed. It's the one trait that dominates all others.

- Kevin

Dec 11, 2013

The Importance of Talent

Arguably, one of the most crucial, if not the most crucial decision you have to make as a start-up founder is choosing who you surround yourself with. And knowing how to hire is one of the most difficult parts of the job.

Traditionally, companies emphasize first-order competency in their hiring process. They look at the specific experience and skills you have. Are you good with Excel; can you code in Javascript; are you familiar with Healthcare; have you brought a product to market? Although these big companies will claim to look for "smart people" with "potential", their main imperative is to fill in a specific position with a specific candidate. They are not looking for the best, and why should they? They just need someone who can fill the role with minimal risk and friction. Eric Paley encapsulates this concept well in The Curve of Talent. "The large company corporate world is filled with C players. [...] C performers struggle to competently fill their role, but are somewhat productive with sufficient coaching. [...] Large companies thrive on inertia and the core job description of a large company employee is to keep that inertia going and do nothing to screw it up.

As much as this type of thinking works for large companies, it can lead to costly mistakes for start-ups. Start-ups are constantly on the edge of failure and cannot afford to have reasonably competent individuals at their core - people who deliver only the bare minimum. The truism "If there's any doubt, there's no doubt." is particularly applicable here. What they need are individuals with strong second-order competency - those who can learn quickly, adapt and roll with the punches without losing their resolve.
If you think about return on investment as a curve over time, you will realize that those with simply experience have a higher Y-intercept - they are more valuable at the time of hiring, but their competency is "maxed out". On the contrary, a candidate with greater potential but less relevant experience has a steeper curve - he starts lower but will, not too far down the line, become far more valuable to the company.

Don't hire based on Y-intercept.

(Taken from Professor Ousterhout's class at Stanford).

These individuals are much harder to find, because their potential is not written black on white on their resume. These are hires you can only appraise by sitting down and engaging with, rather than putting them through a formulaic interview process. Not only that, they are very selective about who they choose to work with. So keep looking for that candidate that will give your team a boost, and don't settle.

The compounding return on hiring decisions doesn't only apply to your core team, but all the people who are involved in helping your venture in some shape or form: lawyers, accountants, contractors and even advisers. In these situations, the better options are often the pricier ones, but well worth the cost. Their increased competency and better decision-making will have an outsized effect on the fate of your start-up.
Unless you can't afford it, you are better off with a lawyer who is twice is expensive if you think they are at least twice as good as your other options. Even more so for a top-notch developer who can get the job done 10x as fast and take your product to the next level. A caveat to my point is that the more expensive options are not always the best ones - as with everything you buy, the price tag is reflective of quality only to a certain degree, the rest is up to your better judgement.

The bottom line is, you should always be selective about who you work with, even if that means taking a little longer to find the right person.


Dec 6, 2013

Research, Tech, and Business

Happy to sneak this quick post out. This startup has been consuming every single moment of my waking life, and sometimes I dream about it too. I love writing, both in English and in code (Python, Javascript [jQuery], HTML, CSS, PHP, R) but have been spending almost all my time in code.

Coming from a scientific and math background, was thinking of the relationship between scientific research in a mathematical field, software engineering, and business.

1. Research in Physics and Applied Math
Lifting an 80-pound weight 80% of the time (deep, creative, hard thinking that requires your entire attention) and lifting a 20-pound weight 20% of the time (checking your factors of two, sub- and superscripts, minus signs, and using various prepackaged theorems in, for example, partial differential equations or group theory, and being generally aware of the latest facts in the literature).

2. Software Engineering and Coding
Lifting an 80-pound weight 60% of the time (conceptualization and problem-solving on slightly less difficult problems than pure physics/math, on average) and 40-pound weight 40% of the time (actually writing the code efficiently while not making various syntactic/semantic mistakes, bread and butter debugging and testing, following proper software engineering principles).

3. Business and Entrepreneurship
Lifting a 20-pound weight 80% of the time (logistical, operational, and housekeeping tasks that need to be done efficiently, such as following up with people, lower-level soft skills, executing plans efficiently and cost-effectively) and an 80-pound weight 20% of the time (strategizing and deeply understanding how macroeconomic/market factors relate to the microeconomic concerns of your business, or higher-level soft skills such as understanding the various incentives of all parties).

- Kevin

Jun 11, 2013

Market vs. Technological Risk

We've observed the proliferation of social, mobile and gaming start-ups in the last few years, and how some of them managed to hit the 'lottery ticket' and make large exits, while most others crash and burn. It is my opinion that most start-ups in those spaces are doomed to failure due to the intense competitiveness of those markets. Or at the very least unable to build a long term business model by focusing purely on user growth.


A better way of understanding the current problem in the start-up ecosystem is to think about market risk vs. technological risk. The risk involved in creating a new company is inevitably a mixture of those two, and it is interesting to think about where on the spectrum a given start-up will fall.

Many of the over-valued and 'pump and dump' start-ups in the social, e-commerce and mobile space are faced with the challenge of extreme market risk. Although they are not necessarily tackling a difficult problem from a technological standpoint, the intense competition with other similar start-ups and uncertainty when it comes to user adoption and monetization make them highly volatile. And their outcome is less in the hands of the founders, thus the label of 'lottery ticket'.
The only ones that succeed are those that manage to create their own specific market (ex: Twitter) or brand themselves exceptionally (ex: Zappos). 
For that reason, many start-up will often try to label themselves as unique or different, and narrow their market, despite that not being the case. They will tell intersection stories: LinkedIn ∩ Artists ∩ Online Gallery. Peter Thiel has a good example of this type of start-up:
"Starting a new South Indian food restaurant on Castro Street ... is, a hard way to make money. It’s a big, competitive market. But when you focus on your one or two differentiating factors, it’s easy to convince yourself that it’s not."
There is a rush to get into the 'trendy' markets and get a product off the ground quickly, pivot as many times as necessary and get accelerated ad nauseum, losing sight of any real long term goal. Even though the initial execution might be easier, at the end of the day the same amount of sweat and tears is involved than with an ambitious, long-term focused idea.


Contrast that with major tech companies like Google or Apple. During their inception, most of the risk involved coming up with the right technology to address the market needs, and pulling it off. They were not worried about how unique their market is, how many users they need to get in order to get to the next stage of funding, or how they will monetize, because their product was fundamentally novel, useful and difficult to pull off. They are shielding themselves from a hyper-competitive market with a high barrier to entry.
An extreme example of technological risk is SpaceX. The market risk is virtually nonexistent - they will find clients if they can create a relatively cheap and reliable rocket - but getting there involves considerable effort and risk.
Tackling difficult and concrete problems reduces the importance of market risk (albeit not completely, since product/market fit is always paramount) and puts more emphasis on the type of risk that founders have control over: addressing specific customer needs, improving the quality of the product.
As Paul Grahams says:
"That scariness makes ambitious ideas doubly valuable. In addition to their intrinsic value, they're like undervalued stocks in the sense that there's less demand for them among founders. If you pick an ambitious idea, you'll have less competition, because everyone else will have been frightened off by the challenges involved."


I believe that if more start-ups where tackling difficult problems, rather than going for what is 'trendy' and easily executable, we would not be in a climate of market risk and facing the Series A crunch that we are facing today.

May 23, 2013

Political Philosophy and Population Density

I always identified most closely with libertarianism, but found that the deeper I thought and the more facts I used to inform and challenge my thinking, the more I could see libertarianism's limitations in particular and could understand (and sometimes even believe) arguments from any part of the political spectrum in general.

To this end, I've been thinking of how theorizing about political philosophy according to axioms and in a vacuum is highly limited, in particular since it does not account for population density.

For example, take NYC Mayor Bloomberg's proposed and unsuccessful ban on soda and sugary drinks sold in containers greater than 16 ounces. The core justification of this paternalistic regulation was to protect people from themselves. It's a fact that over 10% of adults in NYC have diabetes and this regulation would mitigate some of the problems that NYC residents face and furthermore lower the costs of healthcare provided to those people.

On the other hand, civil libertarians believe this ban infringes on citizens' right to choice and furthermore imposes various compliance costs on both vendors and buyers that act effectively as an extra tax. Why should the government have so much power over the free exchange of money for goods, especially when that money was obtained by hard work?

Of course, my immediate reaction to the soda ban was one of outrage and was more closely aligned with the civil libertarian point of view. Since I find it compulsory to challenge my own views, I've been considering the meaning of individual liberty and responsibility, especially when tempered and informed by economic concerns and in the context of population density.

Freedom of choice is an interesting concept in itself. For example, what does social freedom mean when you lack economic freedom? Would a liberal person dare voice their views on abortion, religion, or taxes in the public domain if their employer, and means of sustenance, were conservative? Likewise, would a conservative person dare voice their views on immigration, healthcare, or education if their employer were liberal? What does personal choice mean when someone does not have sufficient education or intelligence to comprehend the ramifications of their choices? This is especially unclear when there may exist influences that are heavily incentivized to compel people to bad choices, such as the tobacco or junk food industry.

Let us first propose a thought experiment that not only the soda ban took place, but bans on unhealthy foods, smoking, and alcohol and in general paternalistic laws also forced people to make more beneficial life choices such as exercising. Quality of life would go up since people would generally be healthier and therefore healthcare costs to support health complications stemming from obesity, diabetes, and other afflictions would go down.

Now let us take the more libertarian point of view that no paternalistic laws are ever passed and people are free to choose. Here, healthcare costs would spike. Those with private insurance would see a spike in their premiums. The healthcare provided to those with Medicaid and Medicare would exact a higher cost from the rest of society, in both the explicit and visible form of higher taxes and more hidden and implicit form of higher costs to employers who must contribute to their employees' healthcare.

In both cases, there is baseline that must be paid, that represents the cost of living in society. These costs may change depending on the density of the population. In the first case with the paternalistic laws, the citizens must pay in terms of individual liberty, and more so for higher population density. In the second case with libertarian laws, the citizens would instead pay with quantity and quality of healthy life (for those who choose unwisely) or with their economic resources, and again more so with a higher population density.

These costs are the tradeoff for the benefits that come from living in a society. For the price of taxes and a few restrictions on your liberty, you benefit from paved roads and their maintenance to travel, communications systems to keep in touch and conduct business, police officers to protect you and your property, and so on. Any one of these beneficial services and goods could occupy all of your energy, attention, and time. Taxes are a mechanism that allow for the realization of economies of scale, and loss of personal liberty is an accompanying and inevitable cost.

I've found that accounting for population density may contextualize problems in political philosophy in such a way that many conflicting viewpoints can both be correct. Consider the two extremes of high and low population density. In an area with a high population density like NYC, it's hard to justify the unrestricted ownership and free sales of handguns and other firearms since the extra dangers posed to the group may outweigh the benefits of protection for the individual. However, in an area of low population density like in rural America, there are almost no detrimental effects of law-abiding citizens amassing even huge arsenals of firearms. Taking this to the extreme, imagine if humanity were able to exist in such low density as 1 person per solar system. In this case, even the personal ownership and recreational use of high-yield nuclear bombs would be harmless (I suppose one way to interpret this would be to have your very own star).

When viewed in the context of population density, many political positions are neither absolutely correct nor incorrect, but are more or less so according to the population density. I say 'many' and not all ,since some political issues that go beyond the fundamental tension of the individual and the group, for example, various positions on abortion or civil rights issues. Regardless, progress in political philosophy can be made if population density is accounted for, even if not definite resolution is achieved.

- Kevin

Apr 3, 2013

Thoughts on Testing Software

As my co-founder Nat and I are building out our backend systems using Python, Mongo, etc., we're writing suites of test code that are starting to rival or even surpass the production code base in both size and complexity since there's so much to consider: unit tests, functional tests, and end-to-end tests, as well as tests of (time-dependent) data quality, each of which could be a full-time job in itself. Thought I'd take a breather from the marathon known as founding a company to consider some ideas about software testing in general.

From my knowledge of and experience with large-scale software engineering, testing code is not just added value to existing code, but is fundamentally just as important as the production code itself. "How Google Tests Code" by James Whittaker, James Arbon, and Jeff Carollo gave a fascinating look into how Google structures its development. It was interesting that the status and monetary rewards given to testers at Google are on par with pure software engineers. There currently exist three software engineer titles at Google with a varying degree of testing duties: 
  • Software Engineer (SWE) is the traditional developer role concerned with writing code that gets used by consumers.
  • Software Engineers in Test (SET) is also a developer role, but with a focus on testability and general test infrastructure.
  • Test Engineer (TE) have responsibilities that overlap with the SETs, but with more focus towards users. 
Fortunately or unfortunately, startup founders need to do all three, while under many different pressures.

Production Code :: Testing Code
I've been considering the complementary roles of production code and testing code. Production code in relation to the test code that serves to test it should not be viewed as two different aspects of software development, but rather intimately related to form an indistinguishable whole. The list below organizes related concepts, with left hand and right hand terms related. These distinctions are not perfectly independent, but provide a first approximation to consider such related ideas.

Schrodinger Picture :: Heisenberg Picture
I view the complementary relationship between production and testing code as akin to the two ways that quantum mechanics (the field in which I did my phd dissertation research) may be formulated under either the Schrodinger Picture or the Heisenberg Picture. (Please feel free to move onto the next sections if you haven't had exposure to quantum mechanics, as those other sections consider the same ideas in a different context.) In the Schrodinger Picture, the state vectors describing a quantum system evolve in time, but the operators that act on them remain time independent. In the Heisenberg Picture, in contrast, the state vectors themselves remain time-independent and while the operators evolve in time. One may view production code as the system of interest more akin to the Schrodinger picture, while focusing on the changing test environment in which the code executes more akin to the Heisenberg Picture.

System of Interest :: Environment
One way to understand how quantum systems lose their quantum properties is through the process of Decoherence, in which there is no collapse of the wavefunction and instead the environment acts continuously to weakly measure the system of interest, eventually so that a purely quantum system with such quantum properties as superposition, entanglement, and non-locality transitions into a classical system that no longer exhibits those qualities. Taking this view further, not only can the environment be viewed as a large factor in understand your quantum state of interest, but it is fundamentally involved in defining the very nature of what can be observed in the quantum system itself (in particular, what base is the environment measuring the quantum system of interest). To connect this with production and test code, you can consider the production code as the system of interest, with the testing code acting to place it different environments with different parameters.

Observed :: Observer (but not strictly)
The production code is the system that is observed, whereas the various external factors that affect it serve to "observe" it under different circumstances. Production code may be correct only when observed in a specific set of ways.

Low Degrees of Freedom :: High Degrees of Freedom
We can view production code as having a lower number of degrees of freedom of interest compared to the higher degrees of freedom in testing. When writing the code, we assume that we understand the failure points and write exception handling to deal with known unknowns accordingly. Testing allows you to expand these known unknowns artificially to encompass a larger space of possibilities or degrees of freedom.

Current Outcome :: Counterfactual
Production code concerns what is tangible, concrete, and exists right now, and various error handling accounts for what the programmer understands encompassing a small set of cases that intuitively make sense. On the other hand, the space of branching points and data flow through your code is essentially infinite. For example, an unsigned long int in C++ goes from 0 to 4294967295. A complete and perfect testing program would need to account for all the other "counterfactual branchings" in addition to the current long int the program is processing or is stored in memory.

Subject :: White Space
Just like the text in a page or the subject of a photograph respectively require white space and empty space to defines or enhances the subject (it's hard to read text that's bunched up together and a self portrait taken in the middle of a busy nightclub probably isn't very flattering, haha) , production code needs testing code to better define it.

Truth :: Context of Truth
In general, a bug-free program with some initial set of conditions processing data works to produce a "truth", however that truth is only truthful under the specific context in which it exists in. Testing defines a context in which code is true (as an aside, the testing context is only a small subset of all testing contexts).

...

After writing this long post about some ideas I've had about testing, I can't help thinking about testing the testing code itself, testing that code, and so on. However, that's an asymptotic and inductive process that takes very long. How long? Much longer than it takes for the funding to our startup to run out! :)

So with that, will have to sign off and get back to writing test code. I hope you enjoyed this post as much as I enjoyed writing it, it was a nice refreshing change of pace with the thousands upon thousands of lines of Python code (and test code) I've been writing.

- Kevin