“Our new AI assistant can answer any finance question—except when our own API names get in its way.” That was the hard‑earned lesson I learned while developing an LLM‑powered chatbot in our platform. AI Agent as a New Interface Layer AI agent powered by large language models (LLMs) is becoming an increasingly important component in modern tech stacks. Think of AI agents as a new kind of middle…
Task queues play a crucial role in managing and processing background jobs efficiently. Whether you need to handle asynchronous tasks, schedule periodic jobs, or manage a large volume of short-lived tasks, task queue libraries can help you achieve these goals. In this post, I explore the most popular Python task queue libraries: Python-RQ , ARQ , Celery , Huey , and Dramatiq . I benchmarked their…
When designing software architecture, what principles should guide your approach? Textbook answers often highlight attributes such as: modularity, scalability, resilience, maintainability, extensibility, and testability. These technical measures are undoubtedly important. However, in practice, many architectures become overly complex because designers often struggle to recognize when enough is…
Updates on 2024-05-18: Adds the English translation Our universe is an extremely advanced game world. The map of this world is infinitely large because it can dynamically expand according to the player’s field of vision. This world is also constantly being improved, so glitches and anomalies often occur. Such a game world is actually created by us, or more precisely, by another form of our…
Parsing a request message from a client is the very beginning step of a web server. A typical GET request in text, for example, may look something like this: GET /steventen HTTP/1.1\r\n Host: github.com Accept-Language: en-us Accept: text/json User-Agent: curl/7.16.3 Cookie: a=123; b=456;\r\n\r\n This syntax and content follow RFC 7230 and RFC 7231 . When a web server receives the above message…
For my small personal projects, I usually use Slack as a central notification and logging system to help me keep track of the state of my applications. Below is a simple bash function that I use a lot in many of my bash scripts in order to send a notification to a Slack channel: ###### # Send notification messages to a Slack channel by using Slack webhook # # input parameters: # $1 - message…
Our API backend service relies heavily on ActiveModel::Serializer for building response objects. We are using version 0.8 which hasn’t been updated for many years. As part of the effort of upgrading our service to Rails 5 (and eventually Rails 6), we start to seek ways to upgrade active_model_serializers . ActiveModel::Serializers From 0.8 to 0.10 The first candidate is the latest 0.10 of…
In the last post , I talked about command line tools that I use very often for search files. In this post, I will talk about command line tools for manipulating files or text content. Don’t forget to use man command to find detailed usage of a command. The following are commands that I use often to manipulate the content of a file or text input: echo display a line of text cat concatenate files…
The command line utilities that I use most for searching/finding files in Linux operating systems are: find search for files in a directory grep print lines matching a pattern locate find files by name find The basic format of a find command is: find [location] [criteria] [actions] Some common examples are listed below: Find files by some name pattern: find /etc -name "*.conf" Find files by size…
I always believe requirement analysis and implementation design are two important steps that should not be ignored. No matter how small the team is, no matter how short your release period is, and no matter how much cost you can only afford. I find requirement analysis is hard to be ignored, although many teams may not do well on this. That’s probably because that the core of software development…