UTF-8: A Stroke of Genius

2025-09-13
UTF-8: A Stroke of Genius

UTF-8's brilliance lies in its elegant backward compatibility with ASCII while supporting millions of characters. This article lucidly explains UTF-8's design: it cleverly uses leading bits to signify character length (1-4 bytes), with ASCII characters needing only 1 byte. Examples demonstrate encoding and decoding text with ASCII and emojis. Compared to other encodings, UTF-8's balance of compatibility and extensibility is a masterpiece of design.

Read more
Development

Stop Forcing Dark Mode!

2025-01-19

A blog post vehemently criticizes websites that force dark mode. The author points out that high-contrast dark mode (e.g., pure white text on a pure black background) causes eye strain and discomfort. The article uses contrast ratios and personal reading experiences to illustrate the problem, recommending that website designers follow WCAG guidelines and choose appropriate contrast instead of blindly pursuing dark mode. The author argues that dark mode is beneficial in specific situations (e.g., OLED screens, dark environments), but forcing it is a terrible user experience.

Read more