Kalan's Blog

Kalan 頭像照片,在淡水拍攝,淺藍背景

四零二曜日電子報上線啦!訂閱訂起來

Software Engineer / Taiwanese / Life in Fukuoka
This blog supports RSS feed (all content), you can click RSS icon or setup through third-party service. If there are special styles such as code syntax in the technical article, it is still recommended to browse to the original website for the best experience.

Current Theme light

我會把一些不成文的筆記或是最近的生活雜感放在短筆記,如果有興趣的話可以來看看唷!

Please notice that currenly most of posts are translated by AI automatically and might contain lots of confusion. I'll gradually translate the post ASAP

2021 Chitchat

I originally planned to organize what I've been doing and share it, but after organizing it, I realized there wasn't much to talk about. So I decided to record it in a stream-of-consciousness style.

Moving

At the beginning of 2021, we moved to a newly built apartment near Dahe Park. Although it's a bit noisy being next to a major road, I'm quite satisfied with the environment here. Having my own small room has improved the quality of my work and video production compared to before. Oh, I have to say that finding a place to live in Taiwan relies on luck, while in Japan, if you put a little effort into searching, there are plenty of options available. And after a few years, there are newly built apartments nearby with affordable rent waiting for you to move in. I also switched to using an HHKB keyboard, thinking of giving myself a new environment. Now that I've used it, I can't go back.

Early Year

At the beginning of 2021, I studied many things that I didn't have a chance to explore during my vocational school years. From AVR Programming, I learned about various topics such as low-level I2C and SPI communication protocols, EEPROM writing, ADC, GPIO, and hardware interrupts. I chose not to use Arduino because, as a software engineer, relying on libraries and other people's code doesn't help me learn. Later, I realized that AVR is gradually declining, with only Arduino remaining popular. Compared to AVR, STM32 is much more convenient to use, with advantages in terms of price, performance, and power consumption. With development boards and IDEs, you can even debug and set breakpoints directly on the board. It's definitely an improvement over AVR.

After getting hands-on experience with STM32, I found that most people use STM32 Cube IDE for coding. Although it has rich features, it is not very convenient to use, especially after getting used to VS Code. Is this the kind of tool that embedded engineers use to write code? On the other hand, for 8-bit AVR, you can simply open main.c with avr-gcc and enter a whole new world. It has a lower learning curve compared to STM32. AVR chips are also inexpensive, and many of them have corresponding DIP packages, making it easy to start using them on breadboards.

At work, due to the development of new features and only having one other colleague at the time, we were on a tight schedule. Almost every day was spent in a cycle of requirements, development, and QA. It was a very fulfilling period. We had to set up a new SSR server (using next.js), and there were many considerations and complex processes involved in setting up a server in a large company. We had to automate the process so that the Operation Team could operate it through awx. Otherwise, we would have to delay the release if we couldn't meet the release standards.

Because it was a requirement that we discovered in the middle of the project, I had to handle everything related to server setup, nginx configuration, playbook configuration, Docker, cross-department communication, documentation writing, proposing to the business department, automated deployment, and actual feature implementation all by myself. At the same time, I had to handle QA tickets. Honestly, during that time, I was under a lot of pressure. I worked overtime for almost a month, and one day I even had to work on a holiday to meet the deadlines. All departments were busy during that period, and since server setup required different knowledge from frontend development, there was no one in the team who could help me. However, one of my teammates actively helped me with other QA issues, and I am very grateful to him. I also appreciate that my supervisor didn't say much at the time. Although he expressed some concern when he heard about me working on a holiday, he quickly coordinated with me and the company.

I want to emphasize here that the company really doesn't want employees to work on holidays. If it happens, you need to explain the reason, and the company will ask you to take compensatory leave (not special leave) on regular workdays. So it feels like borrowing a regular workday to work on a holiday to catch up on progress.

Looking back now, we achieved good results, and we were able to go live on time. Besides developing new pages for other projects using next.js (previously using ejs+static pages), we were able to do more with SSR. Also, because of the introduction of SSR, implementing SEO became more convenient than before, and writing ld-json became easier.

During this period, I also realized that sometimes, if I don't persist, things won't happen. For example, setting up a server may seem simple, but within an organization, integration is more important than a sudden idea. To achieve integration, it's not about adopting trendy frameworks or talking about good programming skills but about solidly executing each step.

During this period, the game "Monster Hunter Rise" was released, and time flew by quickly. I worked hard during the day to meet deadlines and played the game to vent my frustrations in the evening. At first, I wanted to learn how to use the Great Sword from other players, but later I found that using the Heavy Bowgun or Light Bowgun is a better choice for having fun and shooting without thinking too much.

I also discovered that my girlfriend unexpectedly enjoys collecting quests and farming materials in the game. She wants to complete every medal and badge, so she helps me complete various quests while I'm at work, and I happily upgrade my equipment and weapons when I come home. I had a great time playing this game. The music, scenes, and costumes all have a unique Japanese style. I also unexpectedly joined a group of former colleagues to occasionally team up and clear dungeons, which helped me get through a low period.

