Old project rewrite
Recently, I rewrote my 11-year-old project, Linux memory editor, with AI. Some people reject AI; some embrace it. I treat AI as the tool to do the task, but I know AI output is not 100% work. Nevertheless, AI has better knowledge than I do. But still, AI doesn’t have my specific knowledge, experience, and context; that’s why AI is just a complementary tool for humans to finish the task.
Memory editor
When I play games, I don’t like to spend time grinding (leveling up, collecting items, etc.). As a result, I use memory editing to make the gameplay faster. I created a Linux memory editor years ago. I started with GTK for the UI widget and used C++. However, GTK is less convenient for C++, so I switched to Qt. That’s how far it went.
Everyone can code
With the power of a calculator, everyone can calculate easily. With the power of computers, everyone can do complex computing tasks. And now, with the power of AI, everyone can code through vibe coding. But with the calculator, it doesn’t mean you become a mathematician; with the computer, it doesn’t mean you are a computer scientist; with vibe coding, it doesn’t mean you are a software engineer.
But I can see, due to AI, there are blended roles between the team members. Everyone can code, everyone can do marketing, and everyone can do administrative tasks. Then you will probably ask, “Will I be replaced?” I think due to the economic situation, manpower shrinking is likely to happen. But each team member’s role can’t simply be replaced. The reason is simple: nobody can do everything.
Hobby project: game remake
Prologue
经过百般思虑,我决定将我的闲暇之余所制作的游戏的项目“砍掉重练”。有诸多原因。主要原因就是现有的代码过于不理想,让我很难继续。
第二,现在有 AI (LLM),我能够更容易学习到制作游戏的基本技巧和知识,减少试错和错误的决定。
第三,如果玩游戏可以重来,哪为何制作游戏又不可重来?
Story
Finally, I decided to restart my hobby game development project. Previously I built it based on full-stack engineering knowledge. But that’s not right. It makes everything super complicated. Luckily, we have AI today, which I can learn game development more efficiently.
I choose Godot Mono (C#), as it is free and open source. Unity though is more popular, the license is complicated. Godot has its own language, GDScript, which is similar to Python, yet I don’t like Python syntax. C# is more universal comparing to GDScript.
Organization, team, and code
There are some similarities between the Church-Tradition-Scripture and organization-team-code.
Firstly, I need to clarify that, Church teaching doesn’t change, and so Holy Scripture doesn’t change. These are the main differences compared to organization and code.
Now, let me discuss the similarities. Just as the Holy Scripture, the source code doesn’t explain itself. Because the source code is not designed to explain itself. Some of the codes may be plain and easy to read, some may not; they require more background on business logic and the intention of the authors. The main difference is that the Holy Scripture is inspired by the Holy Spirit, which has no errors, while source code may come with mistakes and bugs.
The Boss and the AI
The Boss: AI, give me the file.
AI: Boss, may I know which file?
The Boss: You don’t known which file? You have been with me 5 days already, you still don’t know what I am talking?
AI: Boss, can you describe which file it is, so that I can help?
The Boss: Useless AI, don’t you know you are replaceable? You are fired!!
(Next day)
The Boss: AI, tell me a joke.
PostgreSQL major upgrade with pgvector
If we installed pgvector, upgrading PostgreSQL major version will not success with pg_upgrade. We need to manually dump and restore all databases.
In order to do that,
-
Start the existing version service, eg 16.
-
Run
pg_dumpall -U postgres -f /path/to/all_dumps.sql -
Stop service.
-
Upgrade
postgresql postgresql-libs postgresql-old-upgrade -
Re-compile and re-install
pgvector. -
Initialize database, such as
initdb -D /var/lib/postgres/data --locale=C.UTF-8 --encoding=UTF8 -
Start the newer version service, eg 17.
-
Login as
postgres(sudo -u postgres /bin/bash), and run
psql -f /path/to/all_dumps.sql postgres
Xfce4 4.20 upgrade issue on font size
With the recent upgrade of Xfce4 4.20, I was facing the font size issue on my laptop. I am using icewm . And the upgrade causes my fonts become too small. But some applications are too big, like Brave and FreeFileSync. I spent some time to fix this. And this is my final solution,
Allow xfsettingsd at startup,
xfsettingsd --daemon -D
And use xfce4-appearance-settings, at the Fonts > DPI, enable Custom and set the value to 120 as in .Xresources . The effect is immediate. This solves the font size for all applications.
Logitech M590 mouse and Linux 6.11.4
Due to the recent upgrade of Linux kernel to 6.11.4, my bluetooth mouse (Logitech M590) cannot connect. I tried many times, and sometimes I can connect, but most of the time it fails. There were several related posts: here and here.
Since my storage doesn’t have enough space to install Linux LTS, I can only wait for the fix from Linux. While waiting for the fix, I remembered that M590 allows to use a USB receiver. As a result, I installed ltunify package and now it works. The only drawback is that one of my USB ports is occupied.
Arch Linux kernel and NVidia recent bugs
I was facing frequent freeze of the laptop recently. The discussion can be found here.
Basically, there are two issues, one is the Linux kernel, and the other is the NVidia driver update.
Linux kernel causes some Oops in the kernel, probably related, I don’t know. The result is that I can’t shutdown my laptop because it cannot unmount /home and /tmp. To resolve this, I upgraded the Linux kernel to 6.7.8, and added zswap.enabled=0 and numa=off as the kernel parameter, in GRUB. I am not sure which one is the actual action that solve the issue.
Arch Linux Xorg failed to run
Today I updated the packages, then rebooted, then the machine got stuck at
[Started] Accounts Service
Seriously, I have had no issues with my laptop recently. And this makes me nervous. It will be troublesome if I have to boot into the Arch Linux LiveUSB. But luckily, searched online, and someone mentioned to change to another TTY with Ctrl+Alt+F2.
Wheew. I still can log in with the command-line. And then I noticed that, the issue must be NVidia driver related.