Most of my projects are on GitHub. I'm currently with the Portland Trail Blazers.

Consistently Good

I learned a lesson: it was easy to be great. Every entertainer has a night when everything is clicking. These nights are accidental and statistical: like lucky cards in poker, you can count on them occurring over time. What was hard was to be good, consistently good, night after night, no matter what the abominable circumstances.

— Steve Martin, Born Standing Up

Checklist Manifesto

Recently finished reading Checklist Manifesto, and thought this excerpt was great:

Some years ago Geoff Smart, a PhD psychologist who was then at Claremont Graduate University, conducted a revealing research project. He studied fifty-one venture capitalists, people who make gutsy, high-risk, multimillion-dollar investments in unproven start-up companies. Their work is quite unlike that of money managers, who invest in established companies with track records and public financial statements one can analyze…

Then there were investors Smart called Airline Captains. They took a methodical, checklist-driven approach to their task. Studying past mistakes and lessons from others in the field, they built formal checks into their process. They forced themselves to be disciplined and not to skip steps, even when they found someone they “knew” intuitively was a real prospect.

Smart tracked their success over time. There was no question which style was the most effective — and by now you should be able to guess which one: the Airline Captain. Those taking the checklist-driven approach had a 10% likelihood of later having to fire senior management for incompetence or concluding that their original evaluation was inaccurate. The others had at least a 50% likelihood.

The Airline Captains had a median 80% return on investments studied, the others had 35% or less… The most interesting discovery was that, despite the disadvantages, most investors were either Art Critics or Sponges — intuitive decision makers instead of systematic analysts. Only one in eight took the Airline Captain approach. Smart published his findings more than a decade ago. When I asked him, now that the knowledge is out, whether the proportion of major investors taking the more orderly, checklist-driven approach has increased substantially, he could only report: “No. It’s the same.”

We don’t like checklists. They can be painstaking. They’re not much fun. But I don’t think the issue here is mere laziness. There’s something deeper, more visceral going on when people ask away not only from saving lives but from making money. It somehow feels beneath us to use a checklist, an embarrassment. It runs counter to deeply held beliefs about how the truly great among us — those we aspire to be — handle situations of high stakes and complexity. The truly great are daring. They improvise. They do not have protocols and checklists… Maybe our idea of heroism needs updating.

Logarithmic Time Scale

How many seconds are there in a lifetime? 10^9 seconds

A second is an arbitrary time unit, but one that is based on our experience. Our visual system is bombarded by snapshots at a rate of around 3 per second caused by rapid eye movements called saccades. Athletes often win or lose a race by a fraction of a second. If you earned a dollar for every second in your life you would be a billionaire. However, a second can feel like a minute in front of an audience and a quiet weekend can disappear in a flash. As a child, a summer seemed to last forever, but as an adult, summer is over almost before it begins. William James speculated that subjective time was measured in novel experiences, which become rarer as you get older. Perhaps life is lived on a logarithmic time scale, compressed toward the end.

— Terrence Sejnowski, Powers of Ten


I have always said that people are experience-rich and theory-poor, and that they have these lives that are dense with really interesting experiences. Things happen to us. Now more than ever, we’re exposed, we travel. We have these jobs that are involving and fascinating. What we lack is some way of making sense of all that.

— Malcolm Gladwell

Definitive Statements

Our greatest PR coup was a two-part one. We estimated, based on some fairly informal math, that there were about 5,000 stores on the Web. We got one paper to print this number, which seemed neutral enough. But once this “fact” was out there in print, we could quote it to other publications, and claim that with 1,000 users we had 20% of the online store market.

This was roughly true. We really did have the biggest share of the online store market, and 5,000 was our best guess at its size. But the way the story appeared in the press sounded a lot more definite. Reporters like definitive statements.

The Submarine


Over Thanksgiving dinner, Saul Griffith was complaining about the lack of mathematical literacy among people who should know better. “Take all that talk about the exponential growth of various web sites. Don’t people realize that those curves are actually sigmoidal?”

And of course, he’s right. These curves look exponential but eventually they do flatten out. In fact, one of the most important sigmoidal functions is the logistic function, originally developed to model the growth of populations.

Wikipedia notes: “The initial stage of growth is approximately exponential; then, as saturation begins, the growth slows, and at maturity, growth stops.” In fact, most of these curves aren’t even sigmoidal, they are sinusoidal. (This is, incidentally, why Ray Kurzweil is most likely wrong about the singularity.)


An Academic Reactor

Originally written in 1953, but as relevant to software development as anything I’ve come across:

An academic reactor or reactor plant almost always has the following basic characteristics: It is simple. It is small. It is cheap. It is light. It can be built very quickly. It is very flexible in purpose (“omnibus reactor”). Very little development is required. It will use mostly “off-the-shelf” components. The reactor is in the study phase. It is not being built now.

On the other hand, a practical reactor plant can be distinguished by the following characteristics: It is being built now. It is behind schedule. It is requiring an immense amount of development on apparently trivial items. Corrosion, in particular, is a problem. It is very expensive. It takes a long time to build because of the engineering development problems. It is large. It is heavy. It is complicated.

The tools of the academic-reactor designer are a piece of paper and a pencil with an eraser. If a mistake is made, it can always be erased and changed. If the practical-reactor designer errs, he wears the mistake around his neck; it cannot be erased. Everyone can see it.

H.G. Rickover


Take a few minutes to ponder the ramifications; the food we eat may literally be making us dumber. And yes, food is a major pesticide source despite what industry might claim… The most important enzyme responsible for breaking down these pesticides in the human body is called serum paraoxanase. Some people have a lot of paraoxanase activity and are able to break down the pesticides really fast. Guess which subpopulation scientists are beginning to find has significantly reduced paraoxanase activity? People with autism.


