We sold our 2018 Nissan Leaf last year. We purchased the car in 2020 with 7,000 miles on it. We drove it 53,000 miles while we owned it. We paid $19,200 for it and sold it for $7,800. It depreciated around $2,300 a year. Here is my review. 2018 model vs. earlier years The 2018 model improved a lot of things: Better driver and passenger seats Better body/frame Looks like a normal car! Handles…
At work, if your job is to move a bunch of heavy things from one side of the room to another, you should use whatever assistive tech you have on hand: a wagon, a forklift… even an AI-powered robot. But at the gym, it makes no sense for that robot to lift weights for you. The point of weightlifting isn’t to move heavy things across the room; it’s to actually lift those heavy things.
Just have notebooks lying around, or on your person. Write grocery lists, doodles, notes on meetings, to-do lists, or stray ideas. Journal. Copy out good lines from books. Anything that has your mental focus will have a more enduring presence in your brain if you write it down. — Writing by Hand is Good for your Brain - Here’s how to do it
So, I use this as an excuse to buy beautiful Moleskine, Leuchtturm, and MUJI notebooks and coloured pens, and I stash them in my gym bag. Each day before class, I open the app and copy the workout into my notebook. I do any necessary calculations, which is the basis of weightlifting training. I lift based on percentages of a “1 rep max” (1RM), which has been established prior, and often these…
Every post I publish represents at least two things I’ve learned: the thing that prompted me to write the post, and the thing I learned in the course of writing it. If I don’t learn anything new while I’m writing, it’s not interesting enough to publish. […] I think the core reason this works is that every single one of my blog posts argues a point. I never publish a post that just gives…
This was a helpful reminder to focus on the basics first. For the median well-off Silicon Valley person spending money on longevity, two free interventions dominate the entire effect of everything they buy by a wide and somewhat embarrassing margin: Get enough sleep, and… Don’t be lonely. Everything downstream of those two things is, at best, rounding error, and at worst, a way to feel like you’re…
Among other things, Fong argues that Costco’s limited selected raises its average product quality. This is similar to to Joan Westenberg’s argument as well. In other words, winnowing selection is a service, not a limitation—especially with Costco’s product catalog. Costco is not known for having the cheapest goods, but it is known for having the cheapest price on its goods, and that is…
Here’s the thing no one acknowledges about the entrepreneurship narrative: it’s written by survivors. The people who write the books, give the TED talks, and post the LinkedIn manifestos about “betting on yourself” are, by definition, the ones for whom the bet paid off. You don’t hear much from the ones who went back to traditional employment after three years of grinding, a depleted savings…
Financial options live in highly liquid markets. You can hold an option on a barrel of oil without knowing the first thing about drilling, and extract value purely through arbitrage. Human value is illiquid and depends on compounding. You can’t buy mastery of a hard skill, a deep friendship, a sense of community, or a real reputation on any spot market. None of it exists in a liquid state. These…
When we record every casual encounter, we’re optimizing for “Information Retrieval” at the expense of “Relationship Formation,” treating our friends // colleagues // loved ones as data sourced to be mined, rather than co-conspirators in the brilliantly messy and intentionally unquantifiable business of being alive. — I’m Begging You to Leave Your AI Note-taker at Home
[…] LLM-generated prose undermines a social contract of sorts: absent LLMs, it is presumed that of the reader and the writer, it is the writer that has undertaken the greater intellectual exertion. (That is, it is more work to write than to read!) For the reader, this is important: should they struggle with an idea, they can reasonably assume that the writer themselves understands it—and it…
Emphasis mine: On my first solo two-night camping trip, I forgot to bring a backup battery to charge my laptop or phone. I was car camping, so I could have charged them that way, but I felt like that was outside the spirit of the exercise, and inconvenient anyway. So instead, I mostly kept my phone turned off. Very quickly, I started being able to think about aspects of my situation that had been…
Poor is the person without Slack. Lack of Slack compounds and traps. Slack means margin for error. You can relax. […] Slack permits planning for the long term. You can invest. Slack enables doing things for your own amusement. You can play games. You can have fun. Slack enables doing the right thing. Stand by your friends. Reward the worthy. Punish the wicked. You can have a code. Slack…
I’ve been thinking about doing this exact thing recently. I was so delighted to run across this post and WriterDeck.org . After reading through this, I installed Ubuntu 26.04 on my Rapsberry Pi 4 B and did this exact thing using Sway : tldr: I installed console-only Debian on an old laptop (no desktop OS at all) I added some packages to make it work better for writing: network-manager for…
I installed Ubuntu Desktop 26.04 (Resolute Racoon) last week. I’ve been surprised at how nice it is to use! That said I ran into a disk space issue this AM. This was strange. I haven’t even been installing much of anything on it! Here’s how I fixed it… Pressing ESC during boot let me see it was hanging trying to start the Gnome Display Manager (GDM) service. Pressing SHIFT…
In my view, the current core AI skill is shifting as much work onto AI agents as possible, without going too far. Many people are under-utilizing agents: not allowing them to investigate bugs or test their changes, or not throwing enough simple tasks at them. Other people are over-utilizing them: using them to write messages that ought to be hand-written, or trusting them to make sweeping changes…
Give me a blank page of my notebook and my pen — I shall fill that page in no time. I’ve been doing this for years now. It doesn’t matter the problem, something with math and numbers: paper and pen. Org structures? Paper and pen. Blog posts? Paper and pen. This seems to work because the human mind abhors the emptiness of a blank page. I typically juice the cycle by writing a heading, a date, or…
Unfuck Your Habitat has a lot of great information for keeping your space tidy. Big fan. Below is one of their best posts. I’ve been doing most of these each night and it makes mornings so much better, especially with a toddler. Wash the dishes in your sink Get your outfit for tomorrow together, including accessories Set up coffee/tea/breakfast Make your lunch Put your keys somewhere obvious…
Thanks for Simon Willison for the link. […] Between 2000 and 2024, farmers sold in total a Colorado-sized chunk of land all on their own, 77 times all land on data center property in 2028, and grew more food than ever on what was left. None of this caused any problems for US food access. And then, in the middle of all this, a farmer in Loudoun County sells a few acres of mediocre hay field…
Today my computer ran out of disk space. I narrowed it down with this command: du -sh /* 2>/dev/null | sort -rh | head -20 The culprit was this file: $HOME/Library/Container/com.docker.docker/Data/vms/0/data/Docker.raw This command showed that my build cache was using over 200 GB: docker system df -v I cleaned it up using: docker system prune --all
I’ve been drilling on LeetCode recently and ran into a problem which I did not know how to solve while using constant extra space : Given a non-empty array of integers nums, every element appears twice except for one. Find that single one. You must implement a solution with a linear runtime complexity and use only constant extra space. Example 1: Input: nums = [2,2,1] Output: 1 Example 2:…
Today I spent some time learning about SQL common table expressions (aka “CTEs”). I already use subqueries, so they were easy to understand. The syntax is very simple: WITH my_cte AS ( SELECT col1, col2, col3 FROM table1 ) SELECT col1, col3 FROM my_cte WHERE ... Here’s a more complex example with two CTEs: WITH my_cte1 AS ( SELECT col1, col2, col3 FROM table1 ), my_cte2 AS (…
Today, I learned about shell process substitution from Bread on Penguin’s latest video . Assume you have two files: $ cat file1 a b c $ cat file2 c b a To see if they are identical when sorted without manually creating your own temporary files , you can: diff < ( sort file1 ) < ( sort file2 ) What is happening here? <() is doing process substitution , which is running the command and then…
I’ve been using Sublime Text as my main text editor since August of 2014. I know it pretty well, but occassionally I still learn something new and useful. Today I learned about the Arithmetic command from a video by OdatNurd . Summary of what I learned Variables The following variables are supported: Variable What it does s The literal selected text i The selected text interpreted as a…
Today I needed to create a new SSH public/private keypair for work. I wanted to make sure I was following modern best practices for this, so I did some reading online. I found these two articles to be very helpful: SSH Key Best Practices for 2025 – Using ed25519, key rotation, and other best practices SSH Agent Explained Things I learned I didn’t ever think to change the comment at the end…
Today I encountered an API which sometimes sends back numbers as strings. Example response: { 'age' : '30' } That’s annoying, because I wanted my struct in Go to be like this: type Person struct { Age int `json:'age'` } I learned that json struct tags have a string option meant for dealing with exactly this sort of problem: The “string” option signals that a field is stored as…
Rebasing your feature branch on main regularly is a good idea. I used to do it like this: # update local copy of main git fetch origin main:main # rebase on local main git rebase main This always felt a litle off because I was worried I’d typo main:main and mess it up. This works just as well and feels much better to me: # update local copy of `origin/main` git fetch # rebase on origin/main…
Here’s how to add key/value pairs to an http.Reqest ’s query string in Go: package main import ( 'fmt' 'net/http' ) func main () { // create a request req , _ := http . NewRequest ( http . MethodGet , 'http://www.example.com/' , nil ) // get the current query string from the http.Request values := req . URL . Query () // add or set values values . Set ( 'myKey1' , 'myVal1' ) //…
I’ve been using Alacritty exclusively for over a year. It’s fantastic! But I listened to an interview with Mitchell Hashimoto and he talked about trying to make terminal multiplexers obsolete. It struck a cord with me. I’ve been using Zellij ever since I switched from Iterm2 to Alacritty and it’s great , but also it can be cumbersome. I find it cumbersome to: Search through…
This interview with Simon Willison is great. It pushed 1 me into using GitHub Issues for my private repositories. They’re wonderful. (In the past, I’ve been just tracking everything in Markdown documents. That worked, but was just OK.) As an example, I have a private GitHub repo with notes and documents for a private network I maintain (as a volunteer). It’s very ad-hoc and I…
There have been four 1 major versions of HTTP in-use in the last 30-ish years: Version RFC Year HTTP/1.0 RFC 1945 1996 HTTP/1.1 RFC 2068 1997 HTTP/2 RFC 7540 2015 HTTP/3 RFC 9114 2022 It’s surprising to me how quickly HTTP/1.1 was released after HTTP/1.0. Less than one year! HTTP/1.0 A simple, text-based protocol. Runs over TCP. Only officially supports a single HTTP request and response…
This blog post by Sean Goedecke was a great read on high-level system design patterns. Most of them were familiar to me, but I got several good ideas from it. Using a database as queue: Sometimes you want to roll your own queue system. For instance, if you want to enqueue a job to run in a month, you probably shouldn’t put an item on the Redis queue. Redis persistence is typically not guaranteed…
Much productivity advice on the internet is too complicated and not actually that helpful. Complicated systems are less likely to be used due to the friction of using them and are more brittle in the face of changing needs. You are better off use basic, flexible systems; you are more likely to use simple systems and simple systems can adapt to change more easily. There are only a few tools you…
I get the impression that a lot of people are overwhelmed by their personal email inbox nowadays and get so much email that they’ve more or less given up on it. I don’t have that problem and that’s by design, not by accident. This post explains the rules I use to keep my personal email useful and very manageable. Unsubscribe aggressively Any time you give your email address out…
I regularly have to look up how to create an Echo router context with (a) path parameters and (b) query parameters, so I’m making this post as a cheat sheet for my future self. Path parameters Example: /some/random/path/:id // create your context ctx := echo . New (). NewContext ( request , response ) // add your path param ctx . SetParamNames ( 'id' ) ctx . SetParamValues ( 'foo' ) Query…
I ran across a blog post by Josh Bleecher Snyder today which has some beautiful backoff algorithms in Go. Capturing them here in case his blog ever goes offline. Algorithm 1 func do ( ctx context . Context ) error { const ( maxAttempts = 10 baseDelay = 1 * time . Second maxDelay = 60 * time . Second ) delay := baseDelay for attempt := range maxAttempts { err := request ( ctx ) if err == nil {…
Today I needed to remove a bad route on macOS. Normally I just reboot to do that, but I decided to learn how to do it without rebooting. Here’s how I did it. First, view the routes to confirm the route is bad: netstat -rn | grep IP_ADDR Grab the IP you care about from the “Destination” column. Use it to delete the route: sudo route -n delete DEST_IP_ADDR Done!
My work laptop was provisioned with a case-insensitive filesystem for some strange reason. This makes renaming stuff in a git repo “fun”: $mv README.md readme.md mv: 'README.md' and 'readme.md' are the same file Here’s a workaround for this problem: # give the file a temp name git mv README.md readme_temp.md git com -m 'Rename 1 of 2' # then name it what you actually want to call…
I got bit by this again today, so I’m writing it down so I can reference it later. When running docker logs -f CONTAINER_NAME | grep -v "foo" | jq , it is important to consider grep’s buffers. I am using GNU grep and, by default, it uses block buffering when not connected to a terminal (which is my case, since I piped it to jq ). This means jq doesn’t get any input until a…
I was playing around with implementing Depth First Search (DFS) and Breadth First Search (BFS) in Go today. I made a tree which looked like this… 0 / \ 1 2 / \ / \ 3 4 5 6 / \ 7 8 I then made some Go code to walk the tree using DFS and BFS: package main import 'fmt' // Node is a very basic struct which represents // a node in the tree. type Node struct { Value int Left * Node Right * Node }…
My blog post from yesterday made me think… how can you marshal and unmarshal enums in Go correctly? So I modified internal/coffee/coffee.go and added a MarshalText() and UnmarshalText() methods: package coffee import ( 'fmt' 'strings' ) //go:generate stringer -linecomment -type=Coffee type Coffee int const ( Drip Coffee = iota // drip coffee Latte // latte Breve // breve Cappuccino //…
I was asked yesterday how you implement enums in Go. I didn’t know, so I spent some time this morning learning how to do it. It turns out this is ridiculously easy to do and Go has the stringer tool which makes it super simple. (stringer codegens the code which prints your enum as a string.) Example I created a repo with the following structure: go.mod main.go internal/coffee/coffee.go…
Getting things ready in advance I’ve been musing on how ridiculously useful it is to get things ready in advance. Especially the day before. Examples: Setting my workout clothes out. (I’m more likely to workout.) Packing my backpack with everything I need for work in the morning. (No hunting around in the morning for stuff when my brain is waking up and wasting 15 minutes or getting…
I’ve been doing a weekly planning session for the last five or so years. It is one of the most helpful things I do to organize my life, keep myself physically healthy, and moving forward. This process has become even more valuable to me since having a child, as I am now responsible for a lot more and time is more scarce. In this post, I’ll describe what I do, why it’s useful, and…
This post documents some testing I did around whether unit tests in Golang are run in parallel. TLDR: Tests in a given package run serially, unless t.Parallel() is specified. To test this, I created two files in a directory named gotest : $ ls one_test.go two_test.go // one_test.go package main import ( 'fmt' 'testing' 'time' ) func TestOne ( t * testing . T ) { fmt . Println ( '1 starts:' , time…
Thanks to Julia Evan’s latest post , I learned that creating new slices by sub-slicing an existing slice has an important caveat: They can sometimes use the same backing array! 😬 This is important to understand if you mutate the sub-slice. Take the below example, wherein we accidentally mutate s1 ! package main import ( 'fmt' ) func main () { s1 := [] int { 0 , 1 , 2 , 3 , 4 , 5 } // len ==…
I run Unifi network gear in my house. As I have multiple wireless access points, I use a controller to manage them so clients can seamlessly roam between them. I run Unifi’s controller software as a Docker container (from here and here ) to save myself from running Yet Another Appliance™ and paying for more hardware. I’ve been running v6 for a while, but recently upgraded to v8. These…
A coworker turned me onto this lovely technique the other day. You can use a git pre-push hook to run all of your Golang unit tests before pushing. To do this, make a the following file: $YOUR_REPO/.git/hooks/pre-push The file must be executable. The file’s contents should be: #!/bin/sh if ! go test ./... ; then echo echo 'Rejecting commit. Unit tests failed.' echo exit 1 fi Easy peasy.
I wore Invisalign braces from January of 2022 to early 2023. They require a lot of brushing and maintenance while wearing them. Here’s a few things I did along the way which made that easier. 1. Create brushing stations You’re going to brush and floss a lot. (Like a lot.) Anytime you eat or drink anything besides water you must remove the Invisalign trays, brush your teeth and trays,…