Published onApril 16, 2026AI Code Is Self-Driving?AIAutonomous driving looks cool — but you wouldn't really want to close your eyes and ride along. Vibe coding is different. It looks cool too, and if things go si…
Published onApril 3, 2026Running Claude Code from My iPhone Using Tailscale + SSHClaude CodeTailscaleSSHRunning Claude Code from My iPhone Using Tailscale + SSH If you want to use Claude Code on your Mac from your phone, you really only need one thing: Tailscale +…
Published onApril 2, 2026Why I Still Write Technical Blogs Even in the Age of AIAIBlogLately, I’ve been thinking about something: With AI, almost any technical question can get a decent answer in seconds. So why would I still spend time writing…
Published onMarch 23, 2026Why AI-assisted coding favors DDD-style architectureAIOne thing I have always disliked in my career as a developer is reading other people's code -- especially when a unfamiliar codebase lands on my desk. If there …
Published onApril 10, 2023Install an old brew package versionBlog1. Create a local "tap" - which I assume is something like a local brew repository 2. Extract the desired version of the package into this local tap 3. Install …
Published onJune 24, 2019Simple V2Ray DeploymentBlogAbout V2Ray Project V is a set of tools that can help you build your own dedicated base communication network. The core tool of Project V is called V2Ray, which…
Published onJuly 10, 2018iOS copy SummaryiOScopy and mutableCopy Conclusions first, then code. - copy: For a mutable object, calling returns a new immutable object, while the retain count of the original…
Published onJune 7, 2018A Concise Guide to iOS LocalizationiOSOverview iOS localization mainly involves the following areas: 1. Localization of properties in InfoPlist. 2. Storyboard/xib localization. 3. String localizatio…
Published onMarch 6, 2018Notifications and userInfo with Swift 3.0iOSOriginal article: http://dev.iachieved.it/iachievedit/notifications-and-userinfo-with-swift-3-0/ Original author: Joe <!--Body starts here-- Notifications and u…
Published onMarch 5, 2018Apple's Deep Learning Frameworks: BNNS vs. MPSCNNiOSOriginal article: http://machinethink.net/blog/apple-deep-learning-bnns-versus-metal-cnn/ Original author: MATTHIJS HOLLEMANS <!--Body starts here-- Apple's Dee…
Published onFebruary 9, 2018Proof of Stake FAQBlockchainThe Traditional Chinese translation of the ethereum wiki is not very readable — I might as well read the original English and translate it myself. Original arti…
Published onFebruary 5, 2018go-ethereum Source Code Walkthrough (Part 1)BlockchainClone the source code from the project repository. Directory Structure accounts Implements a high-level Ethereum account management system bmt …
Published onFebruary 2, 2018Setting Up a Private Ethereum Network with GethBlockchainGeth Geth is a concrete implementation of the Ethereum protocol. Through Geth, you can implement various Ethereum features, such as creating, editing, and delet…
Published onFebruary 1, 2018Blockchain Project ResourcesBlockchainbitcoin - repository - white paper ethereum - repository - white paper eos - repository - white paper
Published onFebruary 1, 2018The Complete Guide to Bypassing Internet CensorshipBlogIn order to better study socialist core values and achieve the great rejuvenation of the Chinese nation's dream, various skills for bypassing internet censorshi…
Published onJanuary 31, 2018Notes on the Sidechain (Pegged Sidechains) White PaperBlockchainIntroduction Discussion of Bitcoin's Limitations 1. Trade-offs between scalability and decentralization. For example, larger blocks can support higher trans…
Published onJanuary 30, 2018Introduction to EthereumBlockchainWhat is Ethereum? Ethereum is a platform that uses blockchain technology to build decentralized applications (Dapps). Rather than giving users a set of predefin…
Published onJanuary 29, 2018Blockchain 101BlockchainA Blockchain 101 for beginners. A VPN may be required to access the videos. Part one explains blockchain and the append-only ledger concept through video and in…
Published onJanuary 26, 2018Mastering Bitcoin (Second Edition)BlockchainFor easy reference, I have compiled the Chinese translation of Mastering Bitcoin. Non-technical content has been omitted. Links in parentheses point to the corr…
Published onJanuary 24, 2018Blockchain Study Notes (4) — Storing and Using BitcoinBlockchainThese are notes from the Coursera course Bitcoin and Cryptocurrency Technologies. 4.1 Simple Local Storage To spend a Bitcoin, you need some public information …
Published onJanuary 22, 2018Blockchain Study Notes (3) — How Bitcoin Works Under the HoodBlockchainThese are notes from the Coursera course Bitcoin and Cryptocurrency Technologies. Bitcoin's consensus mechanism guarantees: - An append-only ledger. - A decentr…
Published onJanuary 20, 2018Blockchain Study Notes (2) — How Bitcoin Achieves DecentralizationBlockchainThese are notes from the Coursera course Bitcoin and Cryptocurrency Technologies. 2.1 Centralization vs. Decentralization Decentralization does not mean "nothin…
Published onJanuary 19, 2018Blockchain Study Notes (1) — Introduction to CryptocurrencyBlockchainThese are notes from the Coursera course Bitcoin and Cryptocurrency Technologies. 1.1 Cryptographic Hash Functions Three General Properties of Hash Functions: -…
Published onJanuary 5, 2018Some Updates for Jekyll + GitHub PagesBlogGitHub Warning When viewing the blog repository, GitHub showed a warning — clearly indicating that a dependency needed updating: So I ran the updates: Installa…
Published onJanuary 3, 2018Overriding the Delegate Property of UIScrollView Like UICollectionView DoesiOShas a delegate property typed as : overrides this property, but uses instead: However, when you try to override the delegate with a custom protocol in the sa…
Published onDecember 30, 2017Scrapy Proxy GuidePythonAs mentioned before, using dynamic proxies is an effective way to prevent your scraper from getting banned. But when you actually dig into it, you'll run into q…
Published onDecember 30, 2017Scrapy and TorPythonHard to categorize, so it ended up under "Programming Concepts" — you know how it is. Integrating Scrapy with Tor is yet another rabbit hole. Installation Tor (…
Published onDecember 29, 2017Scrapy Anti-Ban GuidePythonMost websites employ varying degrees of anti-scraping mechanisms. To collect more data, you need to adopt corresponding countermeasures. Disable ROBOTSTXTOBEY I…
Published onDecember 29, 2017Scrapy Debugging TipsPythonThis post covers the most common techniques for debugging spiders. Consider the following code: This is a spider that crawls two pages. It also crawls a detail …
Published onDecember 27, 2017Podfile Syntax ReferenceiOSPodfile A Podfile describes the dependencies of one or more Xcode project targets. A Podfile can be very simple: Or more complex: Global Settings Global configu…
Published onDecember 26, 2017Using Stored Properties in Swift ExtensionsiOSThe main limitation of Swift Extensions is that stored properties cannot be added directly. However, there are alternative approaches to achieve this. Backgroun…
Published onDecember 25, 2017SwiftFormat Usage GuideiOSTable of Contents - What is SwiftFormat? - Why would I want to use SwiftFormat? - Usage Guide - Command Line Tool - Xcode Source Editor Extension - …
Published onDecember 15, 2017Scrapy TutorialPythonIntroduction This post uses Scrapy to build a sample web scraper. Installation of Scrapy is omitted here — installing via pip is straightforward. Creating a Pro…
Published onDecember 14, 2017Scrapy Architecture OverviewPythonIntroduction When it comes to Python practice projects, web scraping is probably the most popular choice. Libraries like Requests and BeautifulSoup feel a bit l…
Published onDecember 6, 2017First Experience with Core MLiOSCore ML lets you integrate a broad variety of machine learning model types into your app. In addition to supporting extensive deep learning with over 30 layer t…
Published onDecember 5, 2017ARKit (Part 2) — Core Classes OverviewiOSCore Classes Overview ARAnchor ARAnchor represents the position and orientation of an object in 3D space. It is commonly referred to as a 3D anchor point for an…
Published onDecember 4, 2017ARKit (Part 1) — First ExperienceiOSIntroduction to ARKit Augmented Reality (AR) is a technology that computes the position and orientation of a camera in real time and overlays corresponding imag…
Published onNovember 15, 2017Building a NetworkExtension App (Part 2)iOSIntroduction In the previous post I covered some background knowledge on circumventing the GFW. This post will first introduce NetworkExtension and related open…
Published onNovember 13, 2017Building a NetworkExtension App (Part 1)iOSIntroduction My technical skills are fairly limited, and most of the time I rely on Google to solve the programming problems I encounter. After the National Day…
Published onOctober 20, 2017React Native Hot Updates and CodePush in PracticeReact NativeIntroduction It has been a long time since my last update. In the meantime, I did some translation work for the SwiftGG team — feel free to check it out here. O…
Published onFebruary 17, 2017Header Files in CocoaPodsiOSI previously wrote about how to create a custom CocoaPods repository. Now I've run into a new problem: how do you prevent users from importing header files they…
Published onJanuary 19, 2017Integrating React Native into an Existing ProjectReact NativeIntroduction Does using React Native mean you have to rewrite your entire project from scratch? There are plenty of tutorials out there, but very few explain ho…
Published onJanuary 9, 2017My First React Native PitfallReact NativeIntroduction Hard to believe it's already 2017 the next time I sit down to write something. The Problem I started looking into React Native, and the HelloWorld …
Published onSeptember 23, 2016Creating Your Own CocoaPods PodiOSIntroduction This is probably the last post before the next intermission. The project needed an image picker control, so I found a Swift project, spent two days…
Published onSeptember 20, 2016Design Patterns in iOS — AdapteriOSAdapter Pattern Adapter Pattern: Converts the interface of a class into another interface that clients expect. The Adapter pattern lets classes work together th…
Published onSeptember 19, 2016Design Patterns in iOS — SingletoniOSSingleton Pattern Singleton Pattern: Ensures a class has only one instance and provides a global access point to it. The Singleton is probably the simplest form…
Published onSeptember 18, 2016Design Patterns in iOS — BuilderiOSBuilder Pattern Builder Pattern: Separates the construction of a complex object from its representation, so that the same construction process can create differ…
Published onSeptember 9, 2016Suppressing Noisy Log Output (NSLog)iOSIntroduction I was logging delegate method calls to observe the call order, only to find my console flooded with completely unrelated log messages. I couldn't …
Published onSeptember 9, 2016UIScrollView ReferenceiOSThis article covers only scrolling-related content. Key UIScrollView Properties - : Returns YES when the user has touched but has not yet started dragging. - : …
Published onSeptember 6, 2016Design Patterns in iOS — Factory PatterniOSThe Factory pattern comes in two main variants: the Simple Factory and the Abstract Factory. The Factory Method is a component of the Abstract Factory pattern. …
Published onSeptember 5, 2016Design Patterns in iOS — PrototypeiOSIntroduction I used to lead a small iOS team, spending my days dealing with endless inter-team friction while also serving as the lead developer writing code. I…
Published onSeptember 2, 2016GCD ReferenceiOSGCD A key concept in GCD is the queue. The core idea: break a long-running task into multiple units of work and add those units to a . The system manages these …
Published onSeptember 2, 2016Thread Safety in MultithreadingiOSThe Problem When multiple threads access the same object's data simultaneously, thread safety issues arise. For example: Solutions The most common solution to t…
Published onSeptember 1, 2016Using Zombie Objects to Aid DebuggingiOSIntroduction I'd heard of zombie objects before, but only had a vague understanding — something like memory that hasn't been referenced but also hasn't been ove…
Published onAugust 9, 2016Find Memory LeaksiOSIntroduction During a recent project upgrade, I used Instruments to investigate memory leaks. The results were quite revealing, so I'm documenting the process h…
Published onJuly 17, 2016CocoaPods and Xcode Plugin Issues After Upgrading to OS X 10.11iOSThe Situation I upgraded the MBPR at home to OS X 10.11, and a few apps stopped working. Software DRM in China is quite effective it seems — had to Google "XXX …
Published onJuly 11, 2016About NSDictionaryiOSIntroduction I came across this question in a conversation: when storing thousands of objects in a dictionary (NSDictionary in Objective-C), what could cause pe…
Published onJuly 5, 2016JSPatchiOSBackground JSPatch is becoming increasingly widespread. Let me document the integration and usage process. Since the company hasn't set up a dedicated API for f…
Published onJuly 3, 2016Singleton Pattern in SwiftiOSA singleton object ensures that no matter how many times you create or retrieve an instance of a class, you always get the same object. Whether dealing with aud…
Published onJune 29, 2016Swift Usage TipsiOSBackground Today was a rough day. Keep moving forward. Back to mixed-language development. Don't think that just because you're familiar with OC and UIKit, skim…
Published onJune 27, 2016My Experience Upgrading to CocoaPods 1.0iOSBackground CocoaPods is a pretty solid dependency manager for third-party frameworks. The one painful part is how slow can be. Using offline mode () helps spee…
Published onJune 16, 2016Configuring Multiple Targets in an iOS ProjectiOSBackground First, a quick rant: the company has recently taken on several outsourced projects with similar functionality, and I've been grinding through them da…
Published onApril 29, 2016Could not find Developer Disk ImageiOSBackground I ran into the error while debugging on an iOS 9.3 device. I've encountered this problem every time after upgrading iOS, but never documented it. He…
Published onApril 16, 2016UITableView Quick ReferenceiOSProperties DataSource Methods Execution order: Calculate number of sections -Calculate rows per section -Generate section index -Generate cells (all cells in al…
Published onApril 8, 2016Installing Fabric, a Python-based Remote Connection ToolPythonBackground We suddenly had a large number of new projects coming in, and the Jenkins setup and deployment scripts I maintain needed significant changes — one of…
Published onApril 3, 2016A Summary of Useful Debugging Tips and TechniquesiOSBreakpoints Beyond the standard breakpoints, you can also set Exception Breakpoints and Symbolic Breakpoints. Use to jump to the breakpoint manager, then click…
Published onApril 1, 2016Using chisel with LLDBiOSInstallation Install Install Configuration After installation, copy the following line into your file. If the file doesn't exist, create it. Make sure to rep…
Published onApril 1, 2016UIView Properties: weak or strong?iOSI had always been using to qualify UIView properties in view controllers, but later noticed that some code does use for the same purpose. In fact, when I trie…
Published onMarch 31, 2016Loading Resources in iOSiOSIntroduction I recently encountered a scenario involving loading local resource files. Retrieving resources from the sandbox is fairly straightforward, but acce…
Published onMarch 27, 2016My Personal Collection of Code SnippetsiOSMy Code Snippet I have to admit I'm a fairly lazy person — I don't want to type the same code a third time, so I automate as much as possible. With that in mind…
Published onMarch 21, 2016ReactiveCocoa Operation MethodsiOSReactiveCocoa Operation Prerequisites All signals () can be processed with operation methods, because all operation methods are defined in . Any class that inhe…
Published onMarch 20, 2016ReactiveCocoa Usage and MacrosiOSCommon Usage As mentioned earlier, RAC can replace delegates, KVO, and more. Let's look at the specific usage. Replacing Delegates: - : Used to replace delegate…
Published onMarch 18, 2016Efficient Xcode Interface Shortcut TipsiOSIntroduction A colleague came over to review my code and sighed, "Your screen is completely taken up by navigation bars, toolbars, and the debug area — doesn't …
Published onMarch 10, 2016Deep Copy and Shallow Copy in iOSiOSWhether dealing with collection objects or non-collection objects, when they receive and messages, the following rules apply: - returns an object. Therefore…
Published onMarch 8, 2016Tips for Debugging JavaScript Under the JavaScriptCore FrameworkReact NativeSome features in native app development are well-suited for a Hybrid approach. I have long wanted to try , but since neither the front-end nor the Android team …
Published onMarch 2, 2016Common Pitfalls with Autolayout and MasonryiOSIntroduction I recently encountered a complex view hierarchy: a root controller containing two child controllers (top and bottom), each implementing a PageView-…
Published onFebruary 26, 2016Introduction to ReactiveCocoaiOSOverview of ReactiveCocoa ReactiveCocoa is inspired by functional reactive programming. Rather than using mutable variables which are replaced and modified in-p…
Published onFebruary 24, 2016Swift 4.0 Quick Reference Cheat SheetiOSIntroduction I've gone through Swift twice now, but the syntax still slips away, which means I haven't been practicing enough. To help myself get back into the …
Published onFebruary 12, 2016Updating the Markdown EngineBlogSwitching to the engine I received an email from saying that starting March 1st, only the engine would be supported, and code highlighting would need to swit…
Published onFebruary 1, 2016My Xcode PluginsiOSThe Spring Festival holiday is three days away and I can't focus on studying RAC, so I'll use this spare time to organize some notes. Here's a quick rundown of …
Published onJanuary 30, 2016Functional Programming: Principles and a Simple ImplementationiOSIntroduction Functional programming philosophy: write operations as a series of nested function or method calls whenever possible. Characteristics of functional…
Published onJanuary 28, 2016Reactive Programming: Principles and a Simple KVO ImplementationiOSIntroduction In reactive programming, you don't need to think about the order of operations — you only need to care about the result. It's like the butterfly ef…
Published onJanuary 26, 2016Chainable Programming: Principles and a Simple ImplementationiOSIntroduction I have been using Masonry for a while and became quite interested in its chainable programming style, so I took some time to look at how it is impl…
Published onJanuary 20, 2016Block Memory Allocation in iOSiOSIntroduction I originally intended to write a quick summary of Block memory management, but the topic turned out to be a much deeper rabbit hole than expected. …
Published onJanuary 15, 2016iOS Memory ManagementiOSIntroduction Recently I revisited C language memory mechanisms and deepened my understanding of the four-segment memory model. Looking back at iOS memory manage…
Published onNovember 16, 2015Objective-C Runtime — Method SwizzlingiOSis a technique for changing the actual implementation of a selector at runtime. Using this technique, we can modify the implementation of a method by changing t…
Published onNovember 13, 2015Objective-C Runtime in Practice 2iOSDictionary to Model Output: Associated Objects Let's jump straight to the code: Output: Code All code from this article can be found on my GitHub .
Published onNovember 8, 2015Objective-C Runtime — Methods and MessagesiOSBasic Data Types SEL , also called a selector, is a pointer representing a method's selector, defined as: The detailed definition of the struct is not found in…
Published onNovember 5, 2015Objective-C Runtime in PracticeiOSClass and Object Operation Functions Class Operation Functions The methods that provides for operating on classes are mostly targeted at the various fields of …
Published onNovember 4, 2015Objective-C Runtime — Handling Member Variables and PropertiesiOSType Encoding As a supplement to the Runtime, the compiler encodes the return type and parameter types of each method into a string and associates it with the m…
Published onNovember 2, 2015The Principles of Objective-C RuntimeiOSIntroduction : refers to the state of a program while it is running (or being executed). In other words, when you open a program and it runs on your computer, t…
Published onOctober 17, 2015The isa Pointer in Objective-CiOSIntroduction In , is the root class for most classes. It has an property of type . What is ? And what is ? isa The definition of in : is a pointer to an st…
Published onOctober 10, 2015JavaScriptCore Framework in PracticeReact NativeThe following interaction approach was used to achieve a unified interface with Android. Background: Those familiar with Android's will know that in Android yo…
Published onSeptember 20, 2015JavaScriptCore Framework — JSExport and Memory ManagementReact NativeJavaScript can define objects entirely with JSON without any prototype-based inheritance, but Objective-C code can't exist without classes and inheritance. That…
Published onSeptember 15, 2015Getting Started with the JavaScriptCore FrameworkReact NativeIntroduction My recent project involves Hybrid development, requiring interaction between JavaScript and Objective-C code. Since the JS interface was already in…
Published onDecember 15, 2014A Quick Reference for Jekyll SyntaxBlogIntroduction If you just want to quickly set up a static site and don't have time to study syntax right now, I recommend directly forking my repository. For t…
Published onFebruary 12, 2014Building a Personal Blog with Jekyll + GitHub PagesBlogDuring the Spring Festival holiday I had nothing to do, and on a whim I signed up for a domain. After cooling down, I figured since I'd already paid for it, I …