The Correct Way of Playing

It is not even so simple, though, as to say that the “correct” way of playing is the one that wins most often, for only the dourest of Gradgrinds would claim that success is measured merely in points and trophies; there must also be room for romance. That tension — between beauty and cynicism, between what Brazilians call futebol d’arte and futebol de resultados — is a constant, perhaps because it is so fundamental, not merely to sport, but also to life: to win, or to play the game well? It is hard to think of any significant actions that are not in some way a negotiation between the two extremes of pragmatism and idealism.

Inverting the Pyramid


Three days after the massacre in Charleston, Colbert returned to his hometown to lay flowers at the steps of Emanuel AME and join the peace march across the Arthur Ravenel Jr. Bridge. He described it as the most moving and affirming gathering he’d ever witnessed.

“We would have done it, if we had to,” he said when I asked if any part of him had felt a desire to talk about it on the air. “But no,” he said. “It’s such an old form of a particular evil. Such a pure form, that it feels very old. It was like a dragon showed up. Like, yeah, there used to be dragons. I didn’t know there still were dragons…”

Stephen Colbert

Part of the Game

As I pulled out of the Gimbels’ driveway, careful to avoid the ducks, I thought about something he said when I pointed out how weirdly even-keeled he seemed about everything. “You must learn how to lose,” he explained. “Part of playing the game is losing.”


Data Science

Some of these choices may put-off some potential readers. But it is our goal to try and spend our time on what a data scientist needs to do. Our point: the data scientist is responsible for end to end results, which is not always entirely fun. If you want to specialize in machine learning algorithms or only big data infrastructure, that is a fine goal. However, the job of the data scientist is to understand and orchestrate all of the steps (working with domain experts, curating data, using data tools, and applying machine learning and statistics).

Once you define what a data scientist does, you find fewer people want to work as one.

Win-Vector Blog


All I want to do is make better sushi. I do the same thing over and over, improving bit by bit. There is always a yearning to achieve more. I’ll continue to climb, trying to reach the top, but no one knows where the top is. Even at my age, after decades of work, I don’t think I have achieved perfection.

Jiro Dreams of Sushi

Outcome Irrelevant

One thing that became very clear, especially after Gorbachev came to power and confounded the predictions of both liberals and conservatives, was that even though nobody predicted the direction that Gorbachev was taking the Soviet Union, virtually everybody after the fact had a compelling explanation for it. We seemed to be working in what one psychologist called an “outcome-irrelevant learning situation.” People drew whatever lessons they wanted from history.


Heroic Solutions

Or to put it another way: Cocoa is so very prone to have heroic solutions that require you unerringly to write heroic or at least merely mistake-less code.

Key-Value Observing. Cocoa Bindings. Retain/release. The thing they invented – ARC – to solve retain/release. Weak-referencing self in blocks or creating memory leaks. Autolayout. I consider myself a decent programmer, but I try to work out the complexity involved in completely implementing all-frills NSDocument loading and saving and I get winded.

There are operating system kernels with lower cyclomatic complexity.

Hard Core

The Novice

The young are taught that Hollywood and art are antithetical. The novice, therefore, wanting to be recognized as an artist, falls into the trap of writing a screenplay not for what it is, but for what it’s not. He avoids closure, active characters, chronology, and causality to avoid the taint of commercialism. As a result, pretentiousness poisons his work.

Robert McKee

Flappy Bird by the Numbers

After hearing about Flappy Bird the past couple days, I decided to download its 68,000 iTunes reviews last night. I explain some of the technical details down below, but I honestly don’t think that’s the most interesting story here. In fact, while the internet keeps pushing The Verge’s $50,000-a-day story about the app, I think the onslaught of Flappy Bird downloads that’s happened in the past two weeks is a much more interesting storyline.

Flappy Bird Daily Reviews (US App Store)

In late December and early January, I’m guessing Dong Nguyen probably used some sort of service to download/rate Flappy Bird on the App Store. The end goal was probably to generate some buzz for a game that originally had been released at the end of May and then updated in September for iOS 7. With six months of nothing happening on a game he had made in a week’s spare time, a marketing experiment around the holiday download season couldn’t hurt.

It worked. Flappy Bird started getting over 20 reviews a day (sometimes a whole 5 reviews in a single hour). At the time, this had to be somewhat encouraging. I mean, with weeks of nothing happening, 20 reviews every day from the end of December until the beginning of January had to be a good start.

On January 9th, Flappy Bird hit the milestone of 90 reviews in a single day. The experiment paid off. The game could become a niche success with thousands of downloads (approximating from review count). And, that’s the end of the story.

But wait, by the 12th, that number doubled — and by the 17th, it doubled again. The game no one cared about was up to over 400 reviews a day. On the 18th, over 600 — on the 19th, more than 680.

And, then it started to come back down to Earth. Still over 600 reviews a day on January 20th and 21st, but it had probably peaked. All good things must come to an end, right?

Except January 22nd was the first day of 100 reviews in an hour. In a single hour, 100 reviews. A new record of 800 total reviews on the day. If you keep that in mind, and use the numbers as a yardstick for what his download count must have looked like, the next week must have been absolutely insane.

On the 24th, Flappy Bird had 136 reviews submitted in a single hour — over 1,100 total reviews on the day. Two days later, on January 26th, it peaked at 206 an hour (and 1,600 reviews on the day). Two days later, 330 reviews an hour. The next day, over 400. On January 30th, more than 500 reviews in an hour (more than 4,600 total reviews on the day). On the last day of the month, more than 630 reviews in a single hour — 5,500 total on the day.

And then, February 1st hit.

You’ve got to keep in mind that this game is a Helicopter clone with Mario-inspired graphics. It was made in a single week, and largely ignored by users for months. The initial release was ignored. The update was ignored. The reviews and ratings during the holiday season were ignored.

