DONG Yuxuan's Homepage

Programming is an alias of thinking.


Subscribe by RSS or Atom.

Why Intention Locks Are Required in MySQL
Jan 12, 2021 CST

The easiest way to see is putting yourself in the position of a MySQL developer.

Make Your Python Program Configurable
Jan 04, 2021 CST

Programs are used by endpoint users but deployed by other developers, thus making your program easy to configure and conform to Unix system administrators’ mental conventions is important. Using python-dotenv with some little tricks would make it easy to implement in Python.

使用Celery提高Python Web程序的可用性与响应速度
Nov 07, 2020 CST


Parallelly Applying a Function to an Iterable with Multiple Processes in Python
Sep 16, 2020 CST

Usages, traps, workarounds, and practices of multiprocessing.Pool.imap.

c2w: Convert Any CLI Program to a Web Service
Jun 13, 2020 CST

Many experienced hackers have great ideas about technology like a cool algorithm. However, they don’t like to work on the code they think is trivial, for example, making the algorithm a Web service or writing a GUI for it. This will increase the threshold to enjoy the result and make less people understand their work, thus I wrote the c2w utility to convert any CLI program to a web service.

Design Web Pages for Both Screens and Papers
May 13, 2020 CST

Web pages can be temporary. To permanently save valuable documents, people may print your web pages to PDF files or papers. However, most web pages don’t consider what they should look like while be printed. CSS provides the @media print selector to customize styles on papers. We should make use of it to have good reading experience for both screens and papers.

The Effect of Pipe Capacity on Unix Pipeline Performance
Feb 25, 2020 CST

Depending on how two processes exchange data, we need different pipe capacities to maximize performance.

Tips on MacPorts
Feb 03, 2020 CST

MacPorts is the package manager I’m using in macOS. Personally I prefer it than Homebrew. But it also has some flaws so I give some tips about them for MacPorts beginners.

Some Differences between macOS and Common Unix Systems
Feb 01, 2020 CST

Discuss some differences between macOS and common Unix systems to help Unix users get familiar with macOS sooner.

File Systems: An Application Programmer's Perspective
Sep 30, 2019 CST

A highly abstract guide to the file system of Liunx for application programmers, ignoring many difficult details.

Removing What Seam Carving Found
Aug 21, 2019 CST

An algorithm to remove both vertical and horizontal curves found by the seam carving algorithm from an image.

KVDiff: Compare Two Large Text Files by Key Columns
Jun 29, 2019 CST

An algorithm to compare two text files by key columns without loading the whole file into the memory.

Handling Errors in Flask API Services
Apr 13, 2019 CST

Nowadays most modern web applications are developed as SPAs. The server provides only the API which is often in the JSON format instead of rendering HTML. Flask as a great Python web framework can also be used to build the API service but its infrastructures for handling errors are designed for traditional web sites thus we need a usage pattern to make building API services using Flask more convenient.

Feb 19, 2017 CST


Sep 18, 2016 CST


C语言函数原型声明: 从K&R C到C99
Jun 03, 2016 CST


Nov 16, 2015 CST


USACO Section3.3 Camelot 解题报告
Jul 28, 2015 CST