Heisenbug

date: 2023-02-28 · Tags: #til, #dev

In computer programming jargon, a heisenbug is a software bug that seems to disappear or alter its behavior when one attempts to study it.

...

Similar terms, such as bohrbug, mandelbug, hindenbug, and schrödinbug, even more higgs-bugson

https://en.wikipedia.org/wiki/Heisenbug

I'm a coder with Physics background, and these jargons are surprisingly funny and precise, LOL.

Fly.io Gossip Glomers

date: 2023-02-26 · Tags: #distsys, #dev

Fly.io Gossip Glomers are a series of distributed systems challenges brought to you by Fly.io.

Fly.io Gossip Glomers

Looks incredibly cool 🫣 I'm in 😈.

io_uring and networking in 2023

date: 2023-02-14 · Tags: #good-reading

It attempts to highlight some of the features and optimizations that were specifically tailored for networking workloads --- Jens Axboe

io_uring and networking in 2023

Google Python Style Guide

date: 2023-02-11 · Tags: #python, #dev

许久不看 Google Python Style Guide 1, 里面推荐的 indentation 已经 2 spaces 改到 4 spaces 了 😅 还自己开发了 PyInk2 补充 Black, 另外也随着 Python 引入的新功能更新了一些有意思的内容 🤗

class A:
    def foo(self, obj):
        match obj:
            case (1, a, 3):
                now_you_can_write_functions_or_codes()
            case C(x, y):
                ...

但是因为 Python 里 pattern matching 的语法过于~~优雅 ~~繁琐, 4 spaces 下随便写点 什么, 真正的逻辑代码就已经不知道缩进到哪里去了, 在 Python 里使用 2 spaces 好像我 又可以了...

Footnotes

  1. Google Python Style Guide

  2. google/pyink: Pyink, pronounced pī-ˈiŋk, is a Python formatter, forked from Black with a few different formatting behaviors.

`foo`, `bar` and More

date: 2023-02-03 · Tags: #dev, #til

Though we always use foo or bar as placeholder for naming, do you know what's the next? Here (maybe) is a full list:

foo, bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud.

There are all metasyntactic variables (could be referenced from The Hacker's Dictionary).

Another widely used placeholder is the "Alice" and "Bob". And left succeed people have more choices, some common names are

  • Alice and Bob
  • Carol, Carlos or Charlie
  • Dan, Dave or David
  • Eve
  • Frank
  • ...

Even more they have fairly well-established "personalities" (or functions):

  • Craig -> A password cracker, often encountered in situations with stored passwords
  • Grace -> A government representative

Ref: Alice and Bob