Blog

  • Beaware of HMC5883 Module

    I was toying with cheap GY-721 module. This module is basically a break out for HMC5883L digital compass.

    But that is story of the past. Turn out this module is so popular that the Chinese decided to replace the original chip with qmc5883 IC.

    Not a new story, they have already clone a lot of STM32 MCU, this IC is a child play for them.

    EXCEPT

    Their clone is nothing close to the original. The I2C address is different, the register map is also different.

    And to make it worse, there are 2 variants of QMC5883: QMC5883L and QMC5883P.

    You guess it right, THE VARIANT is nothing close, aparently they come from diffrent vendors.

    And when you buy cheap ass GY271 module, it’s a lottery which chip you will get.

    I learnt it the hard way today.

    HMC5883L datasheet: https://www.farnell.com/datasheets/1683374.pdf

    QMC5883L datasheet:

    http://wiki.sunfounder.cc/images/7/72/QMC5883L-Datasheet-1.0.pdf

    QMC5883P datasheet:

    https://www.qstcorp.com/upload/pdf/202202/%EF%BC%88%E5%B7%B2%E4%BC%A0%EF%BC%8913-52-19%20QMC5883P%20Datasheet%20Rev.C(1).pdf

  • I vibe-coded CVbuilder

    I’m so fed up with the online CV builder service. Imagine spending your priceless time using their tool to customize your CV, just to be hit with “Please subcribe to our overprice service to download”. F*ck no.

    I gave up, i can not find any decent one.

    So, with the power of Claude, i vibe-coded https://github.com/phb98/CVbuilder.

    This tool will auto generate your CV from A single Json file, that contain your personal info. All locally, with a single python script.

    It only has templates for now, but you can easily ask your favorite AI to add more, the project is simple enough for them.

    It’s not fancy, it lacks customization, but it perfectly fits my usecase.

    Give it a try.

  • A terminal editor that just works: MS Edit

    I was born a little too late to be familar with VI/ Emac war, and try as I might, i can not get used to VI key binding.

    So most of the time, when i need to edit some config file in terminal, nano is my go to choice. It’s simple, it’s everywhere, and it just works. But its key binding is stucking at the 90s(or even 80s, idk). The shortcut to save file is not Ctrl+S, Or Ctrl-F does not bring the pop up to search. I know i should learn its own set of shortcut, but i do not use it frequently enough to have it stick to my brain.

    Recently, Microsoft has just released Edit. They claimed it was a revamp version of their old Edit editor(And what is that name, why computer nerd keep coming up with names that impossible to 1-word google search: Carbon, go, edit, nano).

    I’ve been using edit for a while now. Nothing to complain, it works everywhere: Windows, Linux and even Mac. And thanks to Rust build system, it’s very simple to build: Install Rust and cargo build. You are done.

    It’s has clean interface, fast, and most important, “21st standard” shortcut: Ctrl S to save, Ctrl F to find, Ctrl Q to quit. That is just what i want.

    Maybe in the future it will become the standard text editor(But tbh I don’t think linux people will accept any MS-Software in their software stack, even if it’s 100% opensource).

    So, please give it a try: https://github.com/microsoft/edit

  • Yes, I think LLM is great

    I remember the first time i tried LLM, it was back in early 2023, when chatGPT was super hyped. I had to bought an UK phone number and a VPN simply chatGPT was not available in my country. I also set up some accounts for my boss and coworkers.

    And oh boy it was magical. The idea of a chatbot was not new at all, we had already had chatbot way before that, and i think those bots were just some regex matching combined with if-else hell. Those are very limited and show no intelligent at all. Their answers were all over the place, sometime even worse then elementary student. Then we had Alexa/Google Assistant/Siri, those are more advance, but most of the time i felt like they are just search engine wrapper, with some fun functions like setting timer, playing song or asking the weather. Still, they were nothing magical after playing with them for a while.

    But chatGPT was different. At some moments i felt like i was talking to real human. It can do nothing and everything: You can not ask it to start a time like Alexa, or what the weather like today like GG assistant, but you can ask it to write a python code to generate a protobuf file from a C header file, or ask it how the Japan economy is from 80s to 2020s. The first “public” version of chatGPT was pretty bad, the code they wrote barely worked(or not worked at all), and maintaining it is a big no. It halluciate a lot, so don’t even think using them in your professional codebase. Then i tried CoPilot(before Microsoft had the free tier), they were autocomplete-on-steroid, they could detect the pattern in your code and finish what would you write, good if you are writting repeat pattern like logging, bad for anything else.

    In 2 years, AI/LLM has advanced, like a lot. Their code is now better, i could say on par with junior developers, but in some way, better than senior dev thanks to being trained on countless “legal” repoes. But still, it’s a hit or miss, especially if you are working with less popular language/framework(Verilog/VHDL guys in shatter). Apart from coding, they are now even can do Internet search themself, so there would be no outdated data in their answer(let’s hope they are smart enough to know when to do query instead of halluciating)

    Some people dislike the rise of using LLM/AI, and i understand that, some have good reasons like “The answer is too unreliable” or “It would dumb yourself down”. etc. They are right.

    But this has always been the case when new tool is invented: The invention of paper/ink means human don’t have to remember the whole book anymore. Or the invention of power tools means human become less muscular. We gain something, we lose something. It’s on us to decide if it’s worth it. And I decided that i can accept the tradeoff of AI/LLM. We lose the “authority” of the stuff LLM generates, but we get them fast.

    AI/LLM would not go anywhere in the future, better to adapt to it instead of trying to resist it. We need to learn about their short coming to work around that. But “everything is toxic it just depends on the dose”, too heavily depend on LLM/AI is bad, and i won’t try to argue that. If you are one of those “vibe coder”, I suggest you stop doing that, at least at this level of LLM we are having. Nobody can say how good LLM would be in the future.(But “vibe coder” maybe good for me, someone has to clean up the mess after all, i could make a killing out of it).

    So, i do think LLM is a good thing for us. Just don’t over do it.

    PS: I think it’s time for something more personal, maybe next post would be something i am working on.

  • This blog setup

    Hi

    So this is the second post, come faster than I expected. Quite proud of myself. Today I gonna share a little about my little blog setup.

    This domain(bacphan.dev) was bought about 2 year ago, from google domain, before squarespace acquire it. I bought it because i always want an custom email domain, then I learnt it the hardway that if you setup your own email server, chance are your email will mostly end up in spam/trash folder. So google workspace it is.

    Then I bought a VPS. Because my country began blocking Steam access from “home” users(idk exact reason). Using VPN is 1 solution, but they are expensive, and most of them limits number of clients. Luckily i already had a hand on experience on setup a VPN server on my own network, so setting up vpn server on vps is not that hard.

    Now, about this blog. This blog is using WordPress as you can guess from the template(or from placeholder url that i am still lazy to remove). The whole setup is running from a container on Docker. Quite cool huh ? Using docker means it would be easy to migrate this blog to other machine, also it’s easier to un-done my setup(just remove the container).

    There is also a gitea server on this vps(You can guess its URL lol). Also on docker of course.

    The coolest part is most of the setup is done by Claude. I just gave it what i want, some keywords that i saw on internet(like docker, wordpress, etc) and it will setup for me, quite painless. Claude code is really awesome. Maybe my next post will be about LLM.

    So in summary, this server is currently a VPN server, Git server and this blog. I don’t plan to do anything more with it for now because its hardware is quite limited(only 2 CPU cores and 2 GB ram).

  • My first post

    Hello.
    Today is July 2, 2025, and this is my first post.


    If you take a look around, at this moment (or in the future—I don’t know how lazy I’ll be), things are pretty raw for now. This blog is fresh from the template. There are still sample pages everywhere.
    What am I planning to do with this blog? Not sure. This blog is just my little experiment to get familiar with web technology. I’ve never been a “high-level programmer” guy.


    I don’t intend to write very often. I believe the quickest way to kill a hobby is to force it (or make it your job—trust me). The next post could be tomorrow or next month. I don’t know how well this hobby will stick with me.


    There is no theme for this blog; the posts could be anything: tech, stories, my thoughts, or just cat pictures (anyone who hates cats is my enemy, no exception). The point is, this blog could be my little escape from the mundane aspects of daily life. I don’t want to think too much about it.


    As you can infer from my writing, English is not my native language, so expect a lot of mistakes or weird grammar. But somehow I feel like I can express myself better in English. It could be that I’ve mostly used English throughout the day now, or because I don’t know English well enough to understand some hidden ideas behind words. Ignorance is bliss.
    I think this is long enough. I still feel like I’m too formal—maybe by writing more, I will become more comfortable with writing and be truer to myself.


    Bye, and congratulations to me.