Hegwin.Me

Thoughts grows up by feeding itself with its own words.

The Limits of Photolithography - Questions from reading The Future of Computing by Matz

光刻机的极限--读《代码的未来》产生的疑问

I recently finished reading "The Future of Computing" by Yukihiro Matsumoto (Matz), a book published by Matz in 2012. Although ten years have passed since its publication, some of the technologies mentioned in the book have disappeared and some of the "future" has been realized, it is still a rewarding read in this era. The Future of Computing focuses on...

A Thought-Provoking Exploration of Aging and End-of-Life Care and A Review of Being Mortal by Atul Gawande

关于衰老与老年生活质量,以及《最好的告别》

You have to be prepared for "that", my father's doctor told me when he called me out of the hospital room alone. In May 2022, my father was hospitalized for a stroke, and I returned to his city to care for him for four months, the longest I had stayed in my hometown in over a decade. There were more...

Rotate cookies when upgrading to Rails 7

Rails 7升级过程中针对cookie一系列变化的应对策略

Rails 7 brought a number of new features as well as breaking changes, which made the upgrade from 6.1 more troublesome than the previous one. Rails modified the default cookie serilaizer and the default encryption method, causing incompatibility between the old and new cookies, so the upgrade needs to be done in steps to ensure the best user experience. #...

On Reading the Prince and Comparison on Translation Services

关于阅读《君主论》和翻译工具的比较

Recently, I've been considering changing the cloud service provider of my cell phone, so I'm cleaning up my photo albums to reduce the cost of migration and to say "goodbye to the past" and "not to be burdened by memories". I found some screenshots left when I read the English version of The Prince in 2017. I can't exactly remember...

The Proof of Stirling's approximation

Stirling公式的证明

When describing the time complexity of an algorithm, we often use Big O notation to describe the growth of computation with the size of the problem. For a factorial $n!$ of positive integers, this time complexity is $O(n)$ if a general recursive implementation is used, which represents a linear increase in computational effort as $n$ grows. When $n$ is large,...

The Proof of Wallis' formula

Wallis公式的证明

I read a question on Zhihu "Is there a problem with a result containing 'π' but completely unrelated to the circle?", and I thought of Wallis' formula, which was proposed by John Wallis (1616-1703). The main application still lies in the proof of Sterling's formula. Although Wallis' formula itself seems to be an ordinary infinite product, but his result expresses...

HTTPS Certificate and CAA

关于HTTPS证书和CAA

Last time I talked about using Caddy as a reverse proxy HTTP server, so I don't have to worry about HTTPS certificates, but today I ran into a worrying thing. In addition to the web app of the blog you're reading, I also have some other gadgets hanging on the secondary domain name, such as [wow.hegwin.me](https://wow.hegwin.me/pets) is a warcraft pet...

Use Caddy as reverse proxy server with free HTTPS certificate

使用Caddy作为反向代理服务并获取HTTPS证书

Because of the data loss caused by the previous server OS image replacement, my blog service was stopped for several months, and in the middle of it, my father had a stroke, and I took care of it in my hometown for more than 4 months, so I haven't had time to take care of my personal blog. Today finally...

Windows 10 upgrade from Windows 7 dual boot with Ubuntu

Windows7 + Ubuntu 双系统下,如何升级到 Windows 10

I have a desktop computer purchased in 2014. It was a dual system of Windows 7 + Ubuntu 14.04 and I had been considering upgrading Windows 7 to Windows 10 for a long time, but there were potential problems with the process that made me hesitate to do so. I finally took the plunge and upgraded it recently, and I'll...

Format Your Output in Terminal with Ruby

Ruby命令行格式化输出

If we want to output content in the command line, generally speaking, Ruby basic methods are enough, such as `puts`, `print`, and `sprintf`; but if we want to output color in the terminal, table, and progress bar, etc., it will be more difficult to achieve. Here, I want to share gems that I feel good using in this situation: -...