Software Engineer

AI Enthusiast

World Explorer

Welcome to my digital garden — a place where I share my thoughts on software engineering, artificial intelligence, and my journey exploring the world.

Articles

Explore my thoughts on technology, programming, and more.

raft

distributed-system6.824

An overview of the Raft consensus algorithm, explaining its key components including leader election and log replication. This post covers the basics of how Raft ensures consistency across distributed systems, handles network partitions, and maintains a replicated state machine.

2018-10-29

全链路追踪的各种概念

distributed-system

An overview of distributed tracing concepts, including traces, spans, and contexts, with a focus on OpenTracing standards and their applications in system monitoring and debugging.

2023-02-02

学习印尼语一个月总结

language

A summary of my experience learning Indonesian in one month, discussing the challenges and achievements, and providing insights into the learning process.

2024-08-06

我的信息来源

记录信息来源, 持续修订

2024-09-10

可复用的 UI 代码

uidesign

string search algorithm #1: 暴力枚举和Boyer–Moore算法

algorithm

An introduction to string search algorithms, focusing on the naive brute-force approach and the Boyer-Moore algorithm. This post explains the basic concepts, implementation details, and efficiency improvements of these methods for finding substrings within larger text.

2018-12-07

sort/hash超出内存大小如何处理

database

An overview of out-of-core sorting and hashing techniques for handling datasets larger than available memory. This post explains buffer usage, the process of external sorting with multiple passes, and partitioning strategies for out-of-core hashing, including analysis of memory requirements and data size limitations.

2018-11-29

如何用自定义 Linter 确保样式符合设计系统

design-systemlintertooling

用设计系统作为允许清单,通过自定义 Linter 约束 AI 生成代码的样式,保证颜色、间距、字体等符合规范。

2025-01-31

JAVA repl 运行时添加 maven / clojure lib

clojurejava

RocketMQ 磁盘满处理方式

rocketmq

An explanation of how RocketMQ handles disk full scenarios, including the error message, relevant source code, and the disk space checking mechanism.

2024-09-03

Kleisli

scalafunctional-programming

An introduction to Kleisli arrows in functional programming, explaining how they enable composition of functions that return monadic values. The post covers the concept of Kleisli composition, its implementation in Cats, and provides examples using the Writer monad.

2018-11-20

virtual table

clojure

网络协议七层模型

networking

An overview of the OSI and TCP/IP network models, explaining the functions of each layer and how they interact. This post also covers network topologies and protocols like CSMA and token ring used in bus networks.

2018-09-03

free functor/monad

scalafunctional-programming

An exploration of natural transformations between functors in functional programming, introducing the concept of Free functors and demonstrating how to implement conversions between different container types like Monix Task, Scala Future, and Java CompletableFuture.

2019-01-02

static site generator

clojure

Finding Fulfillment at Work

happinesscareer

Exploration of common workplace dissatisfaction factors and practical approaches to enhance career fulfillment.

2024-09-09

用 MessageChannel 和 iframe 通信

javascript

An explanation of how to use MessageChannel for bidirectional communication between a parent page and an iframe, with code examples and step-by-step instructions.

2023-01-23

Lens part1 - Iso

scalafunctional-programming

An introduction to Iso, a type of lens in functional programming that represents isomorphisms between types. The post explains the concept, provides code examples in Scala, and demonstrates practical applications of Iso in handling unit conversions.

2019-04-18

数据库的储存方式

database

An overview of database storage methods, including log-structured storage, indexing techniques, Sorted String Tables (SSTs), and B-trees. The post explores the advantages of each approach and discusses optimizations for improved performance and reliability.

2018-08-30

ThirdTime 工作法使用一个月后的心得体会

time-management

A reflection on the experience of using the ThirdTime work method for one month, discussing the challenges and achievements, and providing insights into the work method.

2024-07-10

clojure as framework

clojure

What Makes a Good Blog: Beyond Aesthetics and Technical Aspects

blog

The concept of digital gardening, ideal navigation structures, and content update challenges

2024-09-05

lens,函数式的getter和setter

scalafunctional-programming

An introduction to lenses in functional programming, explaining how they serve as functional equivalents to getters and setters in object-oriented programming, with code examples in Scala.

2018-11-22

RocketMQ MQBrokerException: CODE: 14 问题排查

rocketmq

A detailed investigation of the MQBrokerException code 14 issue in RocketMQ, discussing the causes and solutions.

2023-02-08

用clojure写个编译器, part1

clojurecompiler

