RSSAmplifier

Blog

Ye Lin's Random stuff

Recent content on Ye Lin's Random stuff

blog.yelinaung.comRSS feed ↗24 posts

Latest posts

What is gVisor?

It has been a really long time since I last wrote something here as life happens, things get busier, etc etc. I am now trying to get back into writing things down and here we go! So, imagine a tool or a service that allows you to run some arbitrary code via a shell. Either through a ssh or more commonly, via a web terminal. How does these tools isolate your code from other people’s code and…

Why My Print Didn't Output Before a Segmentation Fault

So, as I was learning some C , at the pointers/segfault, I was trying this code myself. #include <stdio.h> int main ( void ) { printf ( '%s' , 'Hello!' ); int * p = NULL ; * p = 5 ; // Will not be reached due to crash above printf ( '%s' , 'Another Hello!' ); } Then compile it and run it in the terminal. $ gcc -Wall -Wextra -o hello hello.c && ./hello Segmentation fault (core dumped) To my…

Behind 'Hello World' on Linux notes

I wrote these notes while reading Julia Evans&rsquo; (excellent) Behind &ldquo;Hello World&rdquo; on Linux post post. I learned a lot from it. If you haven&rsquo;t read it yet, I highly recommend you do! I am on Ubuntu Linux 22.04 LTS and there is filed called hello.py with content print ( 'Hello world!' ) It&rsquo;s basically &ldquo;What happens when you do python hello.py in the terminal, on…

TIL - Underneath the Docker Desktop

22-12-22 Special! So, you want to know about how Docker Desktop works underneath. Well, it&rsquo;s like a magic show, except the rabbits are containers and the hat is a Linux VM. Let me break it down for you. Before I go further into the main topic, allow me to get sidetracked a bit here on how I fell into this rabbit hole. On a rare sunny afternoon in forever-raining-everyday Singapore, I stumble…

TIL - zstd

I was going through Tobi&rsquo;s list of some really cool programming tech and got curious about zstd. Zstandard (also known as zstd) is a Fast real-time compression algorithm from Facebook. What is zstd ? zstd is a “lossless” data compression algorithm Lossless means it can compress data without losing any of the original information. it restores and rebuilds the data in its original form, after…

Things I Read 14th Dec 2022

lstopo There are many ways to find out what&rsquo;s the CPU you are using and more info about it. For Windows and Android, there is CPU-Z . For Mac, there is System Report or command line sysctl -a | grep machdep.cpu . On Linux, there are plenty. You can check with htop , sudo lshw -C cpu , lscpu or the good old less /proc/cpuinfo . Today, I&rsquo;ve found out Portable Hardware Locality (hwloc)…

Useful Postgres Queries

I&rsquo;ve been analyzing the Postgres databases at work and have collected some useful snippets. Here&rsquo;s some with the example output, using this site&rsquo;s analystics database. Also, please check out the excellent pgcli for Postgres. For others databases, check out dbcli . The basics List all the databases --- list the databases --- there is a '+' version for more info as well --- \l+ \ l…

Travis CI to Google Cloud Build

At work, we&rsquo;ve been facing lots of issues with Travis CI . The biggest issue is we cannot run more than 5 builds at a time. If some of the builds take a longer time, the rest have to queue. It slows down our velocity to ship things quickly. The other issues we faced are slow initial boot times (Travis uses GCP VMs to run the builds) unable to provision bigger machines for faster builds bugs:…

Things I Read 19th Aug 2022

Alacritty Error on remote machine terminal Alacritty is my go-to terminal. It&rsquo;s fast! Sometimes, I&rsquo;d get errors like this when I ssh into some old servers from work. Error opening terminal: alacritty. This also happens with kitty 'xterm-kitty' : unknown terminal type. I found the solution about alacritty in this Github issue . This is one way I can do, if the machine has access to the…

Things I Read 10th Aug 2022

[Kubernetes] Pod Topology Spread Constraints Today I was looking for a way to evenly spreadout the N numbers of pods on M numbers of Kubernetes Nodes. I found that Pod&rsquo;s spec.topologySpreadConstraints is the way to do it. This is the fields necessary. apiVersion : v1 kind : Pod metadata : name : example-pod spec : # Configure a topology spread constraint topologySpreadConstraints : - maxSkew…

Things I Read 07th Aug 2022

