# Random Thoughts

100% human native.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## 尽职编程：AI Coding 时代的个体产出差异的来源

DevFeed: [尽职编程：AI Coding 时代的个体产出差异的来源](<https://devfeed.tech/articles/ai-coding-41013.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/software-engineering-with-ai-coding/>)

Author: Joway

Published: 2026-08-29T00:00:00Z

Content type: opinion

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [ai-coding](<https://devfeed.tech/topics/ai-coding.md>), [coding](<https://devfeed.tech/topics/coding.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [codex](<https://devfeed.tech/topics/codex.md>), [GitHub](<https://devfeed.tech/topics/github.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-coding](<https://devfeed.tech/tags/ai-coding.md>), [ai-coding-agent](<https://devfeed.tech/tags/ai-coding-agent.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [codex](<https://devfeed.tech/tags/codex.md>), [coding](<https://devfeed.tech/tags/coding.md>), [github](<https://devfeed.tech/tags/github.md>), [thought](<https://devfeed.tech/tags/thought.md>)

### AI overview

This opinion argues that AI coding tools do not produce equal results because they can execute subtasks but cannot reliably determine all the context and decisions required to complete a larger task. The author proposes "due-diligence programming": humans must question AI, understand its designs, review its output, and reassess systems as they evolve. The article describes an independent Codex review plugin as a way to make that effort visible and encourage more rigorous review.

### Source excerpt

这一年多的时间以来，AI Coding 已经从一个新潮的编程方式变成了默认方式，每个人都用着近乎相似的模型，相似的设备，相似的 Agent，理论上所有人产出的代码水平也应该相似，但如果你在一线工作过，你会发现实际情况恰恰相反，大家的代码产出水平方差反而比以往更大。这是一个相当有意思的话题，但是我却发现在互联网上鲜有人讨论。

## LLM 训练与推理的基本理解

DevFeed: [LLM 训练与推理的基本理解](<https://devfeed.tech/articles/llm-40974.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/deep-into-llm/>)

Author: Joway

Published: 2026-05-17T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Language models](<https://devfeed.tech/topics/language-models.md>), [Transformer](<https://devfeed.tech/topics/transformer.md>)

Tags: [embedding](<https://devfeed.tech/tags/embedding.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [language](<https://devfeed.tech/tags/language.md>), [large-language-model](<https://devfeed.tech/tags/large-language-model.md>), [llm](<https://devfeed.tech/tags/llm.md>), [model](<https://devfeed.tech/tags/model.md>), [query](<https://devfeed.tech/tags/query.md>), [tech](<https://devfeed.tech/tags/tech.md>), [token](<https://devfeed.tech/tags/token.md>), [value](<https://devfeed.tech/tags/value.md>)

### AI overview

This Chinese tutorial explains foundational LLM training and inference concepts, including vector operations, linear layers, Softmax, LayerNorm, tokenization, token IDs, BPE, token and positional embeddings, and the initial steps of self-attention using Q, K, and V vectors.

### Source excerpt

学习一个技术最好的方式就是能够写一片文章把这个技术的原理解释清楚，本文记录了我在阅读 《Build a Large Language Model (From Scratch)》一书以及和 Claude Code 对话过程中的笔记，仅供参考。 术语解释 向量点积 定义：向量点积为标量 a = (a1, a2, a3) b = (b1, b2, b3) a - b = a1*b1 + a2*b2 + a3*b3 几何意义： a - b = |a| |b| cos(theta) 其中 theta 是两个向量的夹角。

## The Ambivalence and Emptiness of Working With AI

DevFeed: [The Ambivalence and Emptiness of Working With AI](<https://devfeed.tech/articles/article-41019.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/the-past-before-ai/>)

Author: Joway

Published: 2026-03-30T00:00:00Z

Content type: opinion

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [thought](<https://devfeed.tech/tags/thought.md>), [token](<https://devfeed.tech/tags/token.md>)

### AI overview

This opinion essay reflects on the author's simultaneous dislike of and reliance on AI. It argues that AI-assisted work can replace a sense of accomplishment with uncertainty and emptiness, while expressing anxiety about declining creative quality and an increasingly uncertain professional future.

### Source excerpt

最近在做一个思想实验，如果你面前有一个按钮，按下就可以让 AI 从世界上消失，你是否会按下。身边很多朋友的答案都是会毫不犹豫的按下，即便有一些人还是那种最拥抱 AI 的人。 拥抱 AI 和厌恶 AI 可以同时在一个人身上发生，我自己就是这样的人。我厌恶 AI，是因为对昨日世界的怀念，我拥抱 AI，是因为今日世界无法回退，我没有不拥抱的选择。

## Magic Brush: An AI Tool for Creating and Embedding Interactive Web Pages

DevFeed: [Magic Brush: An AI Tool for Creating and Embedding Interactive Web Pages](<https://devfeed.tech/articles/magic-brush-41001.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/magic-brush/>)

Author: Joway

Published: 2026-03-05T00:00:00Z

Content type: article

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Vibe coding](<https://devfeed.tech/topics/vibe-coding.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [HTML](<https://devfeed.tech/topics/html.md>), [Cloudflare](<https://devfeed.tech/topics/cloudflare.md>), [Claude Code](<https://devfeed.tech/topics/claude-code.md>), [codex](<https://devfeed.tech/topics/codex.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [claude-code](<https://devfeed.tech/tags/claude-code.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [codex](<https://devfeed.tech/tags/codex.md>), [coding](<https://devfeed.tech/tags/coding.md>), [html](<https://devfeed.tech/tags/html.md>), [product](<https://devfeed.tech/tags/product.md>), [tool](<https://devfeed.tech/tags/tool.md>), [vibe-coding](<https://devfeed.tech/tags/vibe-coding.md>)

### AI overview

The article introduces Magic Brush, a product that lets users create web pages through natural-language interaction with AI and embed them in other webpages. It describes a design interface with live rendering, a public gallery for sharing pages, and use cases including interactive articles, flowcharts, and custom browser tools. The Design Agent runs in the frontend, while the backend uses Cloudflare Worker and Cloudflare R2; the author says Claude Code and codex were used during development.

### Source excerpt

上周末用 AI 写了一个新的产品： Magic Brush。 这个产品的 idea 来自于我经常用 AI vibe coding 一些小的前端产品，但是如果每次都为这些小产品创建独立的域名和部署太过于繁琐，而且目前也缺乏一个聚合站点可以浏览其他人创建的小产品。另外，我在写博客的时候，也经常会想要插入一些交互页面来展示我的 idea，但是如果要在博客里插入一堆 js/css 代码又会导致博客无法长期维护。我把这些需求收集了下，整理并抽象出了一个产品形态：

## AI Coding and the Changing Role of Software Engineers

DevFeed: [AI Coding and the Changing Role of Software Engineers](<https://devfeed.tech/articles/ai-coding-40967.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/after_ai_coding_singularity/>)

Author: Joway

Published: 2026-02-26T00:00:00Z

Content type: opinion

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [ai-coding](<https://devfeed.tech/topics/ai-coding.md>), [coding](<https://devfeed.tech/topics/coding.md>), [AI Agent](<https://devfeed.tech/topics/ai-agent.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [ai](<https://devfeed.tech/tags/ai.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [ai-coding](<https://devfeed.tech/tags/ai-coding.md>), [coding](<https://devfeed.tech/tags/coding.md>), [thought](<https://devfeed.tech/tags/thought.md>)

### AI overview

The author reflects on moving from manually writing code to relying heavily on AI Coding, arguing that AI can now generate large amounts of code with limited human review. The article presents the view that software engineers will increasingly manage AI agents, solve problems they cannot handle, and help organizations adapt their workflows to agent-based work.

### Source excerpt

说来惭愧，我已经好几个月没有完全手写代码了，甚至像是把某个变量改一个名字这种活我都宁愿输入更多字符告诉 AI 来做而不是自己直接改了，因为我知道，哪怕是变量重命名这种简单的活，AI 也能做的比我仔细，它会检查所有用到这个变量的代码、相关的注释以及单元测试，然后一并都修改了，而我自己其实历史上就犯过不少忘记修改关联地方的错误。

## 重新思考 Go：了解程序在线上是如何运行的

DevFeed: [重新思考 Go：了解程序在线上是如何运行的](<https://devfeed.tech/articles/go-40988.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/golang-rethink-program-in-realworld/>)

Author: Joway

Published: 2024-12-10T00:00:00Z

Content type: article

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [cgroups](<https://devfeed.tech/topics/cgroups.md>), [Linux](<https://devfeed.tech/topics/linux.md>)

Tags: [cgroups](<https://devfeed.tech/tags/cgroups.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [k8s](<https://devfeed.tech/tags/k8s.md>), [linux](<https://devfeed.tech/tags/linux.md>), [mechanical-sympathy](<https://devfeed.tech/tags/mechanical-sympathy.md>), [quota](<https://devfeed.tech/tags/quota.md>), [runtime](<https://devfeed.tech/tags/runtime.md>), [tech](<https://devfeed.tech/tags/tech.md>), [waiting](<https://devfeed.tech/tags/waiting.md>)

### AI overview

This article examines how Go programs run in production environments, focusing on the relationship between Kubernetes CPU quotas, physical CPU availability, cgroups, and Go's GOMAXPROCS setting. It explains that CPU quota limits aggregate execution time, while available parallelism can depend on the host's physical cores and the program's design. It also introduces scheduling latency and the factors that affect the computing resources a Go service actually receives.

### Source excerpt

重新思考 Go 系列：这个系列希望结合工作中在 Go 编程与性能优化中遇到过的问题，探讨 Go 在语言哲学、底层实现和现实需求三者之间关系与矛盾。 前言 过去一段时间，在大量的线上服务 case study 过程中，逐步深入了解了如今的业务 Go 进程是如何在一系列繁杂的基础设施之上运行的。有些表现在意料之中，也有一些出乎意料的发现。

## 重新思考 Go：Channel 不是「消息队列」

DevFeed: [重新思考 Go：Channel 不是「消息队列」](<https://devfeed.tech/articles/go-channel-40987.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/golang-rethink-channel/>)

Author: Joway

Published: 2024-03-31T00:00:00Z

Content type: opinion

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Processes](<https://devfeed.tech/topics/processes.md>)

Tags: [cpu](<https://devfeed.tech/tags/cpu.md>), [csp](<https://devfeed.tech/tags/csp.md>), [go](<https://devfeed.tech/tags/go.md>), [input](<https://devfeed.tech/tags/input.md>), [make](<https://devfeed.tech/tags/make.md>), [process](<https://devfeed.tech/tags/process.md>), [queue](<https://devfeed.tech/tags/queue.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

This article argues that Go channels are designed primarily for communication and blocking coordination between goroutines, not as robust in-process message queues. It examines blocking when channels are full, uncontrolled consumer throughput, and the resulting pressure on core processing paths. The author concludes that using channels as queues can be a questionable technology choice and suggests a more complete standard-library queue implementation.

### Source excerpt

重新思考 Go 系列：这个系列希望结合工作中在 Go 编程与性能优化中遇到过的问题，探讨 Go 在语言哲学、底层实现和现实需求三者之间关系与矛盾。 Go 语言是一门为实现 CSP 并发模型而设计的语言，这也是它区别于其他语言最大的特色。而为了实现这一点，Go 在语法上就内置了 chan 的数据结构来作为不同协程间通信的载体。

## 重新思考 Go：Slice 只是「操作视图」

DevFeed: [重新思考 Go：Slice 只是「操作视图」](<https://devfeed.tech/articles/go-slice-40989.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/golang-rethink-slice/>)

Author: Joway

Published: 2024-03-30T00:00:00Z

Content type: article

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [bug](<https://devfeed.tech/topics/bug.md>)

Tags: [copy](<https://devfeed.tech/tags/copy.md>), [gc](<https://devfeed.tech/tags/gc.md>), [go](<https://devfeed.tech/tags/go.md>), [slices](<https://devfeed.tech/tags/slices.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

This article examines Go slices as views over underlying memory rather than memory representations. It explains how subslices can retain oversized buffers, pointer elements can remain referenced after removal, and certain allocation patterns can cause unnecessary memory clearing. It concludes by discussing Go 1.21's slices package as a safer way to manipulate slices.

### Source excerpt

重新思考 Go 系列：这个系列希望结合工作中在 Go 编程与性能优化中遇到过的问题，探讨 Go 在语言哲学、底层实现和现实需求三者之间关系与矛盾。 Go 在语法级别上提供了 Slice 类型作为对底层内存的一个「操作视图」: var sh []any // ==> internal struct of []any type SliceHeader struct { Data uintptr Len int Cap int } 编程者可以使用一些近似 Python 的语法来表达对底层内存边界的控制:

## RPC 漫谈： 连接问题

DevFeed: [RPC 漫谈： 连接问题](<https://devfeed.tech/articles/rpc-40975.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/deep-into-rpc-connection/>)

Author: Joway

Published: 2021-05-06T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Remote Procedure Call (RPC)](<https://devfeed.tech/topics/rpc.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [IO](<https://devfeed.tech/topics/io.md>), [Server](<https://devfeed.tech/topics/server.md>)

Tags: [io](<https://devfeed.tech/tags/io.md>), [linux](<https://devfeed.tech/tags/linux.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [server](<https://devfeed.tech/tags/server.md>), [service-mesh](<https://devfeed.tech/tags/service-mesh.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

This article explains what a network connection represents, the memory, file-descriptor, and thread costs of maintaining connections, and why the C10K problem is primarily an operating-system and software-design challenge. It then introduces the evolution of Linux I/O interfaces, including select and poll, in the context of RPC and large numbers of concurrent connections.

### Source excerpt

什么是连接 在物理世界并不存在连接这么一说，数据转换为光/电信号后，从一台机器发往另一台机器，中间设备通过信号解析出目的信息来确定如何转发包。我们日常所谓的「连接」纯粹是一个人为抽象的概念，目的是将传输进来的无状态数据通过某个固定字段作为标识，分类为不同有状态会话，从而方便在传输层去实现一些依赖状态的事情。

## RPC 漫谈：序列化问题

DevFeed: [RPC 漫谈：序列化问题](<https://devfeed.tech/articles/rpc-40977.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/deep-into-rpc-serialization/>)

Author: Joway

Published: 2021-04-30T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Remote Procedure Call (RPC)](<https://devfeed.tech/topics/rpc.md>), [Code](<https://devfeed.tech/topics/code.md>), [interface](<https://devfeed.tech/topics/interface.md>), [class](<https://devfeed.tech/topics/class.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [client](<https://devfeed.tech/tags/client.md>), [code](<https://devfeed.tech/tags/code.md>), [interface](<https://devfeed.tech/tags/interface.md>), [java](<https://devfeed.tech/tags/java.md>), [protobuf](<https://devfeed.tech/tags/protobuf.md>), [remote-procedure-calls](<https://devfeed.tech/tags/remote-procedure-calls.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [service-mesh](<https://devfeed.tech/tags/service-mesh.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

This article explains RPC serialization and deserialization, including IDL definitions, generated Stub code, reflection, and encoding techniques such as Varint and ZigZag. It discusses trade-offs between generated code size, convenience, performance, and network payload size.

### Source excerpt

何为序列 对于计算机而言，一切数据皆为二进制序列。但编程人员为了以人类可读可控的形式处理这些二进制数据，于是发明了数据类型和结构的概念，数据类型用以标注一段二进制数据的解析方式，数据结构用以标注多段(连续/不连续)二进制数据的组织方式。 例如以下程序结构体：

## RPC 漫谈： 限流问题

DevFeed: [RPC 漫谈： 限流问题](<https://devfeed.tech/articles/rpc-40976.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/deep-into-rpc-ratelimiter/>)

Author: Joway

Published: 2021-04-23T00:00:00Z

Content type: opinion

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Remote Procedure Call (RPC)](<https://devfeed.tech/topics/rpc.md>), [Server](<https://devfeed.tech/topics/server.md>), [client](<https://devfeed.tech/topics/client.md>), [IO](<https://devfeed.tech/topics/io.md>), [Network](<https://devfeed.tech/topics/network.md>), [cpu](<https://devfeed.tech/topics/cpu.md>)

Tags: [client](<https://devfeed.tech/tags/client.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [io](<https://devfeed.tech/tags/io.md>), [network](<https://devfeed.tech/tags/network.md>), [rpc](<https://devfeed.tech/tags/rpc.md>), [server](<https://devfeed.tech/tags/server.md>), [service-mesh](<https://devfeed.tech/tags/service-mesh.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

This article examines rate limiting for RPC calls between microservices. It explains why fixed limits can help prevent cascading failures and preserve response times, then discusses the limitations of leaky-bucket and token-bucket approaches. The article argues that service capacity changes with code, dependencies, hardware, node count, business demand, and time of day. It proposes estimating current load using concurrent in-flight requests, average response time, and throughput, drawing on Little's law, and describes the trade-off between increased throughput and degraded response time under resource contention.

### Source excerpt

微服务之间的 RPC 调用往往会使用到限流功能，但是很多时候我们都是用很简单的限流策略，亦或是工程师拍脑袋定一个限流值。 这篇文章主要讨论在 RPC 限流中，当前存在的问题和可能的解决思路。 为什么需要限流 避免连锁崩溃 一个服务即便进行过压测，但当真实运行到线上时，其收到的请求流量以及能够负载的流量是不固定的，如果服务自身没有一个自我保护机制，当流量超过预计的负载后，会将这部分负载传递给该服务的下游，造成连锁反应甚至雪崩。

## Golang Interface 内部实现

DevFeed: [Golang Interface 内部实现](<https://devfeed.tech/articles/golang-interface-40985.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/golang-interface-internal/>)

Author: Joway

Published: 2021-01-20T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [interface](<https://devfeed.tech/topics/interface.md>)

Tags: [fmt](<https://devfeed.tech/tags/fmt.md>), [implement](<https://devfeed.tech/tags/implement.md>), [interface](<https://devfeed.tech/tags/interface.md>), [run](<https://devfeed.tech/tags/run.md>), [tech](<https://devfeed.tech/tags/tech.md>), [type](<https://devfeed.tech/tags/type.md>)

### AI overview

The article explains how Golang interface values are represented internally and how a non-atomic assignment can leave type information present while the stored pointer is nil. This can make a nil check fail, allow a type conversion to succeed, and cause a panic only when the method is called.

### Source excerpt

最近遇到一个由于 Golang Interface 底层实现，引发的线上 panic 问题，虽然根源在于赋值操作没有保护起来，却意外地发现了关于 interface 的一些有意思的底层细节。 假设我们现在有以下定义： type Interface interface { Run() } type Implement struct { n int } func (i *Implement) Run() { fmt.Printf(i.n) } 对于使用者而言，一个变量无论是 Interface 类型或是 *Implement 类型，差别都不大。

## Golang for-range 内部实现

DevFeed: [Golang for-range 内部实现](<https://devfeed.tech/articles/golang-for-range-40986.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/golang-range-internal/>)

Author: Joway

Published: 2021-01-20T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Go](<https://devfeed.tech/topics/go.md>)

Tags: [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [range](<https://devfeed.tech/tags/range.md>), [tech](<https://devfeed.tech/tags/tech.md>), [type](<https://devfeed.tech/tags/type.md>)

### AI overview

The article explains how Go's for-range loop is compiled and why it can be much slower than index-based iteration when iterated elements are expensive to copy. It notes that range saves the element length, copies values, and reuses loop variables, recommending a standard for loop for large copy-heavy element types.

### Source excerpt

最近在写一个编解码的功能时发现使用 Golang for-range 会存在很大的性能问题。 假设我们现在有一个 Data 类型表示一个数据包，我们从网络中获取到了 [1024]Data 个数据包，此时我们需要对其进行遍历操作。一般我们会使用 for-i++ 或者 for-range 两种方式遍历，如下代码： type Data [256]byte func BenchmarkForStruct(b *testing.B) { var items [1024]Data var result Data for i := 0; i < b.N; i++ { for k := 0; k < len(items); k++ { result = items[k] } } _ = result } func BenchmarkRangeStruct(b *testing.B) { var items [1024]Data var result Data for i := 0; i < b.N; i++ { for _, item := range items { result = item } } _ = result } 输出结果：

## Golang rand 库锁竞争优化

DevFeed: [Golang rand 库锁竞争优化](<https://devfeed.tech/articles/golang-rand-40984.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/golang-fastrand/>)

Author: Joway

Published: 2020-12-17T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Benchmark](<https://devfeed.tech/topics/benchmark.md>)

Tags: [benchmark](<https://devfeed.tech/tags/benchmark.md>), [golang](<https://devfeed.tech/tags/golang.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

This article explains how contention around Go's globally shared random number generator can reduce performance under high concurrency. It presents a fastrand library that uses pooled per-processor state to reduce lock contention and reports approximately eightfold faster performance than the native global rand in concurrent benchmarks.

### Source excerpt

背景 最近在实现一个随机负载均衡器的时候发现一个问题，在高并发的情况下，官方标准库 rand.Intn() 性能会急剧下降。翻了下实现以后才发现它内部居然是全局共享了同一个 globalRand 对象。 一段测试代码： func BenchmarkGlobalRand(b *testing.B) { b.RunParallel(func(pb *testing.PB) { for pb.Next() { rand.Intn(100) } }) } func BenchmarkCustomRand(b *testing.B) { b.RunParallel(func(pb *testing.PB) { rd := rand.New(rand.NewSource(time.Now().Unix())) for pb.Next() { rd.Intn(100) } }) } 输出：

## 分布式文件系统的演化

DevFeed: [分布式文件系统的演化](<https://devfeed.tech/articles/article-40973.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/deep-into-distributed-filesystem/>)

Author: Joway

Published: 2020-06-14T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [IO](<https://devfeed.tech/topics/io.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Ext4](<https://devfeed.tech/topics/ext4.md>), [hdfs](<https://devfeed.tech/topics/hdfs.md>), [Google](<https://devfeed.tech/topics/google.md>)

Tags: [blocks](<https://devfeed.tech/tags/blocks.md>), [client](<https://devfeed.tech/tags/client.md>), [ext4](<https://devfeed.tech/tags/ext4.md>), [filesystem](<https://devfeed.tech/tags/filesystem.md>), [google](<https://devfeed.tech/tags/google.md>), [hdfs](<https://devfeed.tech/tags/hdfs.md>), [io](<https://devfeed.tech/tags/io.md>), [lease](<https://devfeed.tech/tags/lease.md>), [linux](<https://devfeed.tech/tags/linux.md>), [master](<https://devfeed.tech/tags/master.md>), [pointers](<https://devfeed.tech/tags/pointers.md>), [primary](<https://devfeed.tech/tags/primary.md>), [ssd](<https://devfeed.tech/tags/ssd.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

This article explains local filesystem structure, including superblocks, inodes, block pointers, and file-size limits, then introduces the evolution and architecture of distributed filesystems. It uses GFS to describe metadata lookup, chunk locations, caching, replication, leases, and client read and write flows, and mentions HDFS as a related implementation.

### Source excerpt

文件系统是操作系统 IO 栈里非常重要的一个中间层，其存在的意义是为了让上层应用程序有一层更加符合人类直觉的抽象来进行文档的读写，而无需考虑底层存储上的细节。 本地文件系统 在讨论分布式文件系统前，我们先来回顾下本地文件系统的组成。 存储结构 在前面一张图里，我们能够看到文件系统直接和通用块层进行交互，无论底层存储介质是磁盘还是 SSD，都被该层抽象为 Block 的概念。文件系统在初始化时，会先在挂载的块存储上的第一个位置创建一个 Super Block：

## NodeJS 内存泄漏检测与定位

DevFeed: [NodeJS 内存泄漏检测与定位](<https://devfeed.tech/articles/nodejs-41005.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/nodejs-debug/>)

Author: Joway

Published: 2019-11-10T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Node.js](<https://devfeed.tech/topics/node-js.md>), [developer tooling](<https://devfeed.tech/topics/developer-tooling.md>), [Chrome](<https://devfeed.tech/topics/chrome.md>), [bug](<https://devfeed.tech/topics/bug.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [comparison](<https://devfeed.tech/tags/comparison.md>), [devtools](<https://devfeed.tech/tags/devtools.md>), [dump](<https://devfeed.tech/tags/dump.md>), [nodejs](<https://devfeed.tech/tags/nodejs.md>), [object](<https://devfeed.tech/tags/object.md>), [snapshot](<https://devfeed.tech/tags/snapshot.md>), [string](<https://devfeed.tech/tags/string.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

This Chinese tutorial documents diagnosing and locating a Node.js memory leak using heapdump files and Chrome DevTools. It explains how to obtain heap snapshots, compare snapshots over time, and inspect object references and retained size while noting that increased memory or retained size alone does not conclusively prove a leak.

### Source excerpt

最近解决了一个 Node.JS 应用内存泄漏 Bug，顺便学会了用 Chrome DevTools 去看 heapdump 文件。这里做一些简单的记录。 如何「优雅地」获得 heapdump 文件 由于我们所有应用都是以容器部署的，所以要去获得某个容器内的文件，并拷贝到本地难度还是比较大，也非常麻烦。考虑到调试时或许会需要下载非常多次的 snapshot 文件，建议可以包下 heapdump 库，做成一个接口，把文件 dump 之后再传输给客户端，这样一劳永逸。

## Linux I/O 栈浅析

DevFeed: [Linux I/O 栈浅析](<https://devfeed.tech/articles/linux-i-o-41000.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/linux-io-stack/>)

Author: Joway

Published: 2019-08-11T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [IO](<https://devfeed.tech/topics/io.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [file](<https://devfeed.tech/topics/file.md>), [Ext4](<https://devfeed.tech/topics/ext4.md>), [XFS](<https://devfeed.tech/topics/xfs.md>)

Tags: [block](<https://devfeed.tech/tags/block.md>), [cache](<https://devfeed.tech/tags/cache.md>), [ceph](<https://devfeed.tech/tags/ceph.md>), [ext4](<https://devfeed.tech/tags/ext4.md>), [file](<https://devfeed.tech/tags/file.md>), [filesystem](<https://devfeed.tech/tags/filesystem.md>), [hdd](<https://devfeed.tech/tags/hdd.md>), [hdfs](<https://devfeed.tech/tags/hdfs.md>), [io](<https://devfeed.tech/tags/io.md>), [linux](<https://devfeed.tech/tags/linux.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [oracle](<https://devfeed.tech/tags/oracle.md>), [ssd](<https://devfeed.tech/tags/ssd.md>), [tech](<https://devfeed.tech/tags/tech.md>), [xfs](<https://devfeed.tech/tags/xfs.md>)

### AI overview

This article provides a high-level overview of Linux file I/O, tracing the path from applications through VFS, page cache, filesystems, FUSE, block devices, and I/O scheduling. It also explains hard and symbolic links, direct I/O, filesystem partitioning, and access to raw devices.

### Source excerpt

在 Linux 中，所有外部资源都以文件形式作为一个抽象视图，并提供一套统一的接口给应用程序调用。本文将以宏观视角试图阐述 Linux 中关于文件 IO 的整个调用脉络。 VFS 在 Linux 中，所有 IO 都必须先经由 VFS 层进行转发。通过 VFS 将包括磁盘、网络 Socket、打印机、管道等资源全部封装成统一的接口。

## 什么是真正的编程能力

DevFeed: [什么是真正的编程能力](<https://devfeed.tech/articles/article-41025.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/what-is-the-programming-ability/>)

Author: Joway

Published: 2019-06-11T00:00:00Z

Content type: opinion

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [coding](<https://devfeed.tech/topics/coding.md>), [Software](<https://devfeed.tech/topics/software.md>)

Tags: [software](<https://devfeed.tech/tags/software.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

The author argues that true programming ability is broader than proficiency in a programming language. It is the ability to understand people using different language and thought systems, clearly define complex problems, and describe ways to solve them in a formal program.

### Source excerpt

四年前在知乎提过一个问题，「什么是真正的编程能力」，当时这个问题获得了许多业内前辈的热诚回答。时过境迁，前段时间和朋友谈起最初使用知乎的经历，这才又想起当年年少无知提的这个问题，多年以后去一一回顾当时大家的回答，对每句话都有了更为深刻的理解和感触。

## 命令行里的设计艺术

DevFeed: [命令行里的设计艺术](<https://devfeed.tech/articles/article-41018.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/the-art-of-cli-design/>)

Author: Joway

Published: 2019-01-11T00:00:00Z

Content type: opinion

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Command-line interface](<https://devfeed.tech/topics/cli.md>), [interface](<https://devfeed.tech/topics/interface.md>), [Git](<https://devfeed.tech/topics/git.md>), [kubectl](<https://devfeed.tech/topics/kubectl.md>), [MySQL](<https://devfeed.tech/topics/mysql.md>), [Redis](<https://devfeed.tech/topics/redis.md>)

Tags: [cli](<https://devfeed.tech/tags/cli.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [git](<https://devfeed.tech/tags/git.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kubectl](<https://devfeed.tech/tags/kubectl.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [redis](<https://devfeed.tech/tags/redis.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

This Chinese-language opinion article presents personal observations on command-line interface design. It argues that CLI tools should follow established conventions, use consistent command structures, prioritize user understanding over implementation details, prefer explicitness over ambiguous abbreviations, and put safety first for irreversible operations.

### Source excerpt

在谈论手机 App 或是网页时，我们总会谈到交互设计，但倘若涉及到面向专业用户的 CLI(Command-line interface)领域，很少有人会将它与用户交互相联系。甚至在很多人的大脑里，已经把 CLI 和「难用」画上了等号，更有甚者认为 CLI 的难用才体现了其 「专业性」。 与此同时，「RTFM」(Read The Fucking Manual) 作为一个梗在工程师群体广泛流传，也让许多作者对于其不好用的 CLI 有了一个天然的借口。

## Building a Matching Assistant for Couple Avatars with pHash and Elasticsearch

DevFeed: [Building a Matching Assistant for Couple Avatars with pHash and Elasticsearch](<https://devfeed.tech/articles/article-40969.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/avatar-matcher/>)

Author: Joway

Published: 2018-09-27T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [hash](<https://devfeed.tech/topics/hash.md>), [elasticsearch](<https://devfeed.tech/topics/elasticsearch.md>)

Tags: [elasticsearch](<https://devfeed.tech/tags/elasticsearch.md>), [hash](<https://devfeed.tech/tags/hash.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

The article describes building a couple-avatar matching assistant. It uses pHash to create image fingerprints that remain relatively similar after resizing or small edits, compares fingerprints by Hamming distance, and stores and searches them with Elasticsearch and an Elasticsearch Hamming plugin. The author also discusses collecting avatar pairs from online communities and presenting the tool as a community bot.

### Source excerpt

背景 情头(情侣头像)一般指成双成对的头像，可以是真人照片，也可以是卡通人物等图片。衍生出去还有闺密头像和基友头像等等。 社交媒体上有一个非常令人费解的现象是，如果你去即刻、豆瓣、百度贴吧、微博，会发现有大量的人在上面贴了一个头像，然后寻找和它匹配的另一半头像，例如这样: 市面上的情侣头像大多是一些社区里的大佬自己制作出来的，然后发到社区里，再慢慢流传开来。这种传播方式导致了很多情头在传播时候早就被拆散了。很多人可能只找到了其中一个，但是想要找到和它配对的另一半。 还有一个问题是，当你看到一个头像时，没有人能够确定这个头像是否在制作时候就有另外一半。 一些程序员朋友最早看到这个问题时，总会天真地想去搜索引擎里识图一下就行了。但这里有两个非常有趣的问题: 第一个是目前搜索引擎的识别图片能力其实并不强，比如以 All in AI 著称的百度: 这还是在图片是原图的情况下，经常一些小朋友会在情头上自己二次创作，比如裁剪，比如压缩，比如贴上什么爱心。那样基本上识图就废了。 第二个问题更加有趣，情头的特点就是大家都在用，所以在最理想的情况下，即便搜索引擎能够识别出所有有这个头像的网站，出来的结果也并没有什么用处，无非是找到了也在用这个头像的别的网站的用户。 只有一种情况是真正能够帮助到寻找情侣头像这件事情的，那就是搜索引擎出来的结果里是专门搜集匹配好的情头的站点。那样姑且用户还能点进网页里去找到另外一半。 从上述阐述里不难发现，指望一个未成年小女生使用一系列高级互联网骚操作找一个头像是有多么不现实，何况技术上可行性还很低。

## 即刻多端实时通信实践

DevFeed: [即刻多端实时通信实践](<https://devfeed.tech/articles/article-41012.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/socket-io/>)

Author: Joway

Published: 2018-09-18T00:00:00Z

Content type: article

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Socket.IO](<https://devfeed.tech/topics/socket-io.md>), [WebSocket](<https://devfeed.tech/topics/websocket.md>), [Redis](<https://devfeed.tech/topics/redis.md>), [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Publish-subscribe pattern](<https://devfeed.tech/topics/pubsub.md>)

Tags: [backend](<https://devfeed.tech/tags/backend.md>), [channel](<https://devfeed.tech/tags/channel.md>), [clients](<https://devfeed.tech/tags/clients.md>), [cluster](<https://devfeed.tech/tags/cluster.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [nodejs](<https://devfeed.tech/tags/nodejs.md>), [redis](<https://devfeed.tech/tags/redis.md>), [room](<https://devfeed.tech/tags/room.md>), [socket](<https://devfeed.tech/tags/socket.md>), [tech](<https://devfeed.tech/tags/tech.md>), [websocket](<https://devfeed.tech/tags/websocket.md>)

### AI overview

This Chinese technical article explains how Jike's jike-io real-time communication infrastructure is built with socket.io. It describes server-to-client WebSocket notifications, per-user rooms, HTTP requests for business operations, socket.io's fallback and reconnection behavior, and Redis-based distribution across nodes, including sticky load balancing and the associated message-broadcast overhead. It also discusses connection spikes and Node.js bottlenecks.

### Source excerpt

背景 jike-io 是即刻基于 socket.io 构建的一个实时通信基础设施。目前客户端上的所有实时通信服务都是建立在其基础上，涵盖了私信、消息通知、用户反馈、活动页小游戏等诸多组件。 在目前即刻的实时通信设计里，我们的实时通信只是为了让服务端主动推送消息给客户端，客户端不会主动通过 websocket 发送消息。由于几乎我们所有需要发送消息的请求都会有一定业务逻辑在，而这个业务逻辑我们并不希望 websocket 连接层(jike-io)去处理，所以我们仍旧采用传统 HTTP 请求的方式去发送请求。至于之后是否需要推送消息给用户，由服务端调用 jike-io 的接口进行实现。

## 使用 Surge 提升多网络环境下的流畅开发体验

DevFeed: [使用 Surge 提升多网络环境下的流畅开发体验](<https://devfeed.tech/articles/surge-41017.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/surge-network/>)

Author: Joway

Published: 2018-07-03T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Virtual Private Network](<https://devfeed.tech/topics/vpn.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [MongoDB](<https://devfeed.tech/topics/mongodb.md>), [Redis](<https://devfeed.tech/topics/redis.md>), [ssh](<https://devfeed.tech/topics/ssh.md>)

Tags: [k8s](<https://devfeed.tech/tags/k8s.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [redis](<https://devfeed.tech/tags/redis.md>), [ssh](<https://devfeed.tech/tags/ssh.md>), [tech](<https://devfeed.tech/tags/tech.md>), [vpn](<https://devfeed.tech/tags/vpn.md>)

### AI overview

This article describes how a backend engineer simplified access across multiple network environments by using Surge's proxy and routing rules. It explains earlier VPN and Shadowsocks-based approaches, then presents IP-CIDR and domain-based routing through a server inside a Kubernetes cluster, enabling access to internal services and TCP-based tools such as Git over SSH, MongoDB, and Redis.

### Source excerpt

作为一名后端工程师经常需要在各种网络环境中切换，由于网络拓扑本身的复杂性以及一些网络工具之间的冲突和bug，常常会在切换中造成不必要的麻烦和痛苦。通常很容易在工作中听到同事会问这些问题 : 你有开 vpn 吗 ? 你开了 ss 了吗 ? 你有同时开 ss 和 vpn 吗 ? 你 http 代理是不是被顶掉了 ? 如果同是技术同事间交流那可能还容易，如果是技术和非技术间交流网络情况，那简直是一个灾难。

## An Overview of the TeX and LaTeX Ecosystem

DevFeed: [An Overview of the TeX and LaTeX Ecosystem](<https://devfeed.tech/articles/latex-40996.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/latex/>)

Author: Joway

Published: 2018-05-13T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [LaTeX](<https://devfeed.tech/topics/latex.md>), [TeX](<https://devfeed.tech/topics/tex.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [latex](<https://devfeed.tech/tags/latex.md>), [programming](<https://devfeed.tech/tags/programming.md>), [tech](<https://devfeed.tech/tags/tech.md>)

### AI overview

An overview of the TeX typesetting system and the roles of TeX engines, LaTeX macro collections, packages, and Chinese-language support.

### Source excerpt

最近在使用 LaTeX 写作，发现虽然这个「软件」使用简单，设计简约，但使用起来却并不是非常的容易，加上其生态非常芜杂，各种宏包和发行版层出不穷，中文世界鲜有文章系统地去讲他们之间的关系。这篇文章不会去介绍其基本用法，而是以一个更为宏观的角度，旨在厘清 TeX 排版系统的来龙去脉，以及其生态圈中各个项目的作用与关系。或有纰漏，还望雅正。

## Kafka 的设计与实践思考

DevFeed: [Kafka 的设计与实践思考](<https://devfeed.tech/articles/kafka-40994.md>)

Original publisher: [Read original article](<https://blog.joway.io/posts/kafka-design-practice/>)

Author: Joway

Published: 2018-04-16T00:00:00Z

Content type: tutorial

Language: zh

Sources: [Random Thoughts](<https://devfeed.tech/sources/random-thoughts.md>)

Topics: [Kafka](<https://devfeed.tech/topics/kafka.md>), [Replication](<https://devfeed.tech/topics/replication.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [broker](<https://devfeed.tech/tags/broker.md>), [data](<https://devfeed.tech/tags/data.md>), [file](<https://devfeed.tech/tags/file.md>), [index](<https://devfeed.tech/tags/index.md>), [kafka](<https://devfeed.tech/tags/kafka.md>), [leader](<https://devfeed.tech/tags/leader.md>), [partition](<https://devfeed.tech/tags/partition.md>), [replication](<https://devfeed.tech/tags/replication.md>), [sync](<https://devfeed.tech/tags/sync.md>), [tech](<https://devfeed.tech/tags/tech.md>), [zookeeper](<https://devfeed.tech/tags/zookeeper.md>)

### AI overview

A Chinese-language technical article presents a personal summary of Kafka's architecture, internal components, storage design, and APIs. It explains the roles of ZooKeeper, brokers, partitions, replication, leaders, ISR, offsets, segments, sparse indexes, and message access.

### Source excerpt

前几天看了 librdkafka 的官方文档，这篇文档不仅仅讲解了如何使用 Kafka ，某种程度也讲解了分布式系统实现的难点和使用细节，故而让我对 Kafka 的实现原理产生了浓厚的兴趣。 这篇文章从 Kafka 的设计到使用做了一些个人总结，围绕真正实践场景，探寻其设计上的智慧与妥协。 设计 架构设计 Zookeeper Zookeeper 存储了 Kafka 集群状态信息 。 Zookeeper 还负责从 Broker 中选举出一个机器作为 Controller, 并确保其唯一性。 同时, 当 Controller 宕机时, 再选举一个新的 。

[Next page](<https://devfeed.tech/sources/random-thoughts.md?cursor=WyIyMDE4LTA0LTE2VDAwOjAwOjAwKzAwOjAwIiwgImIyMmM0NTNiLWM3ZGItNGNhOC04ZWRlLTE1ZDdjZjE4M2ExOSJd>)