RSS Amplifier

Blog

Franklin Chen

Recent content on Franklin Chen

franklinchen.comRSS feed ↗673 posts

Latest posts

I'm back, after nine years!

I'm back. The last time I updated my Web site was in 2016, nine years ago. My last blog post wasn't even a proper standalone piece of writing, but a reference to writing I did somewhere else. Basically, life happened . What happened? Instead of trying to look back on what happened in the last nine years, I prefer to look forward. I have changed a lot, and the world has changed a lot. Why am I back…

The powerful e5 Pawn break against the Benoni: using it as White, neutralizing it as Black

I've been very busy coaching chess and therefore haven't published any chess writing lately, but I was inspired by a discussion about a chess position with Isaac, the creator of <span class="link-defunct" data-url="https://chesssummit.com/" data-verified="2026-04-15" title="link defunct 2026-04-15: https://chesssummit.com/">Chess Summit</span>, to write a guest <span class="link-defunct"…

On finally achieving the US National Master chess title at age 45: part 1

On December 18, 2015, I finally achieved the United States National Master chess title, at the relatively late age of 45 (I don't have statistics, but I suspect the vast majority of chess players who reach National Master do so in their teens and twenties). I plan to eventually write about how I significantly improved my chess when I returned after a twenty-year break to start playing again ten…

How the X-Files reminded me of the meaning of Martin Luther King Jr.

import { YouTube } from '@astro-community/astro-embed-youtube'; Today was my second official celebration (with a day off from work as a holiday) of Martin Luther King, Jr. Day . (I wrote last year on my first official celebration .) For today, I not only reread MLK's 1963 <span class="link-defunct" data-url="https://www.africa.upenn.edu/Articles_Gen/Letter_Birmingham.html"…

If you were this old man playing chess against a young boy, what would you have done?

I'm going to tell you a true story about an old man and a young boy (age under 10) who played a game of chess in a competitive tournament where prize money was at stake. I'd like you to think about the odd situation that occurred, while looking at it, with empathy , from different points of view: the old man the young boy the boy's parent the tournament director, whose job is to enforce the…

Accidentally discovering and performing some music by Brazilian composer Ernesto Nazareth: Coração que Sente

import { YouTube } from '@astro-community/astro-embed-youtube'; In November, I fell in love with some music I accidentally discovered. What happened was that I was looking for some music for flute and guitar to play, with me on flute and one of my friends on guitar, and I did a simple search in the local library online catalog , and at the top sorted by date was "Brazilian folk tunes for flute and…

24 days of Hackage, 2015: day 24: conclusion and thanks

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 24 ( Reddit discussion ) Whew, it's finally over, this "24 days of Hackage, 2015" project! I never expected to do something like this, ever, and I am grateful to everyone who encouraged me while I was engaged in it. I enjoyed the quality of comments and corrections I got as well as links to…

24 days of Hackage, 2015: day 23: Liquid Haskell: refinement types for the real world

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 23 ( Reddit discussion ) During the course of this article series "24 days of Hackage, 2015", I've made an effort to give a flavor of using QuickCheck to specify contracts that should be satisfied by our code that are not checked at compile time but are checked through randomized testing at run…

24 days of Hackage, 2015: day 22: Shake: the dynamic build system

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 22 ( Reddit discussion ) make , the venerable build system, is flawed in many ways. For me, the main two problems were handling dynamic builds, where something during the build triggers dependencies wanting to write code in a real language, not make -the-Turing-complete-language Many improved…

24 days of Hackage, 2015: day 21: hood, GHood, Hoed: observation oriented debugging in Haskell

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 21 ( Reddit discussion ) How do you debug your Haskell code? I have to confess up front that I don't have a good answer to the question of how I debug in Haskell. I'm not really the right person to talk about debuggers, because the last time I used an official debugging tool was when I was…

24 days of Hackage, 2015: day 20: dimensional: type-checked computation on physical quantities with units

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 20 (<span class="link-defunct" data-url="https://www.reddit.com/r/haskell/comments/3xoe58/24_days_of_hackage_2015_day_20_dimensional/" data-verified="2026-04-15" title="link defunct 2026-04-15: https://www.reddit.com/r/haskell/comments/3xoe58/24_days_of_hackage_2015_day_20_dimensional/">Reddit…

24 days of Hackage, 2015: day 19: ghc-core-html, list-fusion-probe; checking GHC's fusion rewrite rules for erasing intermediate data from existence

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 19 ( Reddit discussion ) The single coolest feature of using Haskell, for me, has to be fusion . The GHC compiler performs this remarkable optimization that can erase entire intermediate data structures from existence. What does that mean, and how can we know it happened? Today I'll show how…

24 days of Hackage, 2015: day 18: vector, vector-algorithms: unleash your inner C programmer!

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 18 ( Reddit discussion ) Often in programming, the right data structure to use is a C-style array, whether treated as immutable or mutable. Ideally, I didn't need to write this article, but I've gotten the impression that many newcomers to Haskell don't know about vector , the library for…

24 days of Hackage, 2015: day 17: ansi-wl-pprint: avoiding string hacking

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 17 ( Reddit discussion ) Today we do the inverse of what we did on day 14 , which was parsing from text to an abstract syntax tree. Today we pretty-print an abstract syntax tree to text. I think that in the wider world of programming, it's very common to see ad hoc, inflexible solutions to this…

24 days of Hackage, 2015: day 16: safe; what is safety anyway?

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 16 ( Reddit discussion ) Today I'm doing something strange: up till now, I've discussed libraries and tools I actually use. Today I'm discussing a library I do not use, while thinking about why I not, and why you or I might want to use it. This library is safe , which aims to protect against the…

24 days of Hackage, 2015: day 15: IOSpec: testing IO; and some QuickCheck tricks

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 15 ( Reddit discussion ) On day 11 , I tangentially mentioned feeling embarrassed that unlike all of my other code examples, because I was using IO , I didn't approach it by writing tests up front. I didn't want to distract from the topic at hand, which had nothing to do with IO but to do with…

24 days of Hackage, 2015: day 14: Earley: a promising newer parser library for Haskell

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 14 ( Reddit discussion ) On day 10 , I showed how to use S-expressions to avoid having to write a custom parser. But writing parsers isn't too bad in Haskell, or is it? The popular parsec library has many problems , because it requires hand-hacked backtracking that causes weird error messages…

24 days of Hackage, 2015: day 13: hint: runtime eval for Haskell

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 13 ( Reddit discussion ) One hallmark of a "dynamic language" such as Lisp and JavaScript is the ability to evaluate code at runtime inside a running process. Since runtime loading of classes is a fundamental feature of Java, is Java a "dynamic language" then? I think the terms "static language"…

24 days of Hackage, 2015: day 12: json-autotype: inferring types from data

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 12 ( Reddit discussion ) Today we revisit a problem from day 4 , in which we grabbed JSON off the Web in order to extract information about it. I mentioned then that we were using an untyped representation for JSON. Ideally, if it's not too onerous, we want to use a typed representation for our…

24 days of Hackage, 2015: day 11: monad-loops: avoiding writing recursive functions by refactoring

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 11 ( Reddit discussion ) I often dislike writing recursive functions. Recursion is a form of goto and therefore recursion is, conceptually, the assembly language low-level infrastructure of functional programming, a fundamental building block but not necessarily something I want to see every…

24 days of Hackage, 2015: day 10: s-cargot: using S-expression syntax

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 10 ( Reddit discussion ) There are times when I'm jealous of the Lisp world. One of those times is when defining some domain-specific language, because in the Lisp world, the natural thing to do is to represent it using S-expressions as the concrete syntax, and not fuss with defining yet another…

24 days of Hackage, 2015: day 9: Template Haskell goodies: here, interpolate, file-embed

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 9 ( Reddit discussion ) A stray negative remark I made on day 8 regarding Haskell and its unergonomic support for multi-line string literals and interpolation led to good comments that I was being misleading because there actually exist good solutions. I already use one of them, but had not…

24 days of Hackage, 2015: day 8: multiset; I wish this were in the standard containers package

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 8 ( Reddit discussion ) I don't remember when it was, but one day I got sick and tired of reimplementing in Haskell the same boilerplate logic when keeping track of many objects classified under the same key. This is a data structure known as a multiset , also known as a bag , in contrast with a…

24 days of Hackage, 2015: day 7: semigroups; NonEmpty list and a case study of types and tests

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 7 ( Reddit discussion ) How often has the following runtime error happened to you, whether in Haskell or in some other language? *** Exception: Prelude.head: empty list Basically, code blew up that assumed a list was nonempty but it wasn't. In fact, posted on Reddit recently was a question about…

24 days of Hackage, 2015: day 6: finding utilities with Hoogle and Hayoo: MissingH, extra

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 6 ( Reddit discussion ) It will never be the case that everything everyone will find useful will already be in the "standard library" for any language ecosystem. However, one of the coolest features of the Haskell ecosystem (which wows all non-Haskellers when I show them), is the ability to…

24 days of Hackage, 2015: day 5: should-not-typecheck: making Haskell sort of dynamically typed with deferred type errors

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 5 ( Reddit discussion ) Have you ever been frustrated when using a statically typed language because there's a type error somewhere in your code base but you want to run your program anyway, either because you don't care about that remote type error that has nothing to do with what you're…

24 days of Hackage, 2015: day 4: wreq: Web client programming; with notes on lens and operator syntax

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 4 ( Reddit discussion ) In the late 1990s, I eagerly bought the book "Web Client Programming with Perl" and used the LWP library to scrape the Web in automated fashion. I continued doing that into the 2000s. I am happy that nowadays, I can just use Haskell to do this kind of programming, in a…

24 days of Hackage, 2015: day 3: HSpec; the importance of testing

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 3 ( Reddit discussion ) I spent my formative years writing software before "testing framework" was in my vocabulary, before "test-driven development" was a thing. I shudder to think of those years, because now I'm a believer in tests and even in test-driven development (TDD), according to my…

24 days of Hackage, 2015: day 2: Regexes with pcre-heavy; standalone Haskell scripts using Stack

Table of contents for the whole series A table of contents is at the top of the article for day 1 . Day 2 ( Reddit discussion ) Don't laugh, but once upon a time, I made Perl my main programming language of choice (between around 1999 and 2010). There were many reasons for this, but one reason was that Perl made it very easy to do text processing using regexes. If you are a seasoned Haskeller, you…

Haskell tidbits: 24 days of Hackage, 2015: day 1: Introduction and Stack

Table of contents for the whole series Day 1: Introduction and Stack Day 2: Regexes with pcre-heavy; standalone Haskell scripts using Stack Day 3: HSpec; the importance of testing Day 4: wreq: Web client programming; with notes on lens and operator syntax Day 5: should-not-typecheck: making Haskell sort of dynamically typed with deferred type errors Day 6: finding utilities with Hoogle and Hayoo:…

Clever chess tactics that were not what they seemed

In round 3 of the current 6-round Pittsburgh Chess Club Tuesday night tournament, I played a very tense game that led to an unusual position with beautiful tactical possibilities. My opponent, Melih, is a strong player who is a winner of the 2015 Pittsburgh Chess Club Championship earlier this year, and had won the last two tournament games we have played, so I came into this game anxious and also…

Report on my talk "A gentle conceptual introduction to functional programming"

On behalf of the relatively new Pittsburgh Functional Programming , I gave an introductory talk held at Google Pittsburgh that I called "A gentle conceptual introduction to functional programming" . This presentation is part of an experiment, a big shift in how I'm trying to talk about not only "functional programming", but any kind of programming and more generally any topic at all (whether it's…

Thoughts on learning that I have eaten English muffins wrong all my life

Today, I found out I had been eating English muffins wrong my whole life. The story This morning, while at breakfast in a hotel before Abby and I were checking out before returning home, I suddenly decided I might as well change things up and eat my egg and sausage patties inside the halves of an English muffin (yesterday I had eaten them alone, and an uninspiring crappy plain bagel on the side).…

The importance of stalemate in chess: how chess is completely different from life

I just saw a cute end to a top-level chess game that ended in a forced draw because the would-be losing side managed a swindle by giving away all his pieces by force in order to create a stalemate . If you don't play chess, a stalemate is what happens when it's your turn to move and you have no legal moves. You can claim a draw when you are totally trapped in this way. So one way of saving an…

Aegis and Cook: what happens when an open source developer dies?

By sheer accident, while I was looking for something else online, I came across a Web site for Aegis , a distributed version control system I used at work back in 1995-1997. I was surprised this software was still alive after twenty years. A lot of software has a very short life span, and since I had not heard anything about Aegis all this time, I would have guessed that it had died. I remembered…

How learning about the Magna Carta in high school changed my life

I couldn't help noticing the headlines in the news lately about the 800th anniversary of the Magna Carta , that historical document from 1215 in England. As I write, apparently there is a celebration being held on the River Thames , even. And I just found a Web site devoted entirely to this 800th anniversary . The Magna Carta has not been on my mind for over thirty years since I first learned…

How Ornette Coleman changed my life

import { YouTube } from '@astro-community/astro-embed-youtube'; The legendary jazz musician Ornette Coleman recently died at age 85. He had not been on my radar for a long time. In fact, I never actually listened to much of his music at all. Yet, my immediate first thought on hearing this news was, Ornette Coleman permanently changed the course of my life . How can this be? First reactions to…

What unexpected life lessons have you learned from your father?

I came across a great story by a guy who wrote an article, <span class="link-defunct" data-url="https://www.bbc.com/news/magazine-32961309" data-verified="2026-04-15" title="link defunct 2026-04-15: https://www.bbc.com/news/magazine-32961309">"How my father gave me a terrifying lesson at 10"</span>. Please read the whole thing before reading further below, where I'll share some stories about my…

Revisiting Bach's Air on G String, from a singing and dancing viewpoint

import { YouTube } from '@astro-community/astro-embed-youtube'; Three years ago, I wrote a post comparing three very different performance styles for Johann Sebastian Bach's famous music, Air on G String and indicating which I preferred. I have received an unexpected number comments over the years, and thought it was time to write an update of my thoughts in response. Primarily, I am responding to…

Why I have never considered using a treadmill desk

Ten years ago, in 2005, a friend of mine sent me an article about a trend among some people to use a treadmill desk in order to squeeze in some exercise while working. He seemed to think it sounded like a cool idea that wouldn't interfere much with work. I have never considered using a treadmill desk. Because of a recent article that seems to confirm my thoughts from a decade ago, I'm posting my…

The many faces of "Stella by Starlight"

import { YouTube } from '@astro-community/astro-embed-youtube'; Recently I got obsessed with the classic 1944 jazz standard "Stella by Starlight" . I thought I'd share some very different interpretations of this music. Harry James, 1947 Here's the original version, not jazz, but slow, sentimental, lush: a sentimental serenade perfect for dancing foxtrot to. Pretty good, if you like "oldies". And…

Yes, I want my writing to be dated!

I just finished migrating both this blog and my programming blog from Octopress 2 to Hugo . During this process, I made sure to preserve my old URLs as well as Disqus, because nothing is as distressing to me, as a reader, as moved or broken links when I'm looking for old blog posts. That said, there's always the possibility of changing the "real" URLs and just using an alias with a URL redirect…

Why I switched from Octopress 2 to Hugo

Until now, I haven't been publishing anything on any of my three blogs for half a year now. There are many reasons, but one of them was that I wanted to migrate away from <span class="link-defunct" data-url="http://octopress.org/" data-verified="2026-04-15" title="link defunct 2026-04-15: http://octopress.org/">Octopress</span> 2. Octopress 2 is ancient and slow and unmaintained, and I'd been…

When did the United States stop being violently anti-Catholic?

I read a great article <span class="link-defunct" data-url="https://aeon.co/magazine/society/is-it-ok-to-be-american-and-catholic/" data-verified="2026-04-15" title="link defunct 2026-04-15: https://aeon.co/magazine/society/is-it-ok-to-be-american-and-catholic/">"The war on Rome"</span> on the history of anti-Catholicism in the United States. This led me immediately to remember some odd…

What happens when you donate your used clothing?

I hate throwing stuff away, and that includes clothing I have that I no longer wear. Abby participates in clothing exchanges with local women in order to avoid wastage, and she takes my clothing also, to give away somewhere when possible. I was interested to read an economics blog post about possible unintended consequences, however, of clothing donations that go to low-income countries.…

Discovering the Eolina, a beautiful musical instrument

import { YouTube } from '@astro-community/astro-embed-youtube'; I just discovered a musical instrument that was new to me, the <span class="link-defunct" data-url="https://www.melodicaworld.com/post_reviews/ballone-burini-eolina-45/" data-verified="2026-04-15" title="link defunct 2026-04-15: https://www.melodicaworld.com/post_reviews/ballone-burini-eolina-45/">Eolina</span>, which has a…

How I forgot to meditate after sixty days in a row of remembering and what that means

I woke up this morning feeling very tired. I also suddenly realized that yesterday, I forgot to set aside time for the daily meditation practice (just ten minutes a day) that I had successfully done for sixty days in a row , having deliberately started it shortly before Thanksgiving . I was pretty angry at myself. But I also thought about how it was possible that I slipped after sixty days, and…

For Martin Luther King, Jr. Day: some black American voices that spoke to me recently

I believe today was the first time in my life I've officially celebrated Martin Luther King, Jr. Day . This means many things to me as an American (I am an Asian-American, son of immigrants). MLK Day became an official holiday at work, finally First of all, I didn't go to work today. This year, 2015, was the year that MLK Day finally became an official university holiday at Carnegie Mellon…

Why I stopped saying something is easy or something is hard

Recently, I decided to monitor how I talk about learning some subject or topic, because of observing both of myself and other people what our reactions can be if I say that something is "easy" or something is "hard". I've come to the conclusion that there are serious drawbacks to saying that something is "easy" or "hard", and an entirely different vocabulary should be used in helping a learner. I…

How to think about Rust ownership versus C++ unique_ptr

The Rust programming language, which is nearing its important version 1.0 release, but already seen a lot of use, has many interesting features, the most prominent of which is its ownership static type system that prevents certain kinds of bugs common in many programs in C or C++. For example, it is common in most applications to create graphs of objects pointing to each other, in which it is not…