Even after possibly using some sort of small bot network, the total app downloads had to be relatively minor at the beginning of January. It was still going completely unnoticed on the App Store. (I’d suggest probably less than 10,000 iOS devices had Flappy Bird on them before January 9th.)

January 22nd Dong Nguyen was probably extremely excited about the couple months worth of revenue his marketing experiment had pulled off. With the recurring in-game ads and 800 reviews in a single day, Flappy Bird was beyond a success. Mission accomplished.

February 1st Dong Nguyen, on the other hand, must have questioned if the world had lost its mind.

On February 1st, reviews exploded to 800 in a single hour. 6,500 iTunes App Store reviews in a single day. February 1st is the day Dong Nguyen woke up, stretched, checked email, checked Twitter, checked iTunes, and witnessed millions of downloads happening.


You can only imagine what that must have felt like.

This is the same app no one cared about for more than half a year. Just one month prior, it was a great day if Flappy Bird got 20 total reviews on the App Store. Up until January 9th, there had never been an hour in which Flappy Bird received even 10 reviews (most of the time it was under 5).

After that, the rest is history. An obscure game no one loved became the most downloaded app on the App Store (not of all time, but of the moment). The App Store even tweeted their high score. And then, he took it down.

This is less a story about a guy making $50,000 a day and more about a developer who just rode one hell of a roller coaster this past month.

Technical Notes

If you think of iTunes as a big hybrid native/web app (which it is), then it’s probably safe to assume JSON/HTML APIs exist for apps and reviews (which there are). I used Charles and wrote a simple Scrapy project to download the 68,000 reviews and user pages.

I was originally planning to focus on the December/January Flappy Bird reviews — I thought it’d be fun to prove that they were most likely bots. After loading the reviews into pandas and playing around with the data, though, it became pretty clear those had little to nothing to do with the success of Flappy Bird.

The bump in reviews on January 9th probably started the snowball effect for Flappy Bird. I’m not exactly sure what influencer or dumb luck helped make that possible, but the 20ish reviews each day at the end of December are a pretty moot point. Diving into the numbers for the past two weeks, I’d be surprised if Dong even remembers that time. He’s seriously been on one hell of a roller coaster ride — and that ended up being much more interesting (at least to me).

Build Almost Nothing

I graduated from YCombinator a few months ago (S12 Easel). One of the most interesting parts of experience was being very close to my fellow batchmates. I was able to see in real-time and almost first-hand all the little struggles and successes. I got to see a huge variety of different skill-type distributions – some companies with all tech founders, some with mostly non-tech founders – attack their problem spaces in many different ways.

As a technical guy, watching the companies who were solving non-technical problems was particularly eye opening. I developed an extreme appreciation and respect for these hustling skills. To give an overview, their approach was generally this: build almost nothing at first (MVP!), pound the pavement and get customers to pay right away for a service they do manually, then build things to make the manual pains go away as they get more customers. It even worked for one technical team – an enterprise API. When called, the API would just email the founders, they would do the work manually, then asynchronously return the result.

This approach has wormed its way into my brain and I now think about startups in one of two categories: tech-first and service-first.

Ben Ogle

Two, Four, Six

The first experiment I know of concerning this phenomenon was done by the psychologist P.C. Wason. He presented subjects with the three-number sequence of 2, 4, 6 and asked them to try to guess the rule generating it. Their method of guessing was to produce other three-number sequences, to which the experimenter would response “yes” or “no” depending on whether the new sequences were consistent with the rule. Once confident with their answers, the subjects would formulate the rule.

The correct rule was “numbers in ascending order,” nothing more. Very few subjects discovered it because in order to do so they had to offer a series in descending order (that they experimenter would say “no” to). Wason noticed that the subjects had a rule in mind, but gave him examples aimed at confirming it instead of trying to supply series that were inconsistent with their hypothesis. Subjects tenaciously kept trying to confirm the rules that they had made up.

This experiment inspired a collection of similar tests, of which another examples: Subjects were asked which questions to ask to find out whether a person was extroverted or not, purportedly for another type of experiment. It was established that subjects supplied mostly questions for which a “yes” answer would support their hypothesis.

But there are exceptions. Among them figure chess grand masters, who, it has been shown, actually do focus on where a speculative move might be weak; rookies, by comparison, look for confirmatory instances instead of falsifying ones. But don’t play chess to practice skepticism. Scientists believe that it is the search for their own weaknesses that makes them good chess players, not the practice of chess that turns them into skeptics. Similarly, the speculator George Soros, when making a financial bet, keeps looking for instances that would prove his initial theory wrong. This, perhaps, is true self-confidence: the ability to look at the world without the need to find signs that stroke one’s ego.

The Black Swan


The ceramics teacher announced on opening day that he was dividing the class into two groups. All those on the left side of the studio, he said, would be graded solely on the quantity of work they produced, all those on the right solely on its quality.

His procedure was simple: on the final day of class he would bring in his bathroom scales and weigh the work of the “quantity” group: fifty pound of pots rated an “A”, forty pounds a “B”, and so on. Those being graded on “quality”, however, needed to produce only one pot — albeit a perfect one — to get an “A”.

Well, came grading time and a curious fact emerged: the works of highest quality were all produced by the group being graded for quantity.

It seems that while the “quantity” group was busily churning out piles of work — and learning from their mistakes — the “quality” group had sat theorizing about perfection, and in the end had little more to show for their efforts than grandiose theories and a pile of dead clay.

Art & Fear


Dear DeMarcus, please deliver upon us the bounty of your glorious pass rush abilities. May the opposing QB ever be weary of your imposing presence. And, by the will of the almighty Landry, may the opposing QB be destroyed by you and your brethren.