MPEG-TS and aribb24 Subtitles

After seeing a tweet, I thought that since I had a Raspberry Pi, I should be able to receive TV signals and watch TV on my computer. Later, I realized that I needed to buy a TV tuner that supports TS extraction; otherwise, I would need special software to watch TV with other tuners.

In Japan, the TV signal is in MPEG-TS format, and Japan has its own TV broadcasting standard called ISDB, which is formulated by the Association of Radio Industries and Businesses. Oh, by the way, in Japan, there is a magical broadcasting law that requires households with TVs to pay fees to NHK, but you can still watch TV even if you don't pay. It has been ruled constitutional by the Supreme Court, but I still can't fully understand this mysterious country.

In Japanese TV programs, you can enable subtitles, and they can include hiragana annotations, colors, special characters, and position settings. These are defined by the ARIB STD-B24 standard.

Out of curiosity, I successfully received MPEG-TS signals on my Raspberry Pi using a TV tuner and parsed the subtitles using JavaScript. Although it was a simple implementation, I realized that the people who quietly worked on these standards were really great. After seeing the code, I was even more impressed.

Writing a Book

In addition to the things mentioned above, I also worked on writing a book. Two years ago, I participated in a competition and created a series of videos about Svelte, which received recognition. After consulting with my colleagues, they thought it was a rare opportunity to write a book, so I decided to give it a try. Unlike other participants, who were in different categories, I had to convert my videos into text, which took a lot of time. The final rush was also a headache.

Although Svelte is still relatively niche in Taiwan compared to other frontend frameworks, I find it very comfortable to work with. So even though it's a niche market, I still wanted to leave some resources behind. The book covers many practical applications in UI development, including explanations and implementations of accessibility features. I also added chapters on testing and SvelteKit to complete the SSR part. I already knew in advance that the royalties wouldn't be great, but when I saw the actual income, I couldn't help but feel a bit disappointed.

I personally believe that the book's biggest value lies in the practical UI development section, and I hope it can help developers understand this aspect better. I am also very grateful to my former colleagues, Eason and Kai, who kindly reviewed my writing, pointed out errors, and provided better suggestions and writing styles, which improved the quality of the book. One thing I learned is that I will never use Word to write anything related to programming again. The experience was quite terrible, and the formatting often got messed up when converting to PDF. If I have the opportunity, I will make sure to handle the formatting before writing.

If you're interested, I hope you can also check out the implementation in the videos. Personally, I think the implementation in the videos is more valuable and allows you to see how a UI component is developed from scratch. In the last 10 days, there is also an explanation of the principles and a simple implementation behind Svelte, which should be helpful for engineers who are interested in understanding the principles.

Building a Keyboard

After using the HHKB keyboard, I became curious about the underlying principles of non-contact electrostatic capacitive keyboards. I wondered if I could build one myself. Surprisingly, there are many people in Japan who are making these keyboards, and you can even buy related materials and components. I was amazed by how convenient it is. Since I had already been tortured by soldering in high school, buying a PCB, soldering, and assembling components didn't count as building a keyboard for me (note: this is my personal requirement, not something I would teach others).

