Ben Chuanlong Du's Blog

It is never too late to learn.

Use Tauri to Build a Desktop Application

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Tauri is a framework for building tiny, blazing fast binaries for all major desktop platforms. Developers can integrate any front-end framework that compiles to HTML, JS and CSS for building their …

Use TableSample in SQL

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

The limit clause (or the method DataFrame.limit if you are using Spark) is a better alternative if randomness is not critical.

PostgreSQL

SELECT id from table TABLESAMPLE BERNOULLI(10) WHERE …

Latency Numbers Programmers Should Know

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Latency Operations
<=1ns
  • accessing CPU registers
  • CPU clock cycle
  • L1 cache
1-10ns
  • L2 cache
  • branch mispredict
10-100ns
  • L3 cache
  • mutex lock/unlock
  • main memory referencing
100-1000ns
  • trapping of system call
  • md5 …

SQL Equivalent

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

SQL translation is a great tool that transalte any SQL statement(s) to a different dialetc using the JOOQ Parser.

SQL Variant Code
List
databases [1 …