Defence Scheme No. 1

Defence Scheme No. 1 was a plan created by Canadian Director of Military Operations and Intelligence Lieutenant Colonel James “Buster” Sutherland Brown, for a Canadian counterattack of the United States.

The purpose of invading America was to allow time for Canada to prepare its war effort and to receive aid from Britain. According to the plan, Canadian flying columns stationed in Pacific Command in western Canada would immediately be sent to seize Seattle, Spokane, and Portland.

Troops stationed in Prairie Command would be sent to attack Fargo and Great Falls, then move to Minneapolis. Troops from Quebec would be sent to seize Albany in a surprise counterattack while Maritime troops would attack Maine. When resistance to the Canadians grew they would retreat to their own borders, destroying bridges and railways to hinder American pursuit.

In 1928, Defence Scheme No. 1 was terminated. While never fully justified, when declassified information about the United States’ War Plan Red was released, Defence Scheme No. 1 demonstrated the foresight of such an operation, especially in that it was prepared before War Plan Red was researched.


Space Jam

One of my favorite finds from HN comments, in a thread about the still-running Space Jam website.

I used to run the servers for this site back in 2001 and it was old then. Sad to see that www2 has still survived, that was the result of a migration off some older servers.

I’m not surprised that nothing has been cleaned up, we were still running Netscape Enterprise Server about 5 years after everyone else had given up on it and moved to Apache. They had a compiled NSAPI module to serve ads through and the company had gone out of business, so we couldn’t get an Apache module.

They used to buy so many domain combinations for each new movie that we had to set up a separate cluster just to do 302 redirects to the canonical name for each, otherwise the configs became unmanageable.



“Ask them to name the starting five for the 2009 Heat.”

“I doubt they could name the starting five for the 2013 Heat.”

“Oh, that’s easy: LeBron, his friend Wade, Christopher Bush, the shorter, chubbier Wade, and then I think LeBron again.”



I only have one piece of advice for you: when the time comes, step up to the plate, smack that ball out of the park, look ‘em in the eye, and don’t say shit.


Web Apps

Web apps, or as I like to call them: skins around databases.

Programming Is Terrible

How Dare You

How dare you sir, demean our night of quite literal self congratulation with your extremely profitable style of offensive humor which you were specifically hired to enact and which we knowingly paid you to produce, who do you think you are, ricky gervais, wait you mean you aren’t ricky gervais, sir, how dare you, this is about art.

Chris Mohney


Stable patterns in Conway’s Game of Life are hard not to notice, especially the ones that move. It is natural to think of them as persistent entities, but remember that a cellular automata is made of cells; there is no such thing as a toad or a loaf. Gliders and other spaceships are even less real because they are not even made up of the same cells over time. So these patterns are like constellations of stars. We perceive them because we are good at seeing patterns, or because we have active imaginations, but they are not real.


Well, not so fast. Many entities that we consider “real” are also persistent patterns of entities at a smaller scale. Hurricanes are just patterns of air flow, but we give them personal names. And people, like gliders, are not made up of the same cells over time. But even if you replace every cell in your body, we consider you the same person.

This is not a new observation — about 2500 years ago Heraclitus pointed out that you can’t step in the same river twice — but the entities that appear in the Game of Life are a useful test case for thinking about philosophical realism.

In the context of philosophy, realism is the view that entities in the world exist independent of human perception and conception. By “perception” I mean the information that we get from our senses, and by “conception” I mean the mental model we form of the world. For example, our vision systems perceive something like a 2-D projection of a scene, and our brains use that image to construct a 3-D model of the objects in the scene.

Scientific realism pertains to scientific theories and the entities they postulate. A theory postulates an entity if it is expressed in terms of the properties and behavior of the entity. For example, Mendelian genetics postulates a “gene” as a unit that controls a heritable characteristic. Eventually we discovered that genes are encoded in DNA, but for about 50 years, a gene was just a postulated entity.

— Allen B. Downey, Think Complexity


Hollywood is a town where they honor their heroes by writing their names on the pavement to be walked on by fat people and peed on by dogs. It seemed like a great place to come and be ambitious.

The Story Behind Banksy


The writer Umberto Eco belongs to that small class of scholars who are encyclopedic, insightful, and nondull. He is the owner of a large personal library (containing thirty thousand books), and separates visitors into two categories: those who react with “Wow! Signore, professore dottore Eco, what a library you have! How many of these books have you read?” and the others — a very small minority — who get the point that a private library is not an ego-boosting appendage but a research tool. Read books are far less valuable than unread ones. The library should contain as much of what you don’t know as your financial means, mortgage rates and the currently tight real-estate market allows you to put there. You will accumulate more knowledge and more books as you grow older, and the growing number of unread books on the shelves will look at you menancingly. Indeed, the more you know, the larger the rows of unread books. Let us call this collection of unread books an antilibrary.

The Black Swan

Nine Again

I hadn’t realized, until I was forcibly divested of it, that I’d been harboring the idea that someday, when this whole crazy adventure was over, I would at some point be nine again, sitting around the dinner table with Mom and Dad and my sister.

Tim Kreider

Noise and Meaning

We are still very close to our ancestors who roamed the savannah. The formation of our beliefs is fraught with superstitions — even today (I might say, especially today)…

This confusion strikes people of different persuasions; the literature professor invests a deep meaning into a mere coincidental occurrence of word patterns, while the economist proudly detects “regularities” and “anomalies” in data that are plain random.

At the cost of appearing biased, I have to say that the literary mind can be intentionally prone to the confusion between noise and meaning, that is, between a randomly constructed arrangement and a precisely intended message.

— Nassim Nicholas Taleb, Fooled by Randomness


Millions long for immortality who don’t know what to do with themselves on a rainy Sunday afternoon.

Susan Ertz

