Zhangwen's Technical Blog

website·Indexed 31 days ago

https://zhangwen.site

A technical blog focusing on AI coding workflows, Agent-first software engineering, and mobile development. Content includes deep dives into Flutter, Swift, SwiftUI, and XCTest, as well as curated weekly reading lists covering C++, Rust, and Next.js.

Tokens
176.9K
Snippets
519
Records
1.2K
Agent score
52%

What's inside Zhangwen

  1. Overview of new Swift macros in Xcode 15

    Xcode 15 introduces several powerful built-in macros, though they are generally limited to iOS 17+ (no backward compatibility):

    • @Observable: Simplifies state management by replacing the need for multiple @Published variables.
    • #Predicate: Provides type-checked queries, replacing the need for NSPredicate strings.
    • @Model: Used for SwiftData (the Swift-native version of CoreData).
  2. Overview of watch_it state management

    watch_it is a lightweight state management tool for Flutter designed for small to medium-sized projects. It leverages get_it as a service locator to register state objects and uses the observer pattern to automatically bind data changes to UI rebuilds. It aims to reduce boilerplate code compared to Provider or Bloc while maintaining better performance than basic setState in deep widget trees.
  3. Overview of FreeSWITCH as a SIP Solution

    FreeSWITCH is an open-source telephony switching platform (softswitch) that supports multiple protocols including SIP signaling, H323, WebRTC, and RTMP. It is designed as a finite state machine to ensure stability and scalability. It is commonly used to implement PBX (Private Branch Exchange) functionality and can act as a B2BUA (Back-to-Back User Agent) or be configured to perform proxy and redirect server functions.
  4. Overview of Linux Kernel Memory Compaction

    Memory compaction is a heavy-duty memory fragmentation optimization measure. The Linux kernel employs four primary scenarios for compaction: direct compaction, kcompactd compaction, proactive compaction, and active compaction. These occur during memory allocation and reclamation contexts.

    Control and Logic:

    • Control: The compact_control structure parameters manage compact_zone behavior, including scanning range, page migration capabilities, suitability of pages for compaction, and whether the process can block.
    • Core Mechanism: The process relies on the interaction between the migrate scanner (which identifies pages that can be moved) and the free scanner (which identifies available free pages).
  5. Overview of Claude Code Technical Stack

    Claude Code is a large-scale TypeScript project developed by Anthropic as a CLI tool for software engineering. Its technical stack consists of:

    • Runtime: Bun
    • Language: TypeScript (strict mode)
    • Terminal UI: React + Ink
    • Scale: Approximately 1,900 files and over 512,000 lines of code.
  6. Overview of Session Initiation Protocol (SIP)

    SIP (Session Initiation Protocol) is a text-based signaling protocol used for initiating, modifying, and terminating interactive multimedia sessions. It is defined by the IETF, with the primary current standard being RFC 3261. Because it is text-based, it is similar to HTTP and SMTP, making it relatively easy to read and debug.
  7. Overview of the Compound Engineering framework for AI Agents

    Compound Engineering is a conceptual framework designed to solve the problem of long-term inconsistency in AI-assisted coding (where LLMs lack long-term memory and repeat mistakes). It moves the focus from 'single-generation' outputs to a system that evolves through four layers of maturity:

    1. Prompt Engineering: Optimizing the immediate input (roles, few-shot examples, CoT) for a single turn. Focuses on 'how to express'.
    2. Context Engineering: Providing the model with external knowledge via RAG, memory (short-term session and long-term project rules), and tooling. Focuses on 'what the model knows'.
    3. Harness Engineering (Workflow Engineering): Implementing structured workflows with specialized agents (e.g., Planner $\rightarrow$ Executor $\rightarrow$ Reviewer) and integrating CI/CD tools (lint, git, tests). Focuses on 'how the model acts'.
    4. Compound Engineering: Creating a feedback loop where the system absorbs experience from completed tasks and reviews, updating system rules to prevent future regressions. Focuses on 'how the system accumulates experience'.
  8. Overview of HarmonyOS ArkUI and eTS

    HarmonyOS 3.0 Beta introduced ArkUI, which expands beyond traditional Java UI and JS UI (HTML/CSS/JS). ArkUI introduces eTS, a declarative development paradigm based on TypeScript, designed to provide a minimalist and efficient way to describe UI interfaces.
  9. Overview of Jev as a Software Intelligence Primitive

    Jev is a 'System One' model designed for fast, intuitive semantic judgments rather than long-form generation or complex multi-step reasoning. It is 'Machine Native,' meaning its outputs are designed to be consumed directly by software to trigger business logic. It is particularly suited for 'Single-hop' tasks—problems where a judgment can be made immediately after reading the input without intermediate reasoning steps.
  10. Overview of PocketFlow's Core Architecture

    PocketFlow is a minimalist LLM framework designed as a 'minimal explainable framework' rather than a feature-heavy platform. Its core architecture is based on a Graph + Shared Store model, which allows developers to implement various design patterns (Workflow, Agent, RAG, Map Reduce, Multi-Agent) using a consistent underlying structure. The architecture consists of three primary components:

    • Node: Responsible for executing a single task.
    • Flow: Manages the transitions and jumps between nodes.
    • Shared Store: Handles data sharing and state management across different nodes.
  11. Overview of Lynx cross-platform framework

    Lynx is a cross-platform UI framework developed by ByteDance (used in TikTok) that enables developers to create native applications for Android, iOS, and Web using a familiar Web technology stack: JavaScript, React, and CSS. Its primary goal is to provide native-like performance while maintaining a Web-like development experience.
  12. Overview of Jetpack Compose for Modern Android Development

    Jetpack Compose is Google's current official UI technology route for Modern Android Development. Unlike traditional Android XML layouts, Compose uses a purely code-based approach to define UI. While powerful, it requires a shift in mindset from XML and may contain implementation hurdles when integrated into existing legacy projects.