Fun with Finite Automata Interesting talk about how Bryan Boreham made some optimization for Go regex packages. Learned a bit about Deterministic finite automaton . Tell HN: I have the perfect job, why is it not enough? Link Interesting answers about feeling unfulfilled. Avoiding Micromanagement This is the whole thread with context and what.

Today I learned about UUID

I was reading up on how the Envoy proxy generates x-request-id and learned that it uses UUID (Universally unique identifier). Well, this is not new. We want the requests to be unique regardless of the clients, and the servers so it makes sense. We also use UUID everywhere these days. The biggest example is the database records&rsquo; primary key. Most programming languages/web frameworks provide…

Effective Communications

This is the public version of an internal doc that I and my colleagues (especially Jit Corn, Jack & Co. Thank you guys.) prepared for the rest of the engineering team. All the points here are from the great articles/videos we have seen and our own experience/expecations working remote due to COVID. This guide tries to set the expectations and provides some guidelines. The remote work environment…

Certified Kubernetes Administrator (CKA)

After the CKAD exam , my next goal was to take the CKA exam. According to the people who took it, the exam is harder than the CKA. The curriculum for the CKA shows that it goes deeper into the different parts of Kubernetes. I have some experience with Kubernetes via Google Kubernetes Engine (GKE). But, I was new to provisioning underlying infrastructure to deploy a Kubernetes cluster performing a…

Lessons from real world

I have given this talk to a group of students back in Myanmar, as part of a free-of-charge bootcamp/workshop. The students are young, smart and enthusiastic. Unfortunately, they had to stop their education due to the covid and the tough political situation back home. As requested by the organizer of the bootcamp, I thought about what I can share and this is the result of it. I also thought I would…

Standard Advice by Simon Sarris

The original article used to be at https://simonsarris.com/be-positive/ . I searched through Wayback machine and just reposting here. Be positive. Listen for 90% of a conversation and people will find you interesting. Learn to ask engaging questions and let others do the answering. Don’t just ask people about facts, ask for their opinions too. Don’t be an interrogator. Be curious. Where were you…

Static Pods in Kubernetes

After taking the CKAD exam, I am planning to take the (harder) CKA exam. As I was studying for it, I stumbled upon Static Pods in Kubernetes. It is slightly different from the regular Pods. This is the normal Kubernetes cluster components From Cloud9 Kubernetes Concepts and Architecture Learn more about the Control plane components here . Now, let&rsquo;s imagine there is a Kubernetes cluster with…

CKAD Experience

I recently took the Certified Kubernetes Application Developer (CKAD) exam and passed with 97 out of 100. Some background about myself. I have been a backend + infra engineer working with Kubernetes via Google Cloud&rsquo;s managed service: GKE for the past few years. I am also a (Ubuntu) Linux user for both the desktop and servers. I am familiar with basic linux commands, bash, tmux and vim. The…

for vs list comprehension

This is me writing down my discussion with someone from work regarding for loop vs list comprehension in Python. During a code review, I was commenting on a chunk of code to change from for loop to a list comprehension. We also talked about why I wanted it that way. One reason is list comprehension could be (arguably) more readable than a for loop. For a simple loop, that might be the case.…

Things I Read : CPython Performance

I&rsquo;ve been looking at how I can improve the performance of an internal service written in Python. I was wondering if there is a way to speed things up without rewriting large part of the code or using another programming language to rewrite part of the code. Then I remember reading about Pyston (a faster and highly-compatible with Cpython from Dropbox) on HackerNews and this seems like an…

Things I Read - SIM Cards!

Another rainy day. SIM Cards!! Another day, another interesting HN post. I saw this post What is AT&T doing at 1111340002? . And the top was very interesting to me. Even in relatively technical circles, like HN, many people are not aware of this and I use every opportunity I have to reiterate: A SIM card is a full-blown computer with its own CPU and memory. Your carrier can upload and run…

About

Hi! My name is yelinaung I am writing down what I&rsquo;ve learned recently learning progress interesting topics books

Things I Read - Trie, Raft

Things that I stumbled on a rainy day. Understanding how Trie (Data Structure) works Understanding how Raft (Distributed Consensus algorithm) works Trie I have heard/seen it but not in detail until now. Saw someone posted about it on HN and makes me curious. I also found a post about Trie written in Python by Googling. I like the clear explanation with diagrams and put the code on github . Some…

Testing

This is some static page where you can write about yourself.