Hitchhike to Alaska

This is all just to explain why, when people write me for career advice, I’m as likely to respond with something like “if I were you, I’d hitchhike to Alaska this summer instead.”

My career advice usually falls within the framework of doing the absolute minimum amount of work necessary to prevent starvation, and then doing something that’s not about money, completely outside of supporting structures, and not simply a matter of “consuming experience” with the remaining available time.

Career Advice


“I just took a bath, Jerry. A bath!”

“No good?”

“It’s disgusting. I’m sitting there in a tepid pool of my own filth. All kinds of microscopic parasites and organisms having sex all around me.”

The Shower Head


From a great comment on Reddit, discussing the site’s current “brain drain.”

It isn’t a brain drain, it’s climate change.

The bottom line is that if you want an herb garden with diversity, you need to keep the mint from taking over. If you want an herb garden that takes care of itself, don’t bother planting anything but mint, because after a couple years it’ll be the only thing left.


Iterate and Criticise

The fundamental idea here is that they’re not doing it once, they’re iterating over it, and criticising it. And that’s a key term. Iterate and Criticise. Michael then used Brad Bird’s anecdote of Gower Champion, the theatre and film director of the 30s, who walked into a theatre to see the cast just standing around on the stage, the choreographer just sitting there in the second row with his head in his hands. Gower goes “What’s going on?” “I just don’t know what to do next”, the choreographer goes. Gower replies “Well do something, so we can change it!”. And that’s a fundamental Pixar idea, just keep moving, just keep trying, and something will come up.

Building Tools, Telling Stories, Making Movies at Pixar


I feel like half of being an iOS developer is figuring out how to fuck with UIKit.

Bryan Irace


How do you, when given an unbalanced (otherwise known as unfair) coin, produce a fair result?

I was seriously at a loss as to how to even approach this problem without any type of probabilities or statistics, but then stumbled across the answer on this blog.

It turns out to be fairly easy. Just follow these steps:

  1. Flip the coin twice.
  2. If both tosses are the same (heads-heads or tails-tails), repeat step 1.
  3. If the tosses come up heads-tails, count the toss as heads. If the tosses come up tails-heads, count it as tails.

To see why this method makes even a biased coin fair, let’s pretend we have a weighted coin that comes up heads 60% of the time. If you toss it twice and throw out the result when both tosses are the same, you’re left with two possible outcomes. The probabilities of the two remaining outcomes are the same.

P(HT) = P(TH)
P(H) * P(T) = P(T) * P(H)
0.6 * 0.4 = 0.6 * 0.4 = 0.24

Since both outcomes have exactly the same probability, the bias is removed. This method will work no matter how biased the coin you use, as long as there’s some possibility of it coming up either heads or tails (so no two-headed coins allowed).

This is easily one of my favorite brain teasers.

Flask/iOS screencast

Thought I’d make a quick screencast showing how to use the Ground Control library with a Flask application running on Heroku.


In which Mike Ash blows my mind, by implementing objc_msgSend in assembly:

The need to go fast becomes much less important at this point, partly because it’s already doomed to be slow, and partly because this path should be taken extremely rarely. Because of that, it’s acceptable to drop out of the assembly code and call into more maintainable C.

Fantastic blog post.

Quiet Car

When the train came to my stop I had to walk by his seat again on my way out. “Glad we could come to a peaceful coexistence,” I said as I passed. He raised a finger to stay me a moment. “There are no conflicts of interest,” he pronounced, “between rational men.” This sounded like a questionable proposition to me, but I appreciated the conciliatory gesture. The quote turns out to be from Ayn Rand. I told you we talked like this in the Quiet Car.

Tim Kreider


The driving force behind _Generic is to provide a pseudo type-polymorphism mechanism. For example, the acos macro defined in tgmath.h could be implemented as:

#define acos(X) _Generic((X),    \
    long double complex: cacosl, \
         double complex: cacos,  \
          float complex: cacosf, \
            long double: acosl,  \
                  float: acosf,  \
                default: acos    \

Robert Gamble

Permission To Suck

What they didn’t understand — what most people don’t understand, is that someone doesn’t wave a magic wand and make you successful or good at something. You don’t just head down to the career center at your community college and fill out an application to be a successful entrepreneur, or a famous musician, or a professional basketball player.

You have to give yourself permission to suck first.

David Kadavy

Most Everything

Most everything is download stuff from the network, store it in Core Data, and display it in a table view. Make a few custom controls here and there or some fun animations. That part is fun, but that’s a small part of it.

Sam Soffes


The question is, really, what are you not willing to compromise on?

Good. Cheap. On-time.

Now, that makes it easy and says there are only three factors, but, in the real world, there’s many, many, many, many real factors. But, I think however many aspects of a project there are, the only way to really get it done is to have one of them that your group, your team, your whatever — yourself, if you’re doing it by yourself — is the main one. Right? You’ve got to pick one, and that’s the thing you hang on to, and you do the best you can with the other ones. The one thing you’re not going to bend for, right?

That’s the difference between Apple and Microsoft — the one thing they’re going to hang on to.

With Apple, it’s user experience. That comes first and everything else — everything else — follows after that. It’s always been like that, right? They’ve maybe fallen short at times, but what they’ve always tried to do is make the best experience possible. How it feels to use. How it looks. How elegant it is. What it feels like. Now, what it’s like to buy it. What it’s like to open the box. Right? It’s always about the experience.

It’s not that Microsoft doesn’t care about the user experience, it’s just never been first. I think first has always been that mantra “Windows everywhere.” Right? It’s to get it everywhere, and to get as many features in, and keep as many features in, so that anywhere that they might be able to use it, you can say, “Yes, you can use it.” And, not necessarily that you should, but you can. And, that’s their one thing they hold on to.

