Evan Hahn's blog
https://evanhahn.com/blog/
My blog, mostly about programming.
フィード

Things I wish I knew about Ring Fit Adventure
Evan Hahn's blog
I’ve played a lot of Ring Fit Adventure, the fitness game for Nintendo Switch. Here are some things I wish I knew when I got started.Jump over battles to skip themYou can jump over enemies to avoid fighting them!I first discovered this when watching a speedrun of the game. If you see some enemies in a level, you can use your (double) jump to avoid the battle completely. This is useful if you want to get to the end of a level faster, or if you don’t want to stop running.Sometimes this is a little tricky and I miss, and I believe some fights can’t be skipped. And skipping too many fights seems to defeat the purpose of the game!Jiggle the Ring-Con to delay an exerciseRing Fit typically waits for you to be in position for about three seconds before it starts an exercise, but sometimes it guesses wrong and starts before you’re ready!To avoid this, I jiggle the Ring-Con. That way, the game doesn’t think I’m standing still ready for the excercise.Remove the leg strap during static stretchingR
6日前

Notes from April 2025
Evan Hahn's blog
A roundup of my notes from April. I’ve done this for the last few months:MarchFebruaryJanuaryThings I publishedI published a small UI tip about rounding percentages. In short, I don’t think you should show “100%” to the user unless it’s truly done, or “0%” unless it truly hasn’t started. Though this is a bit of a lie, I think it’s clearer to users.I posted clippings from Life in Code: A Personal History of Technology, a book of essays by Ellen Ullman. The book criticizes Silicon Valley (where I was born and raised!) and the modern tech scene. Yet Ullman seems to retain hope that these tools can be part of a better world. Perhaps I’m projecting, because that’s basically how I feel.I read the Economist’s style guide book and published my main takeaways. I think my writing is better after reading!Not something I published, but I was featured on DWeb’s social media and they chose a truly dreadful photo of me. Also, an old post of mine was featured on Remember The Milk’s blog.Things I wrote
10日前

UI tip: maybe don't round percentages to 0% or 100%
Evan Hahn's blog
In short: maybe don’t round to 0% or 100% in your UI.I am not a UI expert. But I sometimes build user interfaces, and I sometimes want to render a percentage to the user. For example, something like “you’ve downloaded 45% of this file”.In my experience, it’s often better to round this number but avoid rounding to 0% or 100%.Rounding to 0% is bad because the user may think there’s been no progress. Even the smallest nonzero ratio, like 0.00001%, should render as 1%.Rounding to 100% is bad because the user may think things are done when they aren’t, and it’s better to show 99%. Ratios like 99.9% should still render as 99%, even if they technically round to 100%.For example, in your UI:Ratio (out of 1) Rendered 0 0% 0.00001 1% 0.01 1% 0.02 2% 0.99 99% 0.99999 99% 1 100% Here’s some Python code that demonstrates the algorithm I like to use:def render_ratio(ratio): if ratio <= 0: return "0%" if ratio >= 1: return "100%" if ratio <= 0.01: return "1%" if ratio >= 0.99: return "99%" return f"{
22日前

Takeaways from The Economist's style guide book
Evan Hahn's blog
I’ve been trying to improve my writing so I read Writing with Style, the Economist’s style guide book.Here were my main takeaways:Use short sentences. They’re more memorable. They’re easier to read. They’re generally easier to write.Colons are for setup and delivery. They describe them as “dramatic”.One thought per paragraph. The paragraph is a “unit of thought”, according to this book and to H.W. Fowler. Sometimes, you have a one-sentence paragraph because the thought fits into a single sentence.Prefer simpler terms. Use “get” instead of “obtain”, “make” instead of “manufacture”, or “give up” instead of “relinquish”. Ask if you ever use the word when talking to friends. And don’t soften difficult topics: “a poor person has no more money, opportunity or dignity when described as ‘deprived’, ‘disadvantaged’ or ‘underprivileged’.”The right word can eliminate others. More specific words let you “dispense with adjectives and adverbs entirely. Consider the difference between ‘walk’ and ‘str
25日前

Notes from "Life in Code: A Personal History of Technology"
Evan Hahn's blog
Life in Code: A Personal History of Technologyis a book of essays by Ellen Ullman.In the book, Ullman laments the bad parts of computers and the internet. Thesesystems eroded privacy, deepened income inequality, and enabled the rise ofmodern fascism. And they were built by a tiny subset of people—young men, mostlywhite and Asian, mostly wealthy—to the exclusion of almost everyone else.Despite all this, she maintains a hopeful fascination with technology. Perhapshumanity can use these tools as part of a better world.I share this sentiment, I think.Many of the stories are old by Silicon Valley standards, but they feelprescient. The book is filled with ideas that could be written today, if youmodernized a few incidental details.These are my notes and quotes from the book.“Outside of Time” (1994)Ullman on the idea that low-level development is more respected: “If you wantmoney and prestige, you need to write code that only machines or otherprogrammers understand.” Oh, and these prestigious
1ヶ月前

