engineering · AI · notes

Yangyu's Notes

Long-form notes on software engineering, AI systems, and the craft of building things — written to think clearly, kept to remember.

Latest writing

21

2024 Review and Goals for H1 2025

A Brief Review of 2024 The last time I posted on this blog was in July 2023. At that time, I had taken a three-month break and was ready to start a new job, full of ambition and looking forward to the future. A Year at ByteDance - 2023-07 to 2024-07 As it turned out, I left ByteDance after exactly one year, on August 1. I was in the Aeolus team, working on a data visualization product. The main reasons for leaving were related to scope and ROI issues:

Posts4 min read

2023H2 Goals

Mini-Reflection on “Open-Diary” and the Past Failures Having goals is a good idea, and it’s even better to pursue them. Last year, around this time, I came up with the idea of an “open diary” concept. It allows people to keep an open diary as a review and share it like a blog post. I wrote my first post back then, and now it has been a year. However, I think that’s okay.

Posts2 min read

Daily Progress

In the recent 2 days, I’ve spent some good time setting up this blog site… here’s the rough timeline: before 2022-07-26, I was using Jekyll, and it has been working fine on 2022-07-26, when thinking about improving the blogging, there were a few functionalities that’s missing: the googleAnalytics was broken the commenting system was broken as well deployment has been hard – I have to do it manually, by pushing to gh-pages branch although GitHub uses Jekyll by default, it’s missing some plugins that I use so I have to build it manually in order to figure out what went wrong… I started to read Jekyll’s source code it took me 0.5h, to roughly understand the basic code structure progressing slowly, but there were some progress anyway meanwhile, I’m also thinking – why not give other system a try? I’ve heard about Hugo before, and I know it’s written in Golang I started to clone Hugo’s source code, and started reading. because I’ve been working with Golang for the past 3 years, the code feels easy to read I also went through the tutorial, and starting a new site from scratch interestingly, the tutorial was easy to follow – I have my site running within first 10min it’s also easy to config – the guides has been mostly easy to read, I can get the info I need within minutes I happily coded until like 1am last night, and published this site to replace my previous one in Jekyll this has been a great experience the templating system is easy to learn, and easy to figure out how to use it correctly, by reading the source code I got all my issues with Jekyll resolved very fast I’ve also got other functionalities like multi-language support – I can finally split my Chinese post from English ones so it also makes me think, that I probably wanna pickup my previous habit of blogging again. So I start to write this post Summary from my experience, I think there’re a few learning points:

Posts2 min read

Transform Any Website into Desktop App via Electron

End Result How it looks (in Ubuntu) in Startup Menu: How it looks when opened as an App (electron-apps-ubuntu.png) Motivation I recently started using a Ubuntu Desktop. However, quite a few apps are missing in Ubuntu. Therefore, I have to use their web version. Tools ElectronJS: https://www.electronjs.org/ Unity Launchers And Desktop Files: https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles How to Setup Install Electron Globally Electron runs chrome internally, but we can run it like a desktop app. ()

Posts2 min read

Separation of Concern

Situation When working in big companies like Grab, lots of times I’m just solving some simple CRUD. Meanwhile, lots of my time needed to be spent upon different other things: make and review pull request deployment fixing failures for functional test and unit test load testing integrated with the logging library Problem Turns out, there’re also other teams, solving the same problem again and again. This pattern has several issues:

Posts2 min read

Provide Sufficient Context in the Merge Request

TL;DR When creating a merge request, we need to include more context information: describe what you’re trying to achieve in this MR why such change is needed What is Context Information A pain point of reviewing a merge request, is to understand the context. The context includes: what the merge request actually intends to do why such changes are needed are there any other alternatives No Context is bad for Reviewer These context should be communicated properly, so that the reviewer can actually have a clue to justify if the change is necessary & sufficient. Otherwise, the reviewer would have to eye-balling each change, and try to guess why such changes are needed - this is time consuming. With these cognitive overheads, reviewer would tends to:

Posts2 min read

Testing Result not Detail

When writing specs, I think the spec should describe implementation result, but not the implementation detail. Take the ruby code below for example: def add(a, b) a + b end one can test like: expect( add(1,2) ).to eq(3) that’s testing the result; but if one write test: expect( add(1,2) ).to eq(1+2) that’s testing the detail. The problem with testing the detail is that… say if the dependent method, :+ got changed, then the result would actually be different, but the second spec would still pass.

Posts1 min read

CSRF protection in Rails

CSRF(Cross Site Request Forgery) is an attack that forces an end user to execute unwanted actions on a web application in which he/she is currently authenticated. In this post, I’ll explore, in the source code level, how Rails protect itself from CSRF. It has two checks: based on token, and also the origin header. We’ll first look at how rails put the token into the page, then see how the token is checked.

Posts6 min read

on Objective, and Focus

One should always reflect upon himself… to keep on the right track, to find out and correct mistakes, and to the greater self-awareness. – by Myself. When reading, what am I reading about? I have been reading a lot this year. Not only the Tech Specs (which I always do), but also the blog posts (which I often do), as well as the books (which I mostly started this year only). To make my statement stronger, here’s a list of books I’ve read this Year. (I’m recording them down because there’s a line stating “to read more than 50 books this year” in my new year resolution).

Posts4 min read

Inspirations From Book "Second Machine Age"

I was reading about the book . It was.. so interesting that I actually prepared for a set of slides, plus, made a talk about this. I prepared like.. 40 slides; and here’re some of my short insiprations. Steamer Machine is the first machine age.. because the level of development of our human world boost right its invention. Then the second machine age starts with Information Technology. It has the following characteristics:

Posts3 min read
All posts