Introduction

Ever since the birth of ChatGPT, I have been using web-based LLMs to assist with development. Over these past two years, I've maintained a conservative stance towards AI programming, particularly skeptical about the feasibility of AI-generated projects. Recently, I took over a frontend project and started using GitHub Copilot, and I found my attitude towards AI programming has become more complex. On one hand, the Agent mode is incredibly convenient and significantly boosts development efficiency. On the other hand, looking at the existing code of AI-generated projects, I really didn't want to modify it (although I ultimately relied on AI to refactor the entire project).

In the pre-AI programming era, code scalability and maintainability were always among the criteria for evaluating code quality. Entering the AI programming era, writing code has become easier, but the overall code quality of a project cannot achieve a comparable qualitative improvement with the help of AI. Therefore, the foundation of AI programming ultimately rests with humans. Only developers with systems thinking and engineering experience can truly achieve efficiency gains through AI programming.

In this post, I will start with various types of prompts to share some of my experiences using the VS Code Agent for programming, as well as some of my thoughts on AI programming.

Read more »

Introduction

In my previous post on Hexo workflow automation, I mentioned one of the reasons for migrating from GitHub Pages to Netlify is that both are free. Actually, that's not entirely accurate. Netlify provides 300 free credits per month, but a single deployment costs 15 credits. If I kept the same deployment strategy used in GitHub Actions, these credits would be depleted quickly, making my blog inaccessible (visitor requests and egress traffic also consume credits, costing relatively less though). Therefore, setting up a proper continuous deployment strategy is crucial. In this post, I'll explain the different deployment types on Netlify and provide a more sensible GitHub Actions deployment strategy.

Netlify Deployment Types

Netlify offers three deployment types: Production deploys, Deploy Previews, and Branch deploys.

Read more »

Introduction

It has been over two months since I completed the Raft Lab of MIT 6.824, and I've reread the Raft paper. Compared to my first reading, I now have a deeper understanding, especially regarding the safety implications of the "Committing entries from previous terms" discussed in section 5.4.2. In this post, I will elaborate on my understanding of this safety constraint.

The Definition of Commit

First, it's essential to clarify the definition of commit; otherwise, it's easy to confuse the subject of our discussion. The author initially describes the commit in section 5.3 (Log Replication). Let's examine it sentence by sentence.

The leader decides when it is safe to apply a log entry to the state machines; such an entry is called committed.

The first sentence defines a commit: the Leader actively commits a log entry, after which that entry can be applied to the state machine.

Read more »

Introduction

In the context of the Chinese internet, "rogue softwares" refer to a category of untrustworthy applications. Unlike viruses, their "rogue" nature manifests in two ways: (1) Malicious writes: they install software without permission, modify system settings, and in severe cases, can cause system crashes; (2) Malicious reads: they scan user files and upload them, violating user privacy. In other words, these programs do whatever they want with the file system, and average users have little recourse.

I typically run untrusted but necessary softwares in a virtual machine to minimize impact on my main system. The problem is, while my desktop can run multiple VMs simultaneously, my laptop struggles even with one. Clearly, I needed a more lightweight isolation mechanism than a full VM.

Sandboxie-Plus uses a sandboxing mechanism for lightweight program isolation, which fits my needs. After using it for a while, I decided to write this post. This post first compares different isolation mechanisms, then focuses on how to use the feature-limited free version of Sandboxie-Plus to implement some advanced features of the paid version, achieving the goal of isolating "rogue software".

Read more »

Introduction

It has been a year since the previous post on Hexo workflow automation. Although I have not written many posts during this period, I remained unsatisfied with the existing workflow. Aiming to implement i18n, I made significant modifications to the source code repository and wrote new scripts. Additionally, I migrated the blog from GitHub Pages to Netlify. This post will cover the implementation process of these changes.

Read more »

Introduction

I've been self-studying a lot of courses and working on many projects recently, so I haven't had the chance to write blog posts. Since a blog needs frequent updates, I've decided to introduce another format, Developer Diary, to record my thoughts and observations during development. This post covers: choosing third-party libraries, Go, and "stock responses".

Read more »

Introduction

"Chat with LLM" refers to learning knowledge by interacting with LLM chat tools (such as DeepSeek, ChatGPT). Learning through Q&A is more efficient. The content of these blog posts on "Chat with LLM" is mainly derived from my conversations with LLM chat tools.

This post explains the principles, workflow, advantages, and disadvantages of JWT.

Read more »
0%