Jul 6, 2021

No minimum length requirement

I often have blog post ideas that I keep as notes or very short drafts. Maybe I have one or two interesting points about a certain subject and that isn’t enough to really capture everything I want to say about something. So I wait until I have more content.

But often times the waiting never ends. I move on to other things, I realize I don’t know as much as I did about something, or sometimes I just don’t have anything else to say.

I always feel some pressure to write long blog posts or give long talks because that’s what I see everyone else doing. That’s an artificial bar that’s holding back content. So these days I’m like, whatever. If I have a webinar scheduled for 45 minutes, I’d rather have 15 minutes of really good content than those same 15 minutes with 30 minutes of fluff.

Good content doesn’t have a minimum length requirement.

Jun 24, 2021

Finding COVID vaccine appointments with GitHub Actions

To help folks get vaccinated, I made a GitHub Action to scrape appointment slots and post to Discord.

Santa Clara County made all adults eligible for a COVID vaccine on April 15. I wasn’t sure if there would be a rush to get appointments and whether I could get a slot, so I started looking into how I could notify myself and others when there’s a slot available.

Keep reading →

Mar 2, 2021

How to take risks

I thought about risk a lot in 2020. It was hard not to think about risk. I thought about risk every time I put on a mask to go outside. In addition to thinking about avoiding the risk of COVID-19, I actually thought a lot about taking more risks too, but different kinds of risks.

I started trading options a lot more in 2020. The neat thing about options trading is that options are a two-sided market: there are buyers and sellers, and you can choose to be either a buyer or a seller. But only one side can be right and makes money, and the probability of being right plays a big part in how they’re priced. The higher the probability of being right, the less risk involved.

I consider myself to be risk averse. I like to play it safe. I’ve never gotten a speeding ticket, and never even been pulled over. More importantly, I don’t like being wrong. It doesn’t take long before you realize that you’ll make close to no money if you always want to be right, because that involves minimal risk (see risk-return). If you want to make money, you have to take on more risk and accept that you’ll be wrong sometimes.

As I mentioned in the beginning of the post, there are different kinds of risks. There are the “COVID-19” kinds where there’s a small chance of something really bad happening, and then there are the more “options trading” kinds where it’s more likely something bad happens, but it’s not that bad. The former involves ruin, an outcome (health, financial, etc.) that’s very difficult or impossible to recover from. The latter doesn’t; whatever the outcome, you can recover from it.

Sometime last year I watched a video where Nassim Taleb talks about risk taking. He basically says you should be paranoid about risks that involve ruin, but take more risks that don’t involve ruin. That’s exactly what I was doing!

Taking risks is just decision making that involves uncertainty. For any decision, if the benefits outweigh the downsides, you go ahead with it. In some cases, you go ahead with the decision even if the benefits don’t outweigh the downsides because the downsides are tolerable. This is true of options trading: it’s a fair market, and (arguably) a zero-sum game. It’s also true of lottery tickets: on average you’re losing money on every ticket you buy, but buying a $1 ticket has minimal effect on your finances, and winning the lottery can change your life.

Something I realized (unfortunately, only recently) is that there are lots of risks that have no downside. It always makes sense to take those risks: even if you’re wrong, you don’t lose anything.

Most negotiations are like this. Ask for something better, and the worst thing that can happen is that you get a “no.” So far this year I managed to negotiate my rent down by over 10% (with very little effort) and octuple (8 times!!!) my consulting rate with no negotiation by simply asking for more. I should’ve started doing this a long time ago.

Something that surprised me recently was when someone talked about how I took risks at work. Me, taking risks…? It was about how I was one of the few people who actively got involved with POCs and customers early on. Looking back, I guess it was a risk… there was uncertainty, but I didn’t see it as a risk at all: I wanted to get involved with how deals happen and had a lot I wanted to learn. I would make that decision every time.

The last part about taking risks is how to handle being wrong. One thing I learned from options trading is that the best time to manage risk is before you take it on. Afterwards, I think it’s best to just be resilient. Building resilience early on is extremely valuable. It not only protects you against your own risks, but things out of your control too.

To summarize: take small risks, avoid ruin, negotiate more, and build resilience.

Jan 17, 2021

Storing files in SQLite

If you have lots (think millions) of small files and have issues managing them, SQLite may help. A SQLite database is a great way to store lots of files. Here’s how you can turn tons of files into a single SQLite database table.

Keep reading →

Jan 1, 2021

Objectives for 2021

Happy New Year! 2020 was very different than what I was expecting. Even with COVID-19 and its craziness, I’m glad I managed to get through 2020 relatively stress-free. I think the books about resilience I mentioned in my objectives for 2020 post helped with that.

Here are my objectives for 2021, regardless of what kind of year it’ll be.

Keep reading →

Sep 29, 2020

Common Table Expressions

I use WITH clauses in SQL queries a lot these days. WITH is a keyword associated with common table expressions (CTEs). CTEs allow you to temporarily use the results of one query as a table in other queries.

You use them like this:

WITH cte AS (SELECT ...)

When would you want to use CTEs? One case is when you want to use a subquery, that you’re already using as a column, as a WHERE condition. Here’s an example that uses a schema inspired by GitHub issues.

Keep reading→