John Gruber, Çingleton 2011


He is my best friend, and I am his, but he will go to his grave having never known my name.

The Oatmeal

One Little Pointer

Every Objective-C object must begin with an isa pointer, otherwise the runtime won’t know how to work with it. Everything about a particular object’s type is wrapped up in that one little pointer. The remainder of an object is basically just a big blob and as far as the runtime is concerned, it is irrelevant. It’s up to the individual classes to give that blob meaning.

Mike Ash

Tumblr for iOS

Update: Tumblr for iOS is now completely native.

After updating the Tumblr application for iOS (and coming across Peter Vidani’s Dribbble shot), I decided to take a stab at seeing how it worked. I ended up using both Crunch (for resource files) and Charles (for network traffic). There’s no real voodoo involved to see how things fit together — most of what I did is covered in this NSScreencast episode.

The first thing you notice when looking through Tumblr’s source files? 26 different Mustache templates. Yeah, 26 — and all end with a .html extension.

I really hadn’t noticed that the timeline was one big UIWebView when first playing around with the app — in fact, for awhile (even after finding the templates) I thought maybe each post in the timeline was its own UIWebView held inside a native container. Credit where credit is due, it’s an incredibly nice web interface.

Since all the CSS and JavaScript files are included in the source, I thought it was weird that Mustache.js wasn’t included — and both spin.js and Zepto were — but it actually makes a lot of sense. Behind the scenes, the app’s obviously using the Tumblr API, but the API actually has total control over how the timeline looks and feels. So much so, even the highlighted ribbons in staff posts are done via the API:

  "highlighted": {
      "message": "Now presenting...",
      "icon": "http://assets.tumblr.com/unicorn.png",
      "color": "#498acc"

The API sends 20 resources at a time (posts from users you follow) for the home timeline. Mustache templates are then used (probably with GRMustache) to create the initial HTML document. Based on some of the comments in the app’s JavaScript files (which are incredibly well-commented and easy to read), native code is used to detect how far the user has scrolled.

Once we reach the end of those 20 posts, the API sends 20 more, which go through the Mustache templates to become HTML, and JavaScript is used to append those to the current timeline. The downside to this approach (and I’m sure the engineers are aware of it — the available code is really well-written) is when a user agressively tries scrolling through the timeline. Frame rate drops pretty significantly and scrolling begins to feel sluggish — native containers like UITableView have had hundreds (if not thousands) of man-hours spent on performance and cell reuse for this exact scenario.

While most users won’t ever notice this — I mean, it took me a couple hours to realize it was a single UIWebView even after seeing the static source files — there is another downside. Whenever the user goes back through the timeline a signifcant amount and then exits the application, it can take a really long time to reload. The UIWebView basically has to render the giant HTML timeline again.

But, this post isn’t about a native versus HTML approach, and I’ve got to admit, it’s pretty cool seeing how well the API and Mustache templates mesh together. Basically the entire “logic” behind how the home timeline is displayed exists in the interaction between the two.

Another interesting find was the lack of .nib files (which is actually the opposite of Airbnb’s source). Native UIView files are obviously used when the user begins writing a post (along with a really nice tab bar animation), and are probably written in code. One comment in the Post.css file indicates Storyboards are in use or will soon be used sometime in the future. Update: the Storyboard comment actually refers to storyboard.tumblr.com.

For Future Bryan, this is to make Storyboard interviews look right.

Another great takeaway was how the engineers target Retina devices in CSS:

@media only screen and (-webkit-min-device-pixel-ratio: 2) {
    /* Retina CSS */

Moving on to other parts in the application, I’m inclined to believe that pull-to-refresh is native (and, as a side note, I really like the use of images throughout the UI rather than text). There are also two Core Data .momd directories included in the source, one of which is named STPersistentCache.

After some light testing, I’m pretty sure STPersistentCache caches images locally after they’ve come across the network twice (at least this was the case with larger images — which no longer came over the wire). It actually makes a lot of sense when you think about it: some of the images in the timeline (or other views) will never be accessed again, but those that have been accessed two or more times must be somewhat pertinent to the user.

The other .momd includes 20 entities that make up the basis for the types of posts a user can make, etc. One of the newer entities is FanMail — which has accompanying images in the source — but I was unable to find it when playing around with the app (although, I haven’t interacted with fans on Tumblr).

Some other notes include Tumblr’s use of Flurry for analytics (sends on applicationDidEnterBackground — standard stuff). Also, the minimum version supported is iOS 5.0 (checked Info.plist).

Lastly, I could be completely wrong about some of these details. Crunch and Charles are great tools for seeing assets and network traffic, but they’re not exactly a view source into Tumblr’s Objective-C code. I can say the CSS and JavaScript are incredibly well-written code — within only a couple hours I was able to see how things fit together.

100 Bad Projects

An artist friend of mine once relayed to me a quote:

“Everyone has 1000 bad drawings inside of them. The sooner we get those out, the sooner we can start making better drawings.”

The same holds in programming. Maybe 100 bad projects but there is nothing you can do but get them out of you.

Between my work, homework, and research I was probably at about the 100 project mark when I started be a little less confused about what I was doing. There is nothing I can press more on the new learner than to try and push through these 100 projects as quickly as possible.

Jacob Eiting


Until today, I didn’t really see any significance from Apple removing the default YouTube app from iOS. I hardly ever used it, it was always hidden away in a folder, and, as a regular Reddit user, I never really visit YouTube for original content anymore.

This doesn’t apply to my sister, however.

My sister, who just started kindergarten, sees YouTube in a completely different light. If given the chance, she’ll play with the app for long bursts throughout the day. It’s this wonderful middle-ground between a TV show, movie, and game — with no ads and bite-sized videos she gets to control.

She’s able to transition from a video showing Cars toys, to a video with baby puppies running around on the screen. And, all are just a few minutes long. If she finds one she likes, she can share it with those near her or save to watch later.

The first word she learned how to spell? She learned it looking for a video on Youtube. And, to zero-in on content, she can add “baby” before a type of animal or add a “2” to the end of “Cars” to differentiate between the movies.

This is her version of Reddit, or Digg, or even Ebaum’s World (from pre-YouTube times), but it’s never more than a tap away. If she gets tired of videos, she can just switch back to games, or movies, or play with actual toys.

I also think it helps that the app isn’t skeumorphic in any way. It’s plain, and simple, and usable. She ignores the ratings, and crappy comments, and everything else that doesn’t apply to the videos.

The ability to skip ahead by dragging the wheel must feel like magic, too. Kids don’t get to control much in their surroundings, but she has complete freedom to zero-in on funny parts of videos that she loves — and absolutely nothing gets in her way.

I didn’t have anything like this when I was little. VHS was clumsy and I loved video games, but Ebaum’s World wasn’t really popular until I was approaching middle school — and then I only focused on funny videos of people doing stupid things. She gets to experience something with YouTube that I never really had.

And now, presumably, Google will come out with its own version of a YouTube app for iOS 6 focused on sharing to Google+, and advertising, and all the unnecessary crap that my sister doesn’t really want. She’s going to have to transition from something easy, and useful, and fun, to something that’s most likely subpar and not as good as an older version.

Maybe it’s less about an “Instagram for video” and more about a “YouTube for YouTube.”


If I think about Readablity too much, I get kind of sad.

Brent Simmons

Bye, Posterous

And, that’s that. I’m planning on moving the majority of my Posterous blog posts over to here. Probably should have done this awhile back, but just never got around to it.

I’m pretty happy with the current site (the layout is based off of the GitHub Pages Minimal theme). If anyone’s keeping count, this is the fifth site redesign in the past three years.

I can also confirm that I’m very much in love with Jekyll right now. If you’re interested, all of the code is available on GitHub.


Google has already sidestepped most of Apple’s interface-behavior patents with the newest versions of Android, which might eventually be used by more than a handful of customers.

Marco Arment

Design Guy

Nick is a design guy and it makes sense that Craigslist would horrify him — “it feels stuck in the 1990s, where links are electric blue and everything is underlined.”

But sometimes design doesn’t matter, even though that thought scares the hell out of designers.

Craigslist (and Silicon Valley) Greatly Offends the NY Times

Mobile Development

I think there’s far more low-hanging fruit in making native development easier than in making web/hybrid apps feel “right”. I’ve seen two just good hybrid implementations (Quora and Pocket), and yet I still run into defects using both.

— Clay Allsop, The Shape Of Mobile Development To Come


It is mentioned in the Bible that there will be a music, and all people of all global concern shall play, and dance, and sing this music. It’s in the Revelation. What type of music could that be? Reggae.

Neville Livingston

Combined Hours

Here’s a little secret that often gets overlooked: a lot of the cool UI elements you see are stock Apple elements that have been customised to the brink of no return.

The main reason for this is Apple has put a lot of time and effort into making components that just plain work. A UIScrollView, for example, has had many more combined hours of testing than any app you write could hope to achieve.


I've Got An Idea For An App

“I’ve got an idea for an app” is the new “Will you read my screenplay?”

Hacker News

Ron Swanson

If I wanted to bring a large amount of deviled eggs, but I didn’t want to share them with anyone else, could you guarantee me fridge space?

Ron Swanson

It's Not File Size

Occasionally I would hear a publisher talk about what their readers wanted, but it was always under the guise of some gimmicky new feature that might get them some press attention and rarely about the core content.

It’s Not File Size That’s Killing iPad Magazines


when you don’t create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.

why’s (Poignant) Guide to Ruby


We can’t solve problems by using the same kind of thinking we used when we created them.

Albert Einstein

Programming Languages

I just realized I hate all programming languages.

Alexis Sellier


In the end, we will not remember the words of our enemies, but the silence of our friends.

— Martin Luther King, Jr

Facebook Friends

I noticed that my Facebook social graph bore little resemblance to my real life social graph; even though I was Facebook friends with my real life friends, we barely interacted on the site. Instead I got a steady stream of updates from people I cared little about.

Kevin Burke

The New File System

What this really means is that users of web apps (specifically small business) don’t need to struggle with your crappy UI, and you don’t need to reinvent the spreadsheet to unlock powerful new interactions and possibilities. Holy shit. Do you see it? Is it coming to you now?

Imagine: your customer can modify web app data in their desktop app of choice.

Example: Jimmy runs a small e-commerce business. He’s not a technical person and understands little about how the web functions. He typically puts internet passwords on sticky notes around the office, and gets frustrated when he needs to find one. However, Jimmy spent 12 years prior working for a financial services firm, and knows how to mash up data in an excel spreadsheet like you wouldn’t believe. With Dropbox and a smart web app, Jimmy gets to manage all of his e-commerce product information in a local excel spreadsheet, sitting in that magic box on his desktop.

Eric Ingram


“That’s the duty of the old,” said the Librarian, “to be anxious on behalf of the young. And the duty of the young is to scorn the anxiety of the old.”

They sat for a while longer, and then parted, for it was late, and they were old and anxious.

Philip Pullman, Northern Lights


I realized I was just being lazy and cargo cultish.

“I have data. Seems like it would go in a spreadsheet. So let’s use a table. And of course it should have sortable columns because that’s what spreadsheets have.”

All this got me thinking about if I’m truly designing a solution to a problem if all I’m doing is replicating the features of a spreadsheet in a web app. Why wouldn’t a user just use a spreadsheet then?

Nathan Kontny

Small Business

A lot of small business owners are going to start running their businesses from their smartphones.

Marc Andreessen


The available evidence seems to indicate that at some point, Reed Hastings was a smart guy. Smart enough to count to twenty with his shoes on. Smart enough read pages 1-15 of the kind of introductory strategy text where they solemnly tell you to figure out what business you’re really in. Smart enough to grind Blockbuster into a pile of gleaming blue-and-white sand while launching a streaming service so popular that it now accounts for something like 20% of peak-load internet traffic. If you want to write an article on how he’s a big fat idiot who couldn’t find his ass with both hands in the dark, then you should probably have a theory of the transition between these two states of Reed Hastings. Did he suffer a stroke? Start dating distractingly gorgeous supermodels? Has he been licking the paint chips in his gloriously restored Victorian mansion?

If you do not have a theory—if you believe that Reed Hastings just suddenly and for no apparent reason became an idiot—then one of two things is likely. Either there is some undiagnosed medical condition that Mr. Hastings’ doctor should investigate immediately, or you are committing the fallacy of Chesterton’s fence.

Megan McArdle


Then everybody has to update the spreadsheet. Notice how the focus has moved. Instead of sitting in a room doing other things while the status of our project beckons us on the wall, we’re sitting in our cubicles filling out a spreadsheet once a day. The focus is on remembering to update a tool, not thinking about the status of our project. The tool starts running the project. It becomes the central source for finding out things. Not the people.

If we’re not lucky somebody writes a check for a more “powerful” tool. “Powerful” Agile tools usually have all sorts of fields, checkboxes, and whiz-bangs. They promise all kinds of benefits for teams — track your actual time! Track code changes against tasks! Roll up dozens of projects in a single bound!

There are people who love tools. These are the people who build them, sell them, or have a full-time job to maintain them. To them, tools are the answer to everything. How could you not love something that organizes so much data so easily? Weird thing — these people are also not the people who are actually doing the work.

Tyranny of the Tools


Fallon in Minneapolis started out with a clear if Machiavellian business development program: do work for small, appreciative clients (hair salons, restaurants, muffler shops, etc.), dominate awards competitions, and parlay that fame into bigger, more visible accounts. It worked remarkably well. So well, in fact, that the rest of the industry followed its model. And it worked again (Chiat). And again (Goodby).

Austin Howe


And if you think that Xcode, Python, Processing, or the shit soup of HTML/JavaScript/CSS are any kind of substitute for Hypercard, then read this post again.

Why Hypercard Had to Die


To choose a width of column which makes the text pleasant to read is one of the most important typographic problems. The width of the column must be proportioned to the size of the type.

Overlong columns are wearying to the eye and also have an adverse psychological effect. Overshort columns can also be disturbing because they interrupt the flow of reading and put the reader off by obliging the eye to change lines too rapidly. Lines which are too short or too long reduce the memorability of what is read because too much energy has to be expended. There is a rule which states that a column is easy to read if it is wide enough to accommodate an average of 10 words per line. If the text is of any length, this rule is of practical help. A small amount of text can be set in long or very short lines without disturbing the reader.

Sufficient leading between the lines is of the first importance for easy reading. If the lines are too closely set the eye is forced to “take in” the neighboring lines while reading. Anything that might impair the rhythm of reading should be scrupulously avoided.

Joseph Muller-Brockman


One of the interesting things about picking up the drums was that I realized it had been some time since I had actually tried to learn something new. We spend most of our childhoods learning new things. But as you get older, the frequency with which you develop new talents slows down. Sometimes it stops completely.

Jason Fried


Before writing, communication is evanescent and local; sounds carry a few yards and fade to oblivion. The evanescence of the spoken word went without saying. So fleeting was speech that the rare phenomenon of the echo, a sound heard once and then again, seemed a sort of magic.

— James Gleick, The Information


Practical men, who believe themselves to be quite exempt from any intellectual influence, are usually the slaves of some defunct economist.

— John Maynard Keynes

On Jobs

Steve and I were talking about children one time, and he said the problem with children is that they carry your heart with them. The exact phrase was, “It’s your heart running around outside your body.” That’s a Steve Jobs quote. He had a level of perception about feelings and emotions that was far beyond anything I’ve met in my entire life. His legacy will last for many years, through people he’s trained and people he’s influenced. But what death means is you can’t call—you can’t call him. It’s a loss. I’ll miss talking to him.

Eric Schmidt


The fight’s only interesting if people show up.

— Don King

More Like Bands

Web development shops should be more like bands and less like companies. We get together, collaborate on this site like an album, and then go our separate ways or stick together afterwards.

Mjumbe Poe


I can’t drive and argue with you rubes at the same time!

— Kramer, The Muffin Tops


One of the foremost building architects of the twentieth century, Louis Kahn, offers a useful explanation of the relationship between beauty and design: “Design is not making beauty; beauty emerges from selection, affinities, integration, love.”

Kahn explains that beauty emerges from selection. That is, art comes not so much from the act of creation itself but rather from selecting among a near infinite supply of choices.

The musician has a near-infinite palette combining different instruments, rhythms, scale modes, tempo, and the hard-to-define but easy-to-sense “groove.” The painter starts with some 24 million distinguishable colors to choose from. The writer has the full breadth of the Oxford English Dictionary (all 20 volumes; some 300,000 main entries) from which to select the perfect word.

Creativity comes from the selection and assembly of just the right components in just the right presentation to create the work. And selection — knowing what to select and in what context — comes from pattern matching, and that’s a topic to which we’ll keep returning.

Andy Hunt


But, in fact, the audience has probably seen a number of those ads six, seven, eight times. They’ve only seen the film one time. The ads are actually text they know much better — that they have a much better command of, in terms of the repertory of what they’ve seen and how they understand the medium — probably than the feature film.

William Uricchio