Workspace

A personal site for technical notes, projects, and selected writing by Ray Hu.

Designing a Production-Ready Python Package: Structure, Tooling, and Automation

Designing a Production-Ready Python Package: Structure, Tooling, and Automation

Python packaging has long been shaped by a fragmented ecosystem of loosely connected tools—linters, formatters, build systems, and release workflows—each solving a piece of the problem but rarely forming a coherent whole. Recent developments, particularly the rise of tools like Ruff and the standardization around pyproject.toml, are beginning to change this landscape. This article presents a practical, end-to-end approach to designing a production-ready Python package, covering project structure, modern tooling choices, and CI/CD automation, with an emphasis on clarity, consistency, and maintainability.

Continue reading →

Windows Terminal Configuration

Windows Terminal Configuration

The most exciting part after getting a new machine is configuration! In this post, I will share my configuration of Windows Terminal with PowerShell, focusing on the appearance settings, package management tools, command-line tools, and editor settings. I will walk you through the process of setting up a beautiful and functional terminal experience on Windows, which will greatly enhance your productivity and coding experience.

Continue reading →

Technical Classification and Implementation of Hotkeys in Windows Desktop Applications

Technical Classification and Implementation of Hotkeys in Windows Desktop Applications

Hotkeys are indispensable for enhancing user experience in Windows desktop applications. They enable users to quickly access features, trigger actions, or interact with specific controls using keyboard combinations. In this post, we examine the technical classification of hotkeys within the Windows environment and explore the underlying implementation mechanisms, with a comparative look at how native Win32 APIs and the Qt framework handle these operations.

Continue reading →

Forming Coalition

Forming Coalition

Coalitional games are a type of game theoretical model that study scenarios where agents can reap mutual benefits from cooperation. In such games, a coalition is a group of agents that work together and obtain a payoff for their collective effort. The agents are considered “cooperative” since cooperation yields them more payoffs than non-cooperation. This post discusses on coalition in Lecture 11 in the SC4003 course in NTU. See details below!

Continue reading →

Making Group Decisions: Voting

Making Group Decisions: Voting

In the previous post, we examined how agents make decisions in two-agent games, focusing on the Nash Equilibrium. In this post, we will explore how a group of agents make decisions, delving into the realm of social choice theory. A classic example of social choice theory is voting, where the challenge is to combine individual preferences to derive a social outcome. This post discusses voting mechanism in group decision making in Lecture 10 of the SC4003 course in NTU. Let’s begin!

Continue reading →