How expensive is a can of Coke?

Saturday October 21, 2017

The nominal price of a can of coke is a few cents. In actuality, it costs much more.

The scientific consensus is that dietary sugar is a major contributor to type 2 diabetes, obesity, hypertension, and related diseases - collectively called metabolic syndrome. Soda is the number one contributor to dietary sugar in the United States. The only people who seem to disagree are the American Beverage Association. Sound like the Tobacco lobby?

If this societal cost was priced in - how …

Right-joining a table that uses soft delete in Python SQLAlchemy

Saturday September 02, 2017

Typically when implementing a new SQL table, I use soft deletes over hard deletes. Soft deletes enables one to make audit operations without having a separate analytics system, and in many cases (say, purchases which reference old inventory), soft deletes are a requirement.

The only issue is when you try to join a table with soft deletes, funny things can happen. Take the following query, where we have accounts, and active credit cards for people to perform payment, which can …

Reflections on ALC/LifeCycle

Thursday June 22, 2017

It’s been on my bucket list for a few years to bike from San Francisco to Santa Cruz. It’s a beautiful ride along the California coast and takes the better part of a day. At the beginning of this month, I completed that ride, spent the night in a tent, and then kept on biking on my way to Los Angeles.

As part of AIDS/LifeCycle this year, roughly 2200 cyclists rode from San Francisco to Los Angeles …

Identifying Sources of Cost Disease

Wednesday June 14, 2017

Cost disease is one of, if not the, most important problem for society to be tackling right now. Cost disease is the notion that many industries have become dramatically more expensive over time, rather than less expensive, as you might expect with technological improvement. To put cost disease in a political frame, I greatly enjoy this quote from Scott Alexander:

Libertarian-minded people keep talking about how there’s too much red tape and the economy is being throttled. And less …

Book Discussion: Checklist Manifesto

Monday April 10, 2017

Humans are fallible. This idea is the theme of the past three books I've read. Pitch Anything focuses on the idea that people typically make decisions at an instinct level rather than analytically. The Undoing Project shows how humans are heuristic machines, and while the heuristics are right in many cases, they are systematically wrong in others. The Checklist Manifesto prescribes fixes for the limited capacity of our memory and problem-solving ability.

I'm already familiar with the effectiveness of checklists …

Book Notes: The Undoing Project

Tuesday March 21, 2017

Humans are fallible. Importantly however, humans are fallible in predictable ways. That is the main argument of The Undoing Project, and the elucidation of the specific ways we are fallible makes this book one that is worth reading.

These notes are part original and part passages from the book.

Biases

The Israeli military measures the performance of their fighter pilot training programs. They discover that pilots perform better after criticism and worse after praise. What is the problem with this …

Book Notes: Pitch Anything

Thursday March 16, 2017

Pitch Anything is a highly entertaining, and based on the anecdotes from this book, highly effective, sales book.

The methods described are evocative of pick-up artist book "The Game" and might not sit well with everyone. People should learn the sales style that works most effectively for themselves.

These notes are part original and part passages from the book.

Core Idea

The core idea in the book is that everything gets filtered through the limbic system (aka "croc" brain). If …

Dark Money

Sunday May 29, 2016

Dark Money is a both a roller coaster tale and an effective playbook of political influence. It tells the story of the Koch brother’s legacy on both the dialogue of American politics and the platform of the republican party. It made me realize that significant changes to our political landscape (e.g. rise of the Tea Party, Citizens United case) were not random developments in our nation’s history, but were events engineered to occur. It made me realize …