Notes from March 2025
Evan Hahn's blog
Here’s a little roundup of things I’ve done in March. Also see my entries from February and January.Words I wrote in MarchI published a few blog posts this month:“Why ‘alias’ is my last resort for aliases” explains why I prefer defining scripts over shell aliases. I’ve been doing this for years and finally wrote about it.Response to this post, at least on Lobsters and Hacker News, was mixed. It was on the front page of Lobsters for awhile, but only briefly peeked into the bottom of the HN front page. Some people agreed with my idea and some did not.I also learned a few things about aliases from comments and emails, and have a few edits to my dotfiles I’d like to make.“Filling in the gaps of the internet” describes a philosophy of mine: if I ask a question, can’t easily find the answer, and then eventually find the answer, it’s my duty to publish something. I’ve done this many times on my blog. Some of those posts have gone nowhere, but others are very popular, and others have even been
1ヶ月前

Cheatsheet for Rink, the unit-aware calculator
Evan Hahn's blog
Rink is a unit-aware calculator for the command line and your browser. I’ve been wanting something like it for years!Here’s a Rink cheatsheet I made for myself. I hope it’s useful to others!Basic conversionsRink can do a bunch of basic conversions, such as converting Fahrenheit to Celsius or kilometers to miles.Basic unit conversions:> 10 pounds to kilogramsapprox. 4.535923 kilogram (mass)> 32 degF to degC0 °C (temperature)Byte conversions:> 1 KB to B1000 byte (information)> 1 KiB to B1024 byte (information)See “How big is a kilobyte?”.Work with ratios:> 0.25 -> percent25 percent (dimensionless)> 25 percent0.25 (dimensionless)> 100 meters * 25 percent25 meter (length)Convert currenciesTo convert euros to Indian rupees:> 1 EUR to INR94.5045 INR (money)By default, conversion rates update from the internet once an hour. You can configure this feature, including disabling it.Numeric suffixesYou can avoid typing a lot of extra zeroes with helpers like “billion” and “thousand”:> 1 billion /
2ヶ月前

Everything we know about the next Zelda game, as of March 2025
Evan Hahn's blog
In short: it’ll probably emphasize player freedom, not be a “dungeon editor” game, and won’t reuse the same map of Hyrule. See my post at Zelda Dungeon for more.I enjoyed rounding up all pre-release information about The Legend of Zelda: Tears of the Kingdom. I’m back to do this for the next Zelda title.I researched everything we know about the game so far and published a long post on Zelda Dungeon. Spoiler: we don’t know much, but we know a few little details:The new game is probably well under way, but it’ll be awhile before we see it.The classic Zelda formula, from games like Ocarina of Time, probably isn’t coming back. Breath of the Wild charted a new direction for the series, emphasizing player freedom and an open world.A “Zelda Maker” is also unlikely. We probably won’t see a game based around a dungeon/level editor.Tears of the Kingdom reused Breath of the Wild’s world. The next game will probably not do this, and will feature a new setting.This is just a quick summary of what w
2ヶ月前

Filling in the gaps of the internet
Evan Hahn's blog
Here’s a small philosophy I have about the internet:I believe that it’s my duty to publish the answer to previously-unanswered questions. That way, the next person who comes along has an easier time.For example, I was once trying to figure out how to skip the first line of a CSV file in Python. When I did a web search for “python skip first line of CSV”, I couldn’t find the answer.After a few minutes, I figured it out myself. Then, I wrote a quick blog post explaining my solution…and now it’s one of the most popular posts on my site! Even though the post only took a few minutes to write, it’s been one of my most viewed over the last decade, (presumably) because so many people are trying to do the exact same thing.Another post, showing how to disable ESLint for a single file, has been comparably visited. Same story: I figured out how to do something and wrote a few words about it. And now, a few times a year, someone DMs me telling me they came across my blog when trying to disable ESLi
2ヶ月前

Notes from "Beyond Measure: The Hidden History of Measurement"
Evan Hahn's blog
I just finished James Vincent’s Beyond Measure, a 2023 book about the history of measurement and its impact on our lives.The book reveals how the meter’s length is tied to the French Revolution. It highlights many scientific discoveries linked to advances in measurement. It links land surveying and the genocide of Native Americans. It even explains why the US and UK stubbornly refuse to adopt the metric system!I took some notes while reading and thought I’d share them here.Introduction: Why measurement mattersThe metric system is perhaps the most significant side-effect of the French Revolution.Numbers can lie, and that includes measurement.Chapter 1: The kindling of civilizationThere are three main properties of a good measurement: accessibility, proportionality (“no one wants to measure mountains with matchsticks”), and consistency.Old measures of distance included “how much tobacco will I smoke on this journey” or the distance you can hear a dog’s bark.Chapter 2: Measure and the soc
2ヶ月前