A tutorial series on building a compiler in Clojure, starting with simple arithmetic expressions and progressing to more complex language features, including AST visualization and compilation to stack-based VM instructions.

2023-01-21

RocketMQ 5.0 解锁任意时间延迟消息能力

rocketmq

An exploration of the new delay message feature in RocketMQ 5.0, discussing its implementation and how to set the precision parameter for optimal performance.

2023-02-23

polymorphic function value 2

scalashapeless

An exploration of polymorphic function values in Scala, focusing on natural transformations. This post discusses the limitations of standard Scala function values and introduces a more flexible approach for handling polymorphic functions, particularly useful for operations on heterogeneous lists (HLists).

2018-11-29

本项目的 Tailwind 设计系统 Linter 实现

design-systemlintertooling

说明当前项目如何落地设计系统 Linter 方案的数据源与规则实现。

2025-01-31

Many Java Codebases Are a Mess

java

Me rant about Java and Java devs

2024-09-14

integrant repl

clojure

fault tolerence vm

distributed-system6.824

An analysis of fault-tolerant virtual machine replication techniques, discussing primary-backup architectures, deterministic replay, output consistency, and failure detection mechanisms. The post also compares these approaches with log replication in the Raft consensus algorithm.

2018-10-29

博客使用的技术栈

astro

An overview of the technologies and tools used to create this blog, including Astro, MDX, React, Tailwind CSS, and more.

2024-07-10

akka实现logical timestamp和分布式锁, part 1-1: 问题描述和总体框架

scaladistributed-systemakka

An implementation of a distributed mutex using Akka, exploring logical timestamps and consensus algorithms. This post introduces the problem, outlines the requirements for the distributed lock, and sets up the basic Akka actor structure for the solution.

2018-12-25

out of core sorting, rust实现

rust

A Rust implementation of out-of-core sorting algorithm, demonstrating how to handle datasets larger than available memory. This post covers the basic concepts of out-of-core sorting, explains the phased approach, and provides a step-by-step implementation in Rust, focusing on disk I/O operations and memory management.

2018-12-07

Profunctor

scalafunctional-programming

An introduction to profunctors in functional programming, explaining their definition, relationship to bifunctors, and implementation in Scala. This post covers the basic structure of profunctors, their laws, and provides examples of profunctor instances like function types.

2018-12-05

写作和写代码

writing

Support My Writing Journey

blog

it's like contribution.md on github, but for writing

2024-09-20

The Benefits and Challenges of Shadowing

language

An exploration of shadowing as a language learning technique, discussing its effectiveness at different proficiency levels and providing practical tips for maximizing its benefits.

2024-08-20

Decompose task

2024-09-03

Strategies for Effortless and Impactful Writing

writingblog

Discover practical techniques to make writing easier and more effective, including leveraging AI tools, personal note-taking systems, and identity-based habit formation for a more productive writing process.

2024-09-06

applicative functor

scalafunctional-programming

An introduction to applicative functors in functional programming, explaining their definition, methods, and properties with Scala code examples. The post covers the ap and pure methods, as well as the product-based definition of applicatives.

2018-11-22

database instead of file system

clojure

at most once

distributed-system

An explanation of how to implement at-most-once semantics in distributed systems, covering client-side XID usage, server-side result caching, and strategies for cache management and handling concurrent requests.

2018-11-29

语言的边界就是我的世界

language

map reduce

distributed-system6.824

An overview of the MapReduce distributed computing model based on the original Google paper. This post covers the MapReduce workflow, master-worker architecture, fault tolerance mechanisms, and optimization techniques like data locality and backup tasks. It also addresses common questions about task granularity and failure handling in MapReduce systems.

2018-11-30

incremental UI

computationUI

交换机,路由器等硬件

networking

An overview of networking hardware including hubs, switches, and routers, along with traffic classification and packet capture techniques. This post explores the differences between these devices, their roles in network communication, and methods for monitoring network traffic.

2018-11-13

GFS

distributed-system6.824

An analysis of the Google File System (GFS) architecture, discussing its design assumptions, chunk-based storage, metadata management, and consistency model. The post explores the benefits and drawbacks of large chunk sizes, the role of the master server, and the system's approach to data mutations and consistency.

2018-10-29

Contravariant Functor Intuition

scalafunctional-programming

An exploration of contravariant functors in functional programming, explaining their definition, intuition, and practical applications. The post covers the contramap function, compares it with covariant functors, and provides examples using Show and Ordering types in Scala.

2018-11-19

nix

nix