Some mathematics, coding, and literature

👋 Welcome to Harry’s blog pages.

  • This blog is made by Hugo and Papermod, and is deployed with Github Pages.

Tips on Vscode

I believe mastering the techniques of Vim dramatically increase one’s coding efficiency. Yet in the meantime Vim runs in a terminal, and persisting to code a in terminal nowadays (time of writing was 2026) seems a little too obstinate, considering so many recent advancements on UI that are too difficult to replicate in a terminal. I believe Vim mode in VSCode gives a perfect solution. Vim Mode in VSCode The Vim hotkeys may collide with VSCode hotkeys. I recommend to ignore certain vim hotkeys by adding the following into settings.json (which can be opened by search for User Setting in VSCode) ...

February 24, 2026 · 1 min · 114 words

Eduroam on Linux

Eduroam Connection Problem Eduroam is a wifi service used across the world. It is especially popular in higher eduction institutes. Connection on Linux computer can be done via its Linux connection scirpt here. I have recently experienced unstable eduroam connection, where the wifi is connected but without access to the internet. Here is how I found the problem and fix it. The Fix The problem seems t be cau

February 6, 2026 · 1 min · 69 words

Helpful Resources

This article lists some helpful resources on Rust. Blogs Rust Blog by Pretzelhammer Articles Stack Overflow AsRef<T> in Rust Answered by PretzelHammer.

September 28, 2025 · 1 min

Rust Testing

Reproducible testing is important for reliable software development. Rust has a powerful built-in testing features, so that test can be writting under the test modules, and invoked by cargo test. For more details, see rust doc. This blogs will focus on some convenient use cases. How to Write Tests. fn plus_one(x: i32) -> i32 { x + 1 } fn main() { } #[cfg(test)] mod tests{ #[test] fn it_works() { assert_eq!(2, super::plus_one(1)); } } And fire the test with cargo test. ...

September 10, 2025 · 1 min · 174 words

Docker for Development and Testing

Docker is a virtualisation tool. It can create lightweight, fast, isolated, and reproducible environments like virtual machines, in which an application can be tested reliably. An docker image is a snapshot of an operating system. A container is an instance of an image, behaving like a running virtual machine. Testing Process Say I want to test a rust project with file structure like . ├── Cargo.lock ├── Cargo.toml ├── src │ └── main.rs └── target ├── CACHEDIR.TAG └── debug In a brand new operating system, everything needed to test this project is the rust-cargo suite, besides the source code. So I want the container to have them. ...

September 7, 2025 · 2 min · 400 words

UV for Python Project Management

Issues of Reproducibility Python is notorious for its lack of reproducibility. (It is not the worst, the title of which shall be reserved, probably, for C++.) Clone any python repository with more then 1000 lines of code from GitHub and try to run it on your personal computer. The first step, which is how to execute the program, will be difficult enough. The nightmare, however, is to make sure your system has the correct version of python, compatible versions of each python package, each C library the python package relies on, and each driver and system software C library relies on. ...

May 5, 2025 · 2 min · 419 words

Error Handling in Rust

Error Handling in Rust Color Eyre This package is simply magical.

May 4, 2025 · 1 min · 11 words

Fancy Terminal

Graphics in the Terminal If terminal leaves you an impression of dullness, black-and-white, and text-only, your impression may be wrong. Terminal is capable of producing surprisingly smooth, user-friendly, and graphical interface. Check cmatrix, btop, cava , and, may be most astounding of all, the spinning doughnut. Most of these are achieved by exploiting ANSI escaped sequence and termios POSIX standards. This post is a short summary of common functionalities. For more, check Wikipeida and termios man page. ...

May 4, 2025 · 3 min · 471 words

Git Cheatsheet

Git Commands Multiple remote repositories git remote set-url <remote-name> --push --add <url> It seems like whenever this commmand is used, the original --push remote is removed. The work around is to use this command again and add the original --push remote url. TODO h3 for command name seems to be too large. Find a way to apply custom css only to this page. h4 seems just write for command name, it does not show in the TOC. ...

April 21, 2025 · 1 min · 77 words

Deploy Hugo Blog site with Github Pages

Blogging with Hugo, Papermod, and Github pages is easy. (Writing the articles, of course, is a different business). This is a short guide for how to create and maintain such a website. To create a static blogging websites only requires Create the HTML, CSS, Javascript files, which are downloaded by the browser uponing entering its domain name; Obtain a domain name and host the files on a server connected to internect with this domain name. Hugo and Papermod can read the markdown files and produce stylish webpages. (That is the HTML, CSS, and Javascript files.) Github pages is a free remote service hosting the file and provide the domain name. ...

April 12, 2025 · 6 min · 1102 words