Earlier this year, our company organized an engineer offsite, and my coworker M brought a book with him. I was very judgemental at the beginning (there are so many articles and posts out there about debugging, so why do we need a book, published in the early 2000s, by an author born in the 50s?).… Continue reading Debugging: part 1, intro and understanding the system
Tag: programming
Removing Gacha: II, an expectation problem
This is a continuation of the last post. Let’s slightly modify the process: stop when the box becomes empty. And what is the expected number of steps for this process? The first ball This is trivial. Whichever other ball is chosen, we always put it back. So until the first ball is chosen (and dropped),… Continue reading Removing Gacha: II, an expectation problem
Removing Gacha: I, a probability problem
The actual problem is here on atcoder. I’ll build a solution from the bottom up. So here we go. Let’s say we have N balls (numbered 1 to N) from a box, and we do the following: And by the time the process is stopped, what’s the probability that the N-th ball has been taken… Continue reading Removing Gacha: I, a probability problem
Random Debugging: video related
I’m trying to use my Raspberry Pi as a home monitoring system, together with a webcam. Over the past few weeks or so, I encountered multiple problems, each of which wasn’t complicated, but due to the lack of documentation and/or proper error message, they took a long time to resolve. Video not playable Part of… Continue reading Random Debugging: video related
Random debugging: can’t connect to host on the same VPN
In order to be able to access my home network from outside, I have this setting: I have a VPS, which runs the OpenVPN service (and the IP address is 10.8.0.1) A Raspberry Pi at home, that always connect to the VPN (and it has IP address 10.8.0.22) And when I need to access my… Continue reading Random debugging: can’t connect to host on the same VPN
Codeforces Hello 2022: Weighted Increasing Subsequences
Problem link: https://codeforces.com/contest/1621/problem/G I first started with a simpler subproblem: some properties of all increasing subsequences up until i, more specifically, the number of unique sequences and the sum of the length of them. It’s not hard to see we can solve this by some tree structure. (i.e., if before i, the number of unique… Continue reading Codeforces Hello 2022: Weighted Increasing Subsequences
GCJ 2021 R1A
I’ll recap my participation in Google Code Jam 2021 Round 1A here. The performance is not too impressive. If I weren’t able to fix a silly bug and submit in the last minute, I wouldn’t have advanced to the next round. At the beginning of the contest, I also wasted 20 minutes for the easiest… Continue reading GCJ 2021 R1A
Side Projects
I tried to work on some side projects for quite a while, but until last year did I finally make something complete. Here I’m summarizing what I did, and will share more details in subsequent posts. First of all, I’m reflecting on why previous efforts were fruitless. The single biggest mistake that failed previous attempts… Continue reading Side Projects