Because of this, I started a new journey. I bought a 3D printer, learned PCB design and wiring, and designed circuits. Except for PCB design, which was new to me, the other aspects were within the scope of what I learned in high school, so they weren't too difficult for me. However, PCB design has many details, especially for high-frequency circuits based on non-contact capacitive sensing. Understanding how to deal with noise is important, and it's an aspect that I rarely encountered in high school. But the cost of sending PCBs was too high. It cost over 2000 yen to ship to China, and it took more than a week to receive the finished product. The whole process was too long. So I decided to experiment with breadboards first and challenge myself again when I feel confident. During this time, I also learned a lot about hardware-related topics, such as the operation of USB (USB standards are really complex), PID theory, FIR filters, and played around with Raspberry Pi Pico and PIO. In the end, I went in a big circle. Although I have a PCB for a custom keyboard, it is still not complete. I hope to have some results to share with everyone this year (but don't expect too much).

Omura Bay and Haus Ten Bosch

In July, I visited Omura Bay and Haus Ten Bosch again. I really like the atmosphere of Omura Bay. Enjoying Japanese curry at the cafeteria and looking at Omura Bay from the platform should be on everyone's bucket list.

Kokura and Moji Port

For a while, I was quite obsessed with "BEASTARS". I really liked the main character, Legoshi. His kindness, silent dedication, and the process of training himself to become stronger sometimes made me think that he is the person I aspire to be. When I found out that the author was holding an exhibition in Kokura, I took advantage of my local advantage and went there.

SwiftUI and Bluetooth

During the company's hackathon in 2021, I challenged myself to learn something new and create an application. At that time, I wasn't familiar with SwiftUI and didn't know how to use Bluetooth, so I made a Bluetooth-powered Arduino tomato timer. It allowed communication between the computer and Arduino via Bluetooth. To integrate it better, I added a status bar, notifications, and a countdown UI on the software side, while the hardware side (Arduino) used an LED matrix and a buzzer. I think if I refine and improve the functionality, it could be quite useful. At least I would want to use it myself. After all, I've already made countless software-based pomodoro timers, but integrating it with hardware and Bluetooth can help users shift their focus. The result wasn't ideal, but I still achieved my goal.

Due to the nature of the hackathon, the implementation was a bit rough, just to make it work. One thing worth mentioning is that I implemented the countdown feature on the Arduino side, and I learned how to use timer interrupts. But looking back, it might have been better to implement the countdown function on the software side and let Arduino focus on display and notifications.

YouTube and Turing Complete

In 2021, I still didn't find the right direction for my YouTube channel. I really wish someone could tell me how to do it. Nevertheless, I continued to upload some videos, even though the view counts didn't seem to be high. But being able to record moments of my life in videos is still a good thing.

I also live-streamed the game Turing Complete, where you start with logic gates and build a small computer. It feels like a game version of nand2tetris. For complete beginners with no prior knowledge, it might be challenging. If the author could simplify it and put more effort into teaching, it would be more enjoyable.

JSDC2021 and ModernWeb'21

I gave two presentations this year, both about Svelte. If you're interested, you can check them out. Looking back, I used to enjoy attending various sessions and was in the "Taker" stage, gradually accumulating experience. Now, I don't experience information anxiety as much, and I can share my experiences with others. I find this change in mindset quite amazing.

Relearning Linear Algebra

I don't know why, but I started rewriting linear algebra again. Maybe it was because I saw the book "Common Sense of Numbers" and reignited my passion for linear algebra. There is a chapter in the book that left a deep impression on me called "Goodbye, Inverse Matrix." It mainly explains that most things you want to do can be solved using LU decomposition, which is more intuitive than inverse matrices and also computationally efficient. I really like this kind of practical mathematics, which is known as "numerical analysis." I prefer listening to others talk about these things rather than doing numerical analysis myself because it can be quite challenging. Those who specialize in this field are really amazing. Another topic that is often mentioned is the old-fashioned singular value decomposition (SVD), and I always gain new insights every time I learn about it. Recently, I relearned Fourier transforms because I became interested in signal analysis.

WebGL

I revisited WebGL because I wanted to create a simple visualization of matrix operations to better understand the concept of matrix multiplication. However, I didn't make much progress with that project. Instead, I spent a lot of time figuring out how to draw a line. Looking back, it was quite silly.

Returning to Taiwan

I had to return to Taiwan to deal with banking matters and loans. Additionally, my internet banking password was locked, and Cathay United Bank stopped supporting IC cards, so I had no choice but to spend a lot of money to return to Taiwan for these procedures. The round trip cost nearly 100,000 TWD. It had been almost two years since I last returned to Taiwan. At the beginning of the pandemic, I naively thought it would be over soon and that I could return to Taiwan immediately. Who would have thought that I would have to wait for two years? Even now, it still hasn't been resolved.

During the few weeks after returning to Taiwan, everything and everyone made me feel particularly moved. The familiar language and signs surrounding me, conversations with strangers that piqued my curiosity, and the delicious food everywhere that left me speechless. The prices are unbelievably cheap compared to what I'm used to in Japan.

After experiencing life abroad, I gradually realized that Taiwan, the land that raised me, has many enviable aspects. I really hope the pandemic will end soon, and I hope quarantine policies will be lifted. I want to return to the comforting embrace of Taiwan.

MPK mini

A few years ago, I bought a Roland FA-07, but it was already bulky, and I didn't have any space left at home. So since moving to Japan, I haven't played it much. I kept telling myself that I would find a solution, but two years passed by. At the beginning of the year, I sold it second-hand. Instead, I bought an MPK mini MIDI keyboard for just over 8,000 yen. Although it only has 25 keys and doesn't have as many features as the FA-07, it's much smaller and can be placed directly on the desk and connected to the computer for simple composition. It's much more convenient than before.

Conclusion

This year marks my third year in Fukuoka, Japan. Time has passed faster than I imagined, and I have gradually become accustomed to life here. I actually quite like the current lifestyle and pace, but at the same time, I feel that in 2021, I was like a headless fly, flying around aimlessly, touching on various fields but not delving deep into any of them. Although it helps broaden my horizons, I hope to have deeper growth and focus on what I want to do, and actually produce some results. Honestly, I feel a bit tortured by this aspect of myself. There are so many things I want to try, but I'm afraid of the uncertainty. I'm afraid that after putting in effort, there won't be corresponding rewards. Ah, life is difficult.

I hope that these miscellaneous experiences can be helpful to you. If you want to contact me, you can find me on Twitter or via email.

Prev

MIT OpenCourse - Reflection on Introduction to Computational Thinking with Julia

Next

Some tricks about reading files in node.js.

If you found this article helpful, please consider buy me a drink ☕️ It'll make my ordinary day shine✨

Buy me a coffee