Making a dream Vietnamese input method for Linux

Cũng đã vài năm trôi qua từ ngày tôi bắt đầu thực hiện hóa ước mơ bộ gõ tiếng Việt trên Linux. Nhớ lại những ngày ấy với niềm háo hức còn trào dâng rồi dần dà vơi đi khi mà việc nắm bắt kiến trúc bộ gõ trên Linux còn rất nhiều thử thách.

Là một người dùng Linux khá lâu nhưng cái cảm giác ngờ ngợ khi lần đầu cài đặt và sử dụng ibus-unikey trên Ubuntu rồi nhìn thấy dấu gạch chân (preedit) xuất hiện là một trải nghiệm không thể quên. Hồi đó qua phim ảnh cũng biết được khi gõ tiếng Hàn, Nhật hay Trung đều có dấu gạch chân này nhưng tại sao gõ tiếng Việt lại dùng nó.

Và cũng rất nhiều người có câu hỏi tương tự. Một blog post khai sáng cho tôi giải thích rất chi tiết về lịch sử, kiến trúc, cách hoạt động cũng như giới hạn của bộ gõ trên Linux. Bài viết rất hay và tôi vẫn thường mở ra đọc sau khi cau mày gõ một nội dung trên trình duyệt chờ nhấn space cho suggestion/history hiện lên để còn truy cập nhanh vào đường link mình muốn.

Read more...

Anubis

I’ve always relied on simple, practical defenses for web services — basic rate limiting, HTTP headers, and cautious CORS rules. But now we’re in the era of AI, and small websites are facing new challenges they’ve never had to deal with before.

Scraping used to be obvious. It usually came from a single IP or a small cluster of addresses within the same network range, often hammering your endpoints without delay. Blocking could be simple: identify the subnet, drop it with a firewall rule, and move on.

But now, large-scale language models and dataset builders operate through distributed scraping pipelines — thousands of nodes spread across residential proxies, cloud functions, and edge servers. Each one behaves “politely,” sending low-frequency, well-formed requests that look identical to legitimate human clients. They are not well-behaved: they ignore your robots.txt, ignore your User-Agent blocks, ignore your X-Robots-Tag headers, and they will scrape your site until it falls over — and then scrape it again after it comes back online[1][2].

Even search engine bots at least give you visitors. AI scrapers, on the other hand, make money from your content and give you nothing in return.

Read more...

DuckDB

Working as an integration engineer has taught me a lot about systems and design. Once the product you work on matures, there will inevitably be requirements to integrate with third-party systems.

One of the most challenging aspects, in my experience, is designing the architecture for integration, only to find that new third-party systems don’t fully align with your design. You have to deal with a wide range of technologies, API rate limits, and unnoticed data changes that can break your inbound and outbound flows.

That’s why monitoring the integration system is a key process. I didn’t do this as often as I should, and there were also limitations in the resources I could work with to build an effective monitoring setup.

Third-party systems fail too. Sometimes they send bad data. If the volume is acceptable, we might ignore it. But how do you measure that volume? You need the right database to analyze and visualize historical data.

Read more...

To escape the maze of optimizations

In the past, I used to work with map data visualization and one of the pain task was loading GeoJSON files. The amount of data is large enough to make browser interactions lagged. And they were all loaded from the beginning regardless zoom levels. One of many lessons as of web developers that we know we should use pagination. But at that time, I wondered what criteria I should use. You know, the map boundary was determined based on a center point and a zoom level, and the center point has its coordinations in floating-point numbers. They can’t be used for chunked and cacheable endpoints. Until one day I learn about Uber’s hexagon grid[0] which helps me created the endpoints to split the data into chunks. Nevertheless, the project schedule was short and went to an end but I have carried the feeling that the implementation wasn’t optimal.

Read more...

To refresh API response cache

Recently I learn to use axios-cache-interceptor, besides invalidating cache once data get updated, during development I still need to manually invalidate cache by deleting cache entries in the devtools.

Read more...

Downloading videos

Sometimes it’s not simple as right clicking on the video and hit “Save video as…”

In the case, I usually go to network tab in the dev tools and find the video link, maybe make it a little bit easier by filtering by media tag.

Recently I face some challenge where the video chunks I downloaded can’t be opened. The binary data is in png image format. I quickly change the extension to mp4 but for most of the videos, it doesn’t work.

Read more...

Normalization of Deviance

Bài viết được dịch từ Quá trình bình thường hóa của sự lệch lạc (2015)


Có bao giờ bạn đề cập đến một chuyện hết sức bình thường đối với bạn nhưng khiến mọi người ngạc nhiên chưa? Tôi hay bị như vậy khi có những chuyện đồng nghiệp nào của tôi cũng nghĩ đó là bình thường. Vì lý do nào đó, khuôn mặt của người đang nói chuyện với tôi đang cười chuyển dần sang kinh ngạc. Dưới đây là một vài ví dụ tiêu biểu.

Read more...