Building an Image Captioning Transformer from Scratch

After building a text-only transformer for name generation, I wanted to tackle something more ambitious: teaching a model to describe images. This post documents my journey building a minimal image captioning transformer that learns to generate captions like “a dog runs through the snow” from raw pixels. Try the live demo! - The model runs entirely in your browser using ONNX Runtime Web. The Architecture: Encoder-Decoder with Cross-Attention Unlike the decoder-only transformer from my previous experiment, image captioning requires an encoder-decoder architecture. The key insight is that we need to process two different modalities (images and text) and connect them through cross-attention. The architecture has two parallel paths: Image Path (Blue): The image goes through patch embedding, then encoder self-attention layers. This produces “image features” — a sequence of patch embeddings that understand spatial relationships. Text Path (Green): The caption tokens go through token embedding, then decoder layers with both self-attention (causal) and cross-attention to the image features. The Bridge (Purple): Cross-attention is where the magic happens. It allows each text token to “look at” all image patches and gather relevant visual information. From Pixels to Patches: The Vision Encoder The first challenge is converting an image into something a transformer can process. Transformers work on sequences, but images are 2D grids. The solution: split the image into patches. 128x128 image → 16x16 grid of 8x8 patches → 256 patch embeddings Each 8x8 patch contains 64 pixels × 3 colors = 192 values. A linear layer projects this to 128 dimensions: class PatchEmbedding(nn.Module): def __init__(self, image_size, patch_size, n_embd): patch_dim = 3 * patch_size * patch_size # 192 self.proj = nn.Linear(patch_dim, n_embd) # 192 → 128 self.pos_embd = nn.Parameter(torch.randn(1, n_patches, n_embd)) def forward(self, x): # Split image into patches, flatten, project patches = extract_patches(x) # (B, 256, 192) return self.proj(patches) + self.pos_embd # (B, 256, 128) Now we have 256 “patch tokens” that can go through self-attention, just like text tokens. The encoder self-attention lets patches learn about each other — a patch showing a dog’s head can attend to patches showing its body and legs, building a coherent understanding of “dog”. Cross-Attention: The Bridge Between Vision and Language This is the key difference from text-only transformers. In self-attention, Q, K, and V all come from the same source. In cross-attention: Q (Query) comes from the text decoder: “What visual information do I need?” K, V (Key, Value) come from the image encoder: “Here’s what each patch contains” class CrossAttention: def forward(self, text_embeddings, image_features): Q = text_embeddings @ W_q # What am I looking for? K = image_features @ W_k # What does each patch contain? V = image_features @ W_v # What info to retrieve? scores = Q @ K.T # (text_len, num_patches) weights = softmax(scores) return weights @ V # Weighted sum of patch info When generating the word “running”, the model learns to attend heavily to patches showing legs in motion. When generating “snow”, it attends to the white ground patches. Training on Flickr8k I used the Flickr8k dataset: 8,000 images with 5 human-written captions each. A key insight was using random caption sampling — each epoch, randomly select one of the 5 captions per image. This acts as data augmentation and dramatically reduces overfitting. Configuration Train Loss Val Loss Notes 64x64, fixed caption 0.78 1.10 Baseline 128x128, fixed caption 0.58 1.38 More detail, more overfitting 128x128, random caption 0.90 0.99 Much better generalization! The random caption sampling closed the train-val gap from 0.80 to just 0.09. Results: What the Model Learned After 30 epochs of training (~17 minutes on M4 Mac), the model generates reasonable captions: Success case: Generated: "a black dog is running through the grass ." Actual: "A black dog running across green grass ." Failure case: Generated: "a man in a blue shirt is standing in the stree" Actual: "A crowd of people are enjoying a meal with a view of a mountaintop ." The model handles simple scenes well (dogs, people, basic actions) but struggles with complex scenes (crowds, multiple objects, subtle context). Model Statistics Total parameters: ~980,000 (about 1M) Breakdown: - Patch embedding: 32,896 (3%) - Encoder blocks (2): 395,776 (40%) - Token embedding: 8,960 (1%) - Position embedding: 6,144 (1%) - Decoder blocks (2): 527,616 (54%) - Output layer: 9,286 (1%) The decoder is larger than the encoder because each decoder block has both self-attention AND cross-attention. Key Learnings 1. Patches are the “tokenizer” for images Just as we split text into tokens, we split images into patches. This converts the 2D spatial structure into a sequence that transformers can process. The same weight matrix processes every patch, learning a universal “patch reader”. 2. Cross-attention is the bridge The key architectural difference from text-only transformers. It lets the text generation process “see” the image at every step, attending to relevant patches for each word being generated. 3. Data augmentation matters enormously Using all 5 captions with random sampling was more impactful than doubling the image resolution. The model learns semantic concepts rather than memorizing specific strings. 4. Resolution limits understanding At 128x128, a tricycle looks like a blob. The model can distinguish dogs from people, but struggles with fine details. Real vision models use 224x224 or higher. 5. This is still a toy model Production image captioning models use: Pretrained vision encoders (CLIP, ViT trained on millions of images) Word-level tokenization (shorter sequences) Much larger datasets (COCO has 330k images) Billions of parameters Improvement: Using Pretrained CLIP Encoder After training the from-scratch model, I wanted to see how much a pretrained vision encoder could help. I created a second version that uses CLIP ViT-B/32 as a frozen image encoder, training only the decoder and a projection layer. Architecture Changes Instead of learning patch embeddings from scratch: CLIP’s pretrained ViT processes the image (224x224 input) 50 patch embeddings (768-dim) are projected to the decoder dimension Only the decoder (~3.8M params) is trained; CLIP (~87M params) is frozen class CLIPCaptioningModel(nn.Module): def encode_image(self, img): # Use CLIP's visual transformer (frozen) with torch.no_grad(): x = clip_model.visual(img) # (B, 50, 768) return self.visual_proj(x) # Project to decoder dim Results Comparison Metric From-Scratch CLIP-based Val Loss 1.29 0.86 Train Loss 1.23 0.75 Epochs 30 20 Training Time ~17 min ~17 min Model Size 4 MB 363 MB The CLIP-based model achieves 33% lower validation loss with fewer epochs! Sample Captions For the same test image (two dogs in snow): Model Caption From-scratch “a black dog and a white dog are in the snow .” CLIP-based “two dogs playing in the snow .” Ground truth “a black dog is running after a white dog in the snow .” The CLIP-based model produces more natural, concise captions. It benefits from CLIP having been trained on 400 million image-text pairs — it already understands visual concepts like “dogs” and “playing” without needing to learn them from our small 8k image dataset. Testing on Complex Scenes I tested both models on the validation set, focusing on complex scenes that the from-scratch model struggled with: Scene From-Scratch CLIP-based Ground Truth Ice skating rink “a man in a blue shirt…” “a group of people standing in the snow .” “A group of people are ice skating in a big city .” Rock climbing “a woman is standing…” “a woman in a red shirt is climbing a rock .” “A kid rock climbing against the backdrop of a green valley” People at boats “a man is…” “a group of people standing in a rowd of a boat” “A group of people waiting to ride boats .” Mountain hikers “a man in…” “two people stand on the side of a mountain .” “Three people facing the mountains .” Key observations: Better at groups/crowds — CLIP recognizes “group of people” much better than the from-scratch model which defaults to “a man” Better semantic understanding — Recognizes concepts like “rock climbing”, “mountain”, “boat” that the small model misses entirely Still struggles with fine details — Exact counts (two vs three people), specific activities (ice skating vs standing) More robust to complex scenes — Doesn’t collapse to generic “man in blue shirt” for difficult images The pretrained visual features give CLIP a huge advantage on scenes requiring real-world knowledge. Tradeoff: Accuracy vs Size The improved model is 363MB (vs 4MB), making it impractical for browser deployment. This is the classic accuracy-size tradeoff: From-scratch model: Smaller, deployable, but less accurate CLIP-based model: More accurate, but requires a large pretrained encoder For production, you’d typically use the large model on a server, or apply techniques like knowledge distillation to compress it. Improvement: Word-Level Tokenization The character-level model processes “a black dog” as 11 tokens (including spaces). Word-level tokenization reduces this to just 3 tokens, making sequences shorter and potentially easier to learn. Parameter Count Changes Switching from character-level to word-level tokenization dramatically changes where the parameters live: Component Character-Level Word-Level Change Token embedding 8,960 (70 × 128) 570,240 (4453 × 128) +561K Position embedding 6,144 (48 × 128) 2,560 (20 × 128) -3.5K Output layer 8,960 570,240 +561K Total model ~980K ~2.1M +1.1M (2.2×) The vocabulary explodes from ~70 characters to ~4500 words, but sequences shrink from 48 characters to 20 words. The net effect: 2.2× more parameters, almost entirely in the embedding layers. Results Comparison Metric Character-Level Word-Level Val Loss 0.99 2.98 Train Loss 0.90 2.42 Vocab Size 70 4,453 Max Seq Length 48 20 Model Size 4 MB 8.2 MB Wait — the word-level loss is higher? This is actually expected: Loss is per-token: Character-level predicts from 70 options; word-level predicts from 4,453 options Different scales: A word-level loss of 2.98 means perplexity ~20 (choosing from 4453 words), while character loss 0.99 means perplexity ~2.7 (choosing from 70 chars) The captions are similar quality despite the different loss values Sample Caption For the same test image (two dogs in snow): Model Caption Character-level “a black dog and a white dog are in the snow .” Word-level “a dog is running through the snow .” Ground truth “a black dog is running after a white dog in the snow .” The word-level model produces fluent captions but with a smaller effective vocabulary (it saw each word fewer times during training than character-level saw each character). Key Insight: Vocabulary Size vs Training Data Word-level tokenization works better when you have lots of training data. With only 8k images: Character-level sees each character thousands of times → learns robust patterns Word-level sees many words only a few times → harder to learn good embeddings This is why production models use: Subword tokenization (BPE, WordPiece): Best of both worlds Much larger datasets: COCO (330k), Conceptual Captions (3M+) What’s Next Remaining improvements to explore: Pretrained vision encoder: Use CLIP or ViT instead of learning from scratch ✅ Done! Word-level tokenization: “a black dog” as 3 tokens instead of 11 characters ✅ Done! Subword tokenization: Use BPE for better vocab coverage More data: COCO dataset (330k images) instead of Flickr8k (8k) Knowledge distillation: Train a small model to mimic the CLIP-based one But even the minimal from-scratch implementation demonstrates the core concepts: patch embeddings, encoder-decoder architecture, and cross-attention as the bridge between vision and language. Code The complete training script is available in my learn-llm repository as train-image-caption.py.

2026/1/31
articleCard.readMore

Building a Language Transformer Step by Step

After months of reading about transformers and LLMs, I finally decided to build one from scratch. Not by copy-pasting code, but by incrementally adding each architectural component and measuring its impact. The result was a character-level name generator trained on 32,033 names, and the journey taught me more than any paper or tutorial could. Preparation: Standing on the Shoulders of Giants Before diving into code, I spent time building intuition through two excellent resources: “Build a Large Language Model (From Scratch)” by Sebastian Raschka was my theoretical foundation. The book walks through every component of a transformer with clear explanations and diagrams. Reading it gave me a mental model of how attention, embeddings, and layer normalization fit together — knowledge that proved essential when debugging my own implementation. Andrej Karpathy’s YouTube series (Neural Networks: Zero to Hero) was equally valuable. His “Let’s build GPT” video demystified the architecture by building it live on screen. Watching someone think through the design decisions — why we use residual connections, how attention matrices work, what LayerNorm actually does — made the concepts stick in a way that reading alone couldn’t. His makemore repository became the dataset and benchmark for my experiments. With this foundation, I was ready to build. The Experiment I incrementally built a character-level transformer for name generation. Each step adds one architectural improvement. All models were trained with batch size 32, AdamW optimizer, and per-name padding with masked loss. Results - Architecture Comparison (5,000 steps) Config N_EMBD Heads Layers Params Train Test baseline 32 1 1 2,908 2.35 2.35 double embd 64 1 1 8,860 2.34 2.34 2 heads 32 2 1 5,948 2.25 2.23 4 layers 32 2 4 18,332 2.00 2.04 + MLP 32 2 4 51,740 1.97 2.02 + LayerNorm 32 2 4 52,252 1.96 1.99 + RoPE 32 2 4 52,252 1.94 1.98 + GELU 32 2 4 52,252 1.94 1.94 Results - Scaling Up Config Steps Train Test Notes N_EMBD=32, 2 heads 5,000 1.94 1.94 Baseline final model N_EMBD=64, 4 heads 5,000 1.84 1.92 Matches makemore architecture N_EMBD=64, 4 heads + dropout 5,000 1.95 2.00 Dropout slows convergence N_EMBD=64, 4 heads + dropout 20,000 1.75 1.85 Longer training helps + LR schedule, weight decay, grad clip 20,000 1.72 1.86 Training improvements Makemore’s default transformer achieves ~1.92 test loss with N_EMBD=64, 4 heads, 4 layers. Generated Names Sample outputs from the final model (N_EMBD=64, 4 heads, 20k steps with all training improvements): kaelynn, aileigh, elyce, yadi, ovani, derella, nyailee, ranyah, niaa, sett Key Findings Depth beats width Doubling embedding size from 32 to 64 (3x params) gave almost no improvement (2.35 -> 2.34). Adding a second attention head with fewer total params (5,948 vs 8,860) dropped loss by 0.12. Stacking 4 layers was the single biggest improvement, dropping test loss from 2.23 to 2.04. The model benefits far more from multiple layers of processing than from wider representations at a single layer. Data handling matters most Before adding per-name padding, our best model achieved 2.36 test loss. After switching to per-name padding with masked loss (same architecture), it dropped to 1.94. This was a larger improvement than all architectural changes combined. The reason: without padding, the model wasted capacity trying to predict across name boundaries — an impossible task that added noise to every gradient update. MLP adds capacity but needs regularization Adding the feed-forward network (MLP) to each layer tripled the parameter count (18k -> 52k) but only modestly improved results. It also widened the train-test gap (2.00/2.04 -> 1.97/2.02), suggesting mild overfitting. The MLP lets the model transform representations nonlinearly after attention gathers information, but at this small scale the effect is limited. LayerNorm and RoPE help incrementally LayerNorm stabilized training and closed the train-test gap slightly. RoPE (Rotary Position Embeddings) gave the model awareness of character positions without adding any parameters. Neither was dramatic at this scale, but both are essential for larger models — LayerNorm enables training deep networks, and RoPE enables generalization to longer sequences. GELU vs ReLU is negligible at small scale Switching from ReLU to GELU activation in the MLP had no measurable effect. The smoother gradient flow matters more when networks are deeper and wider. Scaling up helps significantly Doubling N_EMBD to 64 and using 4 heads (matching makemore’s architecture) dropped test loss from 1.94 to 1.92 at 5k steps. With longer training (20k steps), the model reached 1.85 test loss — surpassing makemore’s default. Dropout trades speed for generalization Adding 20% dropout increased the train-test gap initially and slowed convergence. At 5k steps, it actually hurt test loss (1.92 -> 2.00). But it prevents overfitting during longer training runs, allowing the model to keep improving past where it would otherwise plateau. Training improvements compound Learning rate scheduling (warmup + cosine decay), weight decay (0.01), and gradient clipping (max_norm=1.0) together produced smoother training curves. The cosine decay prevents the learning rate from being too high in later steps when fine-tuning. Weight decay acts as regularization. Gradient clipping prevents instability from occasional large gradients. Architecture Summary The final model is a proper transformer decoder: Input tokens -> Token Embedding (28 vocab -> 64 dim) -> 4x Transformer Blocks: -> LayerNorm -> Multi-Head Attention (4 heads, RoPE, dropout) -> Residual -> LayerNorm -> MLP (64 -> 256 -> 64, GELU, dropout) -> Residual -> Linear (64 -> 28 vocab) -> Cross-entropy loss (masked on PAD tokens) Training config: 20,000 steps Batch size 32 AdamW optimizer with weight decay 0.01 Learning rate: warmup to 1e-3 over 200 steps, cosine decay to 1e-4 Gradient clipping: max_norm=1.0 Dropout: 0.2 What the Loss Means A loss of 1.86 means the model assigns ~15.6% probability on average to the correct next character (e^(-1.86)). Random guessing over 27 characters would give ~3.7% (loss = 3.30). Perfect prediction is impossible because many positions are genuinely ambiguous — after “ma”, the next character could be r, d, k, x, t, and many others. Progress through this project: Start: 2.35 test loss (~9.5% confidence) Final: 1.86 test loss (~15.6% confidence) Improvement: ~1.6x more confident on the correct character Conclusion Building a transformer incrementally taught me that the magic isn’t in any single component — it’s in how they work together. Data preprocessing had the biggest impact. Depth mattered more than width. And the “modern” improvements (LayerNorm, RoPE, GELU) are less about dramatic gains and more about enabling scale.

2026/1/29
articleCard.readMore

Reverse Engineering Guitar Pro 8's Locked Files

Have you ever worked on a Guitar Pro tab, saved it, and then realized you couldn’t edit it anymore because it was “locked”? Or perhaps you downloaded a tab that was perfect but needed just one small tweak, and the author had locked it? I recently went down a rabbit hole reverse-engineering this “protection” mechanism in Guitar Pro 8. What I found was a classic case of “security through obscurity” — and not very deep obscurity at that. The Problem Guitar Pro has a feature to “lock” a file. When locked, the file can be opened and played, but the editing features are disabled. If you peek inside the .gp file (which is just a ZIP archive), you’ll see a few interesting things: A file named editLocked. The main content Content/score.gpif is encrypted (it doesn’t have the standard XML header). Removing editLocked isn’t enough. The app sees it’s missing, but the content remains encrypted and unreadable. The Breakthrough As Guitar Pro can open and play the file without ever prompting for a password, it was clear that the key to decrypt the content must be available to the application without user input. This realization led me to investigate how the application handles these files internally. I analyzed the GuitarPro binary and its libraries, specifically libGPIO.dylib. 1. The Salt Deep in the binary, I found a reference to a static salt used in the encryption routine. da40cc64900b617a0f72ad4e6ef42f9c 2. The Password Tracing the assembly code for Score::setLockPwd, I found something surprising. The application reads the entire content of the editLocked file (which contains a salt and a hash of the user’s original password) and sets that string as the internal password for decryption. So, the “password” to decrypt audio and score data isn’t what you typed. It’s the metadata file itself. The Solution Putting it all together, the encryption scheme is: Algorithm: AES-256-CBC Key Derivation: PBKDF2-HMAC-SHA1 (4096 iterations) Password: The content of editLocked (e.g., salt$hash) Salt: The static binary salt (da40cc...) With this information, I wrote a Python script unlock_score.py that fully unlocks these files. The Script Here is the core logic of the unlocker: STATIC_SALT_HEX = "da40cc64900b617a0f72ad4e6ef42f9c" def decrypt_gpif(encrypted_data, password): salt = binascii.unhexlify(STATIC_SALT_HEX) # PBKDF2 with 4096 iterations key = hashlib.pbkdf2_hmac("sha1", password.encode(), salt, 4096, 32) iv = encrypted_data[:16] ciphertext = encrypted_data[16:] cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend=default_backend()) decryptor = cipher.decryptor() decrypted = decryptor.update(ciphertext) + decryptor.finalize() # Decompress zlib payload return zlib.decompress(decrypted) You can find the full tool on GitHub Gist. The Role of LLMs in Reverse Engineering A fascinating part of this project was using an LLM to accelerate the reverse engineering process. While tools like otool and grep provided the raw data, the AI acted as a “force multiplier”: Reading Code at Scale: The most daunting part of reverse engineering is the sheer volume of information. A binary dump can contain millions of lines of assembly instructions. For a human, “reading” this to build a mental model of the software’s behavior is a task that takes days or weeks. The LLM, however, could digest these massive text dumps instantly. Semantic Understanding: It didn’t just match patterns; it understood the intent of the low-level code. By analyzing the context around function calls (like AES_encrypt or setLockPwd), the AI could infer high-level logic—such as identifying that the password was being sourced from file metadata—without us having to manually trace every register. Time Compression: This ability to essentially “read” the binary allowed us to bypass the tedious manual tracing phase entirely. We could ask high-level questions about the software’s behavior and get answers derived from the raw assembly, compressing what would be an “forever” task for a human into a quick conversation. This collaboration turned what could have been a multi-day debugging session into a targeted, systematic investigation. Conclusion This exercise showed that the “lock” feature in Guitar Pro is effectively just a UI flag backed by a fixed-key obfuscation. It prevents casual editing but offers no real security against someone determined to access the data. Disclaimer: This information is for educational purposes only. Always respect copyright and the wishes of content creators.

2026/1/17
articleCard.readMore

Vibe Coding - Extracting Pet Sprites from Cross Gate

Cross Gate (魔力宝贝) was one of the most influential MMORPGs in Taiwan and China during the early 2000s. As someone who spent countless hours collecting pets in this game during my childhood, I recently embarked on a nostalgia-driven project: extracting all the pet sprites from the game files and building a modern web viewer to browse them. The Challenge Game resources from the early 2000s are notoriously difficult to work with. Cross Gate uses proprietary binary formats for its graphics and animation data: GraphicInfo_*.bin (40 bytes per entry) - Metadata for each graphic including dimensions, offsets, and addresses Graphic_*.bin - RLE-compressed 8-bit indexed images with transparency AnimeInfo_*.bin (12 bytes per entry) - Animation metadata linking pet IDs to frame sequences Anime_*.bin - Animation frame data with actions and directions Palette files (.cgp) - 224-color palettes mapping indices 16-239 The compression format is a custom RLE implementation with multiple encoding modes (literal, repeat, transparent) and variable-length counters. The Solution Using AI-assisted development (Claude Code and Antigravity), I built a Python extraction pipeline: Parse the binary formats - Read the structured binary files, extracting metadata and addresses Decompress RLE graphics - Implement the full RLE decompression algorithm with all encoding modes Apply palettes - Map 8-bit indexed pixels to RGB colors using the game’s palette files Generate animated GIFs - Combine frames into animated GIFs for each pet’s actions and directions Each pet has up to 10 actions (Idle, Walk, Attack, Defend, Cast, etc.) and 8 directions, resulting in potentially 80 GIF animations per pet. The Frontend I built a Next.js web application to browse the extracted pets: Grid view displaying all available pets Detail view with interactive controls for actions and directions Drag-to-rotate functionality for intuitive direction changes Pixel-perfect rendering with image-rendering: pixelated to preserve the retro aesthetic Lessons Learned Binary format reverse engineering is time-consuming - Even with AI assistance, understanding undocumented binary formats requires careful experimentation and validation Progress persistence is essential - With 1000+ pets to process, the batch generator needed to skip already-processed pets and handle timeouts gracefully Test with edge cases early - Some pets had unusual frame counts or missing animations that caused the initial implementation to fail References This project was made possible by the cgg-viewer project, which provided the foundational understanding of Cross Gate’s binary file formats and RLE decompression algorithm. The original Python implementation by the cgg-viewer author was invaluable for understanding how to correctly parse GraphicInfo, AnimeInfo, and palette files. What’s Next Try Tencent Hunyuan 3D to convert 2D sprites into 3D models You can try it out at https://1203906e.cross-gate-pets.pages.dev/.

2026/1/17
articleCard.readMore

Breaking Up with Evernote: Building a Custom Migration Tool for Apple Notes

After 15+ years of note-taking, I finally said goodbye to Evernote. Here’s the technical journey of migrating 4,330 notes—with all their attachments, tables, and formatting—to Apple Notes. The Problem Evernote had been my digital brain since the late 2000s. But with each passing version, the app became slower, more bloated, and increasingly expensive. Apple Notes, meanwhile, has quietly evolved into a capable, fast, and free alternative that syncs seamlessly across my devices. The catch? There’s no official migration path. Evernote’s export format (ENEX) doesn’t preserve everything, and Apple Notes doesn’t have any bulk import feature. Manual copy-paste wasn’t an option. So I built my own migration tool. What Made This Hard This wasn’t a simple file conversion: Rich text formatting including tables, checklists, and styled text Embedded attachments (images, PDFs, documents) referenced by MD5 hashes in Evernote’s proprietary ENML format Creation and modification dates that needed to be preserved Duplicate detection to allow resumable, interruptible migrations Apple Notes’ limitations—no public API, only AppleScript access Evernote v10 made things even more complicated. Unlike older versions that stored everything in a straightforward SQLite database, v10 uses a hybrid system with: A SQLite database for metadata Separate .dat files containing rich text content (tables/formatting) Protobuf-encoded binary structures Server-side attachment storage requiring authenticated downloads The Solution: A Two-Phase Migration System I built a Python-based migration pipeline that handles all of this complexity. Phase 1: Parallel Preparation The first phase downloads attachments and generates PDFs in parallel using 10 worker threads. For notes with embedded images or files, I render the complete content (HTML + attachments) into a PDF using headless Chrome. This preserves formatting perfectly. Phase 2: Sequential Import The second phase imports to Apple Notes via AppleScript—sequentially, because Apple Notes doesn’t handle concurrent modifications well. Solving the Attachment Problem Evernote embeds attachments using <en-media> tags with MD5 hashes. To resolve these to actual files, I: Query Evernote’s local database for attachment metadata Download from Evernote’s servers using captured auth tokens Embed them as base64 in generated PDFs Attach the PDF to the Apple Notes entry Deduplication Done Right My initial attempt at duplicate detection was fragile—comparing dates via AppleScript often failed. The fix was simple: track Evernote note IDs in a log file. This makes the migration fully resumable. Bonus: AI-Powered Organization Once notes were in Apple Notes, I used Gemini AI to automatically categorize them into folders based on content. Lessons Learned AppleScript is slow but reliable — Building a cache at startup dropped duplicate checks from 0.5s to 0.001s per note. Parallelism for I/O, sequential for mutations — Downloading attachments scales linearly with workers. Writing to Apple Notes must be sequential. Auth tokens expire — Evernote’s tokens last about an hour. I kept Proxyman ready to capture fresh tokens. PDF is a universal container — When your target doesn’t support rich formatting or attachments, bundle everything into a PDF. The Code The entire migration toolkit is available on GitHub: apple-notes-toolkit ⚠️ Note: This repo is fully vibe coded. Use with caution. Final Thoughts What started as a weekend project turned into a deep dive into Evernote’s internals, Apple’s Scripting Bridge, and the art of data migration. But the result is worth it: my 15 years of notes are now in Apple Notes, fully searchable, syncing across devices, and—most importantly—mine to keep. If you’re considering leaving Evernote, know that it’s possible. It just takes a bit of engineering.

2026/1/17
articleCard.readMore

《世上为什么要有图书馆》读书笔记

最近读到的一本文字流畅,内容清爽的小书。书里描述了大学教授杨素秋,在西安市碑林区文化旅游局挂职一年,筹办区图书馆的经历。这是个繁杂、具体,有时甚至需要挑战权威的工作: 区里提供的馆址是个地下空间,需要在有限的预算内,找到合适的装修公司,把这个地下空间改造成舒适的阅读空间。 在图书采购过程中,供应商惯于提供劣质的,滥竽充数的图书,为采购者支付回扣。作者不屑于收受回扣,一心为公,希望图书馆里都是经历了时间检验的好书。 为一个图书馆选书,工程浩大,无法仅凭一己之力完成。作者发动自己的人脉,联系了诸多好友帮忙选书。选书缘由,荐者心路,作者缓缓道来,推卷而述,好不痛快。 尽管困难重重,作者心有所往,逆流而上,不畏险阻,最终得偿所愿。主线之余,作者夹叙一年挂职生活所遇的形色人等,有的让人牙关紧咬,有的让人唏嘘感慨,说尽人情冷暖。西安的美食,官场中的本色不改,选书朋友们的人生故事,对弱势群体的关照,五味杂陈,乒乓作响,读者吃到的是酸辣爽口的一餐。 附录里的书单 童书(含漫画) 书名 作者 出版年份 豆瓣评分 豆瓣链接 《安徒生童话》 [丹麦] 汉斯·克里斯蒂安·安徒生 1835年 9.2 链接 《镖人》 许先哲 2015年 9.0 链接 《冰菓》 [日] 米澤穂信 2001年 8.6 链接 《查理和巧克力工厂》 [英] 罗尔德·达尔 1964年 8.9 链接 《虫师》 [日] 漆原友纪 1999年 9.4 链接 《宝可梦(宠物小精灵)》 [日] 日下秀宪 / 真斗 1997年 9.0 链接 《窗边的小豆豆》 [日] 黑柳彻子 1981年 8.8 链接 《吹小号的天鹅》 [美] E.B. 怀特 1970年 8.9 链接 《丁丁历险记》 [比利时] 埃尔热 1929年 9.4 链接 《机动战士高达》 [日] 富野由悠季 / 矢立肇 1979年 9.2 链接 《给孩子的故事》 黄永玉 2015年 8.2 链接 《灌篮高手》 [日] 井上雄彦 1990年 9.7 链接 《哈利·波特》 [英] J.K. 罗琳 1997年 9.2 链接 《海贼王》 [日] 尾田荣一郎 1997年 9.6 链接 《汉声中国童话》 汉声杂志社 1982年 9.5 链接 《荷花镇的早市》 周翔 2014年 8.8 链接 《黑子的篮球》 [日] 藤卷忠俊 2008年 8.1 链接 《护生画集》 丰子恺 / 弘一法师 1929年 9.4 链接 《火影忍者》 [日] 岸本齐史 1999年 9.3 链接 《精灵鼠小弟》 [美] E.B. 怀特 1945年 8.6 链接 《可怕的科学》 [英] 尼克·阿诺德 1996年 9.3 链接 《拉比的猫》 [法] 尤安·斯法 2002年 8.8 链接 《了不起的狐狸爸爸》 [英] 罗尔德·达尔 1970年 8.8 链接 《龙珠Z》 (漫画原作) [日] 鸟山明 1984年 9.7 链接 《玛蒂尔达》 [英] 罗尔德·达尔 1988年 9.1 链接 《玛法达》 [阿根廷] 季诺 1964年 9.4 链接 《名侦探柯南》 [日] 青山刚昌 1994年 9.3 链接 《排球少年》 [日] 古馆春一 2012年 9.7 链接 《七龙珠》 [日] 鸟山明 1984年 9.7 链接 《棋魂》 [日] 堀田由美 / 小畑健 1999年 9.5 链接 《犬夜叉》 [日] 高桥留美子 1996年 9.1 链接 《三毛流浪记》 张乐平 1947年 9.1 链接 《圣斗士星矢》 [日] 车田正美 1986年 9.2 链接 《死神》 (BLEACH) [日] 久保带人 2001年 9.0 链接 《死亡笔记》 [日] 大场鸫 / 小畑健 2003年 9.2 链接 《四月是你的谎言》 [日] 新川直司 2011年 8.7 链接 《太空》 [美] H.A. 雷 1957年 9.1 链接 《网球王子》 [日] 许斐刚 1999年 8.8 链接 《文豪野犬》 [日] 朝雾卡夫卡 / 春河35 2012年 8.4 链接 《希利尔讲艺术史》 [美] V.M. 希利尔 1924年 8.8 链接 《夏洛的网》 [美] E.B. 怀特 1952年 8.6 链接 《夏目友人帐》 [日] 绿川幸 2005年 9.4 链接 《写给孩子的哲学启蒙书》 [法] 布里吉特·拉贝 等 2001年 8.8 链接 《银魂》 [日] 空知英秋 2003年 9.5 链接 《幽游白书》 [日] 冨㭴义博 1990年 9.5 链接 《月刊少女野崎君》 [日] 椿泉 2011年 9.2 链接 文学类 书名 作者 出版年份 豆瓣评分 豆瓣链接 《奥德赛》 [古希腊] 荷马 公元前8世纪 8.7 链接 《白鹿原》 陈忠实 1993年 9.3 链接 《冰与火之歌》 [美] 乔治·R.R. 马丁 1996年 9.4 链接 《查令十字街84号》 [美] 海莲·汉芙 1970年 8.5 链接 《传习录》 王阳明 约1518年 9.1 链接 《东周列国志》 [明] 冯梦龙 约1620年代 9.3 链接 《读库》 张立宪 (主编) 2006年 9.3 链接 《儿女英雄传》 [清] 文康 约1878年 7.6 链接 《反骨仔》 王朔 2007年 7.0 链接 《废都》 贾平凹 1993年 8.2 链接 《古文观止》 [清] 吴楚材 / 吴调侯 1695年 9.4 链接 《哈克贝利·费恩历险记》 [美] 马克·吐温 1884年 8.7 链接 《海边的卡夫卡》 [日] 村上春树 2002年 8.2 链接 《海底两万里》 [法] 儒勒·凡尔纳 1870年 8.6 链接 《汉字王国》 [瑞典] 林西莉 1989年 9.0 链接 《红楼梦》 [清] 曹雪芹 约1791年 9.6 链接 《活着》 余华 1993年 9.4 链接 《基督山伯爵》 [法] 大仲马 1844年 9.2 链接 《卡拉马佐夫兄弟》 [俄] 陀思妥耶夫斯基 1880年 9.7 链接 《克林索尔的最后夏天》 [德] 赫尔曼·黑塞 1920年 8.8 链接 《老人与海》 [美] 欧内斯特·海明威 1952年 8.5 链接 《礼物》 [美] 弗拉基米尔·纳博科夫 1938年 8.8 链接 《裂缝》 [英] 多丽丝·莱辛 2007年 7.9 链接 《流言》 张爱玲 1944年 8.8 链接 《鲁滨孙漂流记》 [英] 丹尼尔·笛福 1719年 8.4 链接 《鲁迅全集》 鲁迅 1938年 9.7 链接 《论语》 孔子弟子及再传弟子 战国时期 9.4 链接 《罗生门》 [日] 芥川龙之介 1915年 8.7 链接 《麦田里的守望者》 [美] J.D. 塞林格 1951年 8.2 链接 《魔戒》 [英] J.R.R. 托尔金 1954年 9.4 链接 《墓法墓天》 不带剑 2017年 7.9 链接 《那不勒斯四部曲》 [意] 埃莱娜·费兰特 2011年 8.8 链接 《挪威的森林》 [日] 村上春树 1987年 8.1 链接 《胚胎奇谭》 [英] 朱利安·巴恩斯 1984年 8.5 链接 《契诃夫文集》 [俄] 安东·巴甫洛维奇·契诃夫 19世纪末 9.6 链接 《人间词话》 王国维 1910年 9.0 链接 《人间喜剧》 [法] 奥诺雷·德·巴尔扎克 1829-1848年 9.2 链接 《三国演义》 [明] 罗贯中 14世纪 9.2 链接 《三体》 刘慈欣 2006年 8.9 链接 《诗的八堂课》 张晓风 2011年 8.3 链接 《诗歌手册》 [法] 保尔·瓦雷里 1942年 8.7 链接 《诗经》 佚名 公元前11-7世纪 9.0 链接 《史记》 [汉] 司马迁 约公元前94年 9.6 链接 《世说新语》 [南朝宋] 刘义庆 约430年 9.1 链接 《鼠疫》 [法] 阿尔贝·加缪 1947年 9.1 链接 《太平广记》 [宋] 李昉 等 978年 9.5 链接 《汤姆·索亚历险记》 [美] 马克·吐温 1876年 8.5 链接 《唐诗别裁集》 [清] 沈德潜 1717年 9.0 链接 《唐诗三百首》 [清] 蘅塘退士 约1763年 9.2 链接 《天龙八部》 金庸 1963年 9.2 链接 《推拿》 毕飞宇 2008年 8.7 链接 《文苑英华》 [宋] 李昉 等 987年 9.7 链接 《我弥留之际》 [美] 威廉·福克纳 1930年 8.8 链接 《西南联大国文课》 闻一多 / 朱自清 等 - 8.4 链接 《献给阿尔吉侬的花束》 [美] 丹尼尔·凯斯 1966年 9.1 链接 《小城之恋》 [英] L.P. 哈特利 1953年 8.1 链接 《小说课》 毕飞宇 2017年 8.6 链接 《写作法宝》 [美] 斯蒂芬·金 2000年 8.9 链接 《伊利亚特》 [古希腊] 荷马 公元前8世纪 8.8 链接 《阴阳师》 [日] 梦枕貘 1986年 8.6 链接 《银河帝国》 [美] 艾萨克·阿西莫夫 1951年 9.4 链接 《酉阳杂俎》 [唐] 段成式 9世纪 9.2 链接 《战国争鸣记》 [日] 宫崎市定 1947年 8.5 链接 《朝花夕拾》 鲁迅 1928年 8.8 链接 《正常人》 [爱尔兰] 萨莉·鲁尼 2018年 8.0 链接 《纸牌屋》 [英] 迈克尔·多布斯 1989年 8.6 链接 《最后一个匈奴》 高建群 1993年 8.1 链接 《左传》 [春秋] 左丘明 (传) 战国时期 9.4 链接 《作文七巧》 夏丏尊 / 叶圣陶 1980年 8.0 链接 人文社科 书名 作者 出版年份 豆瓣评分 豆瓣链接 《1844年经济学哲学手稿》 [德] 卡尔·马克思 1932年 9.2 链接 《奥斯威辛:一部历史》 [英] 劳伦斯·里斯 2005年 9.3 链接 《奥义书》 佚名 公元前800-500年 9.1 链接 《巴尔扎克传》 [奥] 斯蒂芬·茨威格 1946年 9.1 链接 《保卫马克思》 [法] 路易·阿尔都塞 1965年 8.8 链接 《藏在碑林里的国宝》 郭志呈 / 郭强 2019年 8.5 链接 《册府元龟》 [宋] 王钦若 / 杨亿 1013年 9.8 链接 《纯粹理性批判》 [德] 伊曼努尔·康德 1781年 9.2 链接 《丛书集成》 王云五 (主编) 1935年 9.7 链接 《大藏经》 历代高僧 历代 9.8 链接 《抵抗的群体》 [美] 王人英 2011年 8.8 链接 《第二性》 [法] 西蒙·娜·德·波伏娃 1949年 8.8 链接 《洞穴奇案》 [美] 彼得·萨伯 1998年 9.4 链接 《对影胡说》 胡兰成 1980年 7.2 链接 《二十四史》 历代史学家 历代 9.7 链接 《二手时间》 [白俄] S.A.阿列克谢耶维奇 2013年 9.2 链接 《佛家名相通释》 熊十力 1937年 9.1 链接 《傅山的世界》 [美] 白谦慎 2006年 9.1 链接 《伽利略传》 [德] 贝托尔特·布莱希特 1943年 8.9 链接 《关于他人的痛苦》 [美] 苏珊·桑塔格 2003年 8.5 链接 《观看之道》 [英] 约翰·伯格 1972年 8.5 链接 《汉字书法之美》 蒋勋 2009年 8.5 链接 《汉字与文物的故事》 孙机 2021年 9.2 链接 《黑镜头》 [美] 罗伯特·普雷基 2002年 8.8 链接 《黄泉下的美术》 巫鸿 2005年 8.6 链接 《火车上的中国人》 王福春 2001年 8.8 链接 《基督教神学原理》 [美] 奥尔森 1992年 8.9 链接 《基督教要义》 [法] 约翰·加尔文 1536年 9.5 链接 《加德纳艺术通史》 [美] 弗雷德·S. 克莱纳 1926年 9.4 链接 《剑桥中国史》 [英] 费正清 等 1978年 9.4 链接 《咖啡厅、餐馆内景实例》 - - 6.7 链接 《康德传》 [德] 曼弗雷德·库恩 2001年 9.1 链接 《旷野呼告》 [美] 杰克·伦敦 1903年 8.8 链接 《拉丁美洲被切开的血管》 [乌拉圭] 爱德华多·加莱亚诺 1971年 9.3 链接 《蓝色血脉》 朱大可 1991年 8.1 链接 《劳特利奇哲学史》 G.H.R.帕金森 (主编) 1993年 9.3 链接 《理解一张照片》 [英] 约翰·伯格 2013年 8.3 链接 《理想城市》 [美] 简·雅各布斯 1961年 9.4 链接 《另一种讲述的方式》 [英] 约翰·伯格 1982年 8.8 链接 《伦理学》 [荷] 巴鲁赫·斯宾诺莎 1677年 9.2 链接 《论摄影》 [美] 苏珊·桑塔格 1977年 8.7 链接 《毛以后的中国》 [美] 罗德里克·麦克法夸尔 2008年 9.3 链接 《美术、神话与祭祀》 张光直 1988年 9.0 链接 《明朝那些事儿》 当年明月 2006年 9.2 链接 《墨庄漫录》 [宋] 张邦基 南宋 8.6 链接 《纽约摄影学院摄影教材》 [美] Don Sheff 1970年 8.7 链接 《欧洲大学史》 [法] 克里斯托夫·夏尔勒 2002年 8.3 链接 《破〈破新唯识论〉》 熊十力 1923年 8.6 链接 《囚徒的困境》 [美] 威廉·庞德斯通 1992年 8.4 链接 《让房子与你的灵魂契合》 [美] 克莱尔·库珀·马库斯 1995年 8.0 链接 《人类简史》 [以色列] 尤瓦尔·赫拉利 2011年 9.1 链接 《如何建造美好家园》 [英] 约翰·布鲁克斯 1984年 8.6 链接 《撒马尔罕的金桃》 [美] 薛爱华 1963年 9.2 链接 《僧侣与哲学家》 [法] 让-弗朗索瓦·勒维尔 1997年 8.5 链接 《送法下乡》 苏力 2000年 8.7 链接 《山川悠远》 方闻 2004年 8.5 链接 《设计中的设计》 [日] 原研哉 2003年 8.5 链接 《摄影哲学的思考》 [捷] 维兰·傅拉瑟 1983年 8.5 链接 《身体·性别·摄影》 [日] 笠原美智子 2003年 8.0 链接 《神话学》 [法] 罗兰·巴特 1957年 8.4 链接 《生活与命运》 [苏] 瓦西里·格罗斯曼 1980年 9.6 链接 《圣经·旧约》 摩西 等 公元前13世纪-前2世纪 9.2 链接 《圣经·新约》 马太 / 马可 / 路加 等 公元1世纪 9.2 链接 《世界摄影史》 [美] 内奥米·罗森布拉姆 1984年 8.8 链接 《世界摄影艺术史》 [法] 安德烈·胡耶 2005年 8.3 链接 《世界通史》 [美] 斯塔夫里阿诺斯 1970年 9.1 链接 《市井西仓》 胡武功 2006年 8.1 链接 《私人生活史》 [法] 菲利普·阿里埃斯 等 1985年 8.7 链接 《斯宾诺莎导读》 [美] 史蒂文·纳德勒 2006年 8.7 链接 《四库全书》 [清] 纪昀 等 1782年 9.9 链接 《俗世威尔》 [英] 特里·伊格尔顿 2008年 8.5 链接 《涑水记闻》 [宋] 司马光 北宋 8.7 链接 《太平御览》 [宋] 李昉 等 983年 9.8 链接 《天真的人类学家》 [英] 奈吉尔·巴利 1983年 8.4 链接 《同性恋亚文化》 李银河 / 王小波 1998年 8.5 链接 《图书馆入门》 [日] 若松英辅 2013年 8.1 链接 《完美店铺设计指南》 - - 7.0 链接 《唯识二十论》 [古印度] 世亲 约4世纪 9.2 链接 《为什么我不是基督教徒》 [英] 伯特兰·罗素 1927年 8.7 链接 《未来简史》 [以色列] 尤瓦尔·赫拉利 2015年 8.4 链接 《文字的力与美》 [日] 杉浦康平 2002年 8.7 链接 《无知的教师》 [法] 雅克·朗西埃 1987年 8.5 链接 《乡土中国》 费孝通 1947年 9.3 链接 《湘山野录》 [宋] 释文莹 北宋 8.2 链接 《新教伦理与资本主义精神》 [德] 马克斯·韦伯 1905年 8.9 链接 《新唯识论》 熊十力 1932年 9.1 链接 《新游牧民》 [日] 四方田犬彦 2002年 7.9 链接 《幸运者》 [英] 约翰·伯格 1967年 8.8 链接 《修剪菩提树》 [美] 唐纳德·S.洛佩兹 1995年 8.7 链接 《雅典与耶路撒冷》 [俄] 列夫·舍斯托夫 1938年 9.1 链接 《艺术哲学》 [法] 丹纳 1865年 9.1 链接 《隐士建筑》 [日] 中村好文 2011年 8.6 链接 《永字八法》 佚名 唐代 8.3 链接 《犹太教》 [英] 诺曼·所罗门 1996年 8.3 链接 《与古为徒和娟娟发屋》 巫鸿 2005年 9.0 链接 《与小泽征尔共度的午后音乐时光》 [日] 村上春树 / 小泽征尔 2011年 8.7 链接 《造型的诞生》 [日] 杉浦康平 1999年 9.1 链接 《怎样阅读照片》 [英] 伊安·杰夫里 1981年 8.4 链接 《詹森艺术史》 [美] H.W. 詹森 1962年 9.4 链接 《正面管教》 [美] 简·尼尔森 1981年 8.4 链接 《知日》 苏静 (主编) 2011年 7.5 链接 《直角之诗》 [法] 勒·柯布西耶 1955年 8.9 链接 《纸上纪录片》 崔永元 (主编) 2002年 8.7 链接 《中国碑帖名品》 - - 9.2 链接 《中国摄影史》 陈申 / 徐希景 1987年 8.4 链接 《中国照相馆史》 [美] 泰瑞·贝内特 2013年 8.9 链接 《宗教生活的基本形式》 [法] 埃米尔·涂尔干 1912年 9.0 链接 《走向新建筑》 [法] 勒·柯布西耶 1923年 8.6 链接 自然科学 书名 作者 出版年份 豆瓣评分 豆瓣链接 《别闹了,费曼先生》 [美] 理查德·费曼 1985年 9.3 链接 《城市自然故事》 张瑜 2021年 8.9 链接 《从一到无穷大》 [美] G. 伽莫夫 1947年 9.2 链接 《地球编年史》 [美] 撒迦利亚·西琴 1976年 8.1 链接 《第三种黑猩猩》 [美] 贾雷德·戴蒙德 1991年 8.5 链接 《哥德尔、艾舍尔、巴赫》 [美] 侯世达 1979年 9.4 链接 《给忙碌者的天体物理学》 [美] 奈尔·德葛拉司·泰森 2017年 8.6 链接 《给青年科学家的信》 [美] 爱德华·威尔逊 2013年 8.4 链接 《果壳中的宇宙》 [英] 斯蒂芬·霍金 2001年 9.0 链接 《剑桥科学史》 [英] 科林·A.罗南 1983年 8.9 链接 《科学的历程》 吴国盛 1995年 9.1 链接 《盲眼钟表匠》 [英] 理查德·道金斯 1986年 9.0 链接 《上帝掷骰子吗?》 曹天元 2006年 9.3 链接 《什么是科学》 吴国盛 2016年 8.6 链接 《实验室女孩》 [美] 霍普·洁伦 2016年 8.6 链接 《贪婪的多巴胺》 [美] 丹尼尔·利伯曼 等 2018年 7.9 链接 《物理世界奇遇记》 [美] G. 伽莫夫 1940年 9.1 链接 《现实不似你所见》 [意] 卡洛·罗韦利 2014年 8.9 链接 《园丁的一年》 [捷克] 卡雷尔·恰佩克 1929年 8.7 链接 《云彩收集者手册》 [英] 加文·弗雷特-平尼 2006年 8.0 链接 《杂草的故事》 [英] 理查德·梅比 2012年 8.8 链接 《怎样观察一棵树》 [美] 南希·罗斯·哈格 2005年 8.5 链接 《这里是中国》 星球研究所 / 中国青藏高原研究会 2018年 9.3 链接 《自私的基因》 [英] 理查德·道金斯 1976年 8.9 链接 其他系列书 书名 作者 出版年份 豆瓣评分 豆瓣链接 《中国在梁庄》(“梁庄”系列) 梁鸿 2010年 8.9 链接 《玛格南世纪》(“玛格南”系列) 玛格南图片社 1999年 9.4 链接 “牛津树”系列 [英] Roderick Hunt 等 1986年 9.7 链接 “培生”系列 培生教育集团 - 9.1 链接 《失落的一代》(“中国纪实三部曲”) [法] 潘鸣啸 1994年 9.2 链接

2025/9/29
articleCard.readMore

《纳瓦尔宝典》推荐阅读

纳瓦尔·拉维坎特(Naval Ravikant)在《纳瓦尔宝典》中不仅分享了他关于财富和幸福的智慧,还推荐了大量影响他思维的优质书籍和博客。这些推荐读物构成了一个完整的知识体系,涵盖科学、哲学、商业、灵修等多个领域。 《纳瓦尔宝典》提及书籍与博客索引(含博客链接) 以下列表依照在《The Almanack of Naval Ravikant》中首次出现顺序整理,并补充中文译名及 Naval 的一句话点评。博客及博文已附可点击链接。 序 英文原名(含链接) 中文译名 类 型  Naval 一句点评 1 The Beginning of Infinity 无穷的开始:世界进步的本源 书籍 不算易读,却真正把我读聪明了。 2 Sapiens: A Brief History of Humankind 人类简史:从动物到上帝 书籍 近十年读过的最佳著作,洞见满页。 3 The Rational Optimist 理性乐观派:人类经济进步史 书籍 多年里最睿智、最启发我的一本书。 4 Genome 基因组:人类自传23章 书籍 Ridley 的其他作品,我全读且反复读。 5 The Red Queen 红皇后:性与人类进化 书籍 Ridley 必读之作之一。 6 The Origins of Virtue 美德的起源 书籍 Ridley 探讨合作本能的佳作。 7 The Evolution of Everything 万物演化 书籍 解释新思想如何诞生的前瞻之书。 8 Skin in the Game 非对称风险 书籍 2018 年最佳读物之一,商业模型极佳。 9 The Bed of Procrustes 暂无中文版 书籍 Taleb 的古典智慧箴言集。 10 The Black Swan 黑天鹅 书籍 Taleb 另一部必读之作。 11 Antifragile 反脆弱 书籍 Taleb 另一部必读之作。 12 Fooled by Randomness 随机漫步的傻瓜 书籍 Taleb 另一部必读之作。 13 Six Easy Pieces 费曼物理学讲义·六篇轻松小品 书籍 我会送给孩子的物理入门书。 14 Six Not-So-Easy Pieces 费曼物理学讲义·六篇不太轻松小品 书籍 与上册并读收获更大。 15 Perfectly Reasonable Deviations… 合理的偏差:费曼书信集 书籍 展示费曼思考魅力的书信精选。 16 Genius: The Life and Science of Richard Feynman 天才:理查德·费曼的一生 书籍 费曼传记,值得再三回味。 17 Thing Explainer 万物解释者 书籍 用千常用词解释复杂世界,妙不可言。 18 Thinking Physics 思考物理 书籍 小学到研究生都能悟到物理真义。 19 The Lessons of History 历史的教训 书籍 短小却犀利,概括宏大历史主题。 20 The Sovereign Individual 主权个人 书籍 自《人类简史》以来最打动我的书。 21 Poor Charlie’s Almanack 穷查理宝典 书籍 芒格之道的最全面记录。 22 Reality Is Not What It Seems 现实并非如你所见 书籍 现代物理的诗意科普。 23 Seven Brief Lessons on Physics 七堂极简物理课 书籍 物理学的极简浪漫入门。 24 The Compleat Strategyst 策略家的博弈 书籍 博弈论的轻松读物,受益匪浅。 25 The Evolution of Cooperation 合作的进化 书籍 合作的博弈论经典。 26 Theory of Everything (Dreamstate Trilogy) 暂无中文版 书籍 探索意识与现实边界的小说。 27 Jed McKenna’s Notebook 暂无中文版 书籍 对自我探寻的极端反思。 28 A Master’s Secret Whispers 暂无中文版 书籍 灵性启蒙手册。 29 Direct Truth 暂无中文版 书籍 直指真理的心灵炸弹。 30 Atmamun 暂无中文版 书籍 意识自由的个人记录。 31 The Book of Life 生命之书 书籍 克里希那穆提思想精粹。 32 Total Freedom 彻底的自由 书籍 通往绝对自由的途径。 33 Siddhartha 悉达多 书籍 每个人的精神旅程寓言。 34 The Book of Secrets 秘密之书 书籍 奥修对人生的114条开示。 35 The Great Challenge 暂无中文版 书籍 奥修晚期谈话录。 36 The Way to Love 爱的方式 书籍 孟德信简练的灵修指引。 37 The Untethered Soul 觉醒的你 书籍 如何超越自我束缚。 38 Meditations 沉思录 书籍 斯多葛智慧的原典读法。 39 Love Yourself Like Your Life Depends on It 像生命一样爱自己 书籍 简单却有效的自爱练习。 40 The Tao of Seneca 暂无中文版 书籍 与纳瓦尔同频的斯多葛精选。 41 How to Change Your Mind 如何改变你的想法 书籍 揭开迷幻药疗愈潜力。 42 Striking Thoughts 搏击思想 书籍 李小龙哲学火花。 43 The Prophet 先知 书籍 简洁而永恒的人生诗篇。 44 Ficciones 虚构集 书籍 每一页都折射无限宇宙。 45 Stories of Your Life and Others 你一生的故事 书籍 科幻与哲思的完美融合。 46 Exhalation 呼吸 书籍 最富想象力的当代科幻集。 47 The Lifecycle of Software Objects 软件体的生命周期 书籍 AI 伦理预演,深刻摄人。 48 Snow Crash 雪崩 书籍 网络与文化的先知小说。 49 The Diamond Age 钻石年代 书籍 纳瓦尔常提的教育乌托邦。 50 The Last Question 最后的问题 书籍 短篇里藏着宇宙终极命题。 51 Tools of Titans 巨人的工具 书籍 实践者的心法大全。 52 Thermoinfocomplexity 暂无中文版 书籍 信息热力学的深度论文。 53 Pre-Suasion 瞬时说服 书籍 说服术的时机艺术。 54 The Story of Philosophy 哲学的故事 书籍 通俗入门哲学名著。 55 God’s Debris 神的碎片 书籍 思辨小说的奇葩精品。 56 Tao Te Ching 道德经 书籍 智慧源头,日日可读。 57 The Undercover Economist 卧底经济学 书籍 经济学视角的日常透镜。 58 Illusions: The Adventures of a Reluctant Messiah 幻灭 书籍 寓言式的自由宣言。 59 The Three-Body Problem 三体 书籍 科幻史诗,引人沉思。 60 Man’s Search for Meaning 活出生命的意义 书籍 逆境中的意义之书。 61 Sex at Dawn 黎明前的性 书籍 重新审视人类亲密关系。 62 Melting Asphalt (Kevin Simler) 暂无中文版 博客 洞悉人性与社会的深度博文。 63 Farnam Street (Shane Parrish) 范南街 博客 思维模型的宝库。 64 Stratechery (Ben Thompson) 战略学 博客 商业与科技的清晰分析。 65 Idle Words (Maciej Cegłowski) 闲言碎语 博客 写作优雅,观点锐利。 66 The Munger Operating System: How to Live a Life That Really Works 芒格操作系统:如何过一种真正有效的生活 博文 芒格智慧的浓缩指南。 67 The Day You Became a Better Writer 你成为更好作家的那一天 博文 写作质量跃迁之道。 68 Crony Beliefs 裙带信念 博文 自我欺骗的深刻剖析。 69 Career Decisions 职业决策 博文 择业思考框架。 70 Think Like Reality 像现实一样思考 博文 量子并不怪——怪的是你。 71 Lazy Leadership 懒惰的领导力 博文 以无为治有为。 72 EdLatimore.com Ed Latimore 个人网站 博客 拳击与人生哲理的结合。 73 You and Your Research 你和你的研究 博文 做重要工作的心法。

2025/7/5
articleCard.readMore

与冰山交谈

每个人都是一座冰山。当你与人交谈,想象你是在和冰山交谈,目之所及的只是水面之上的部分。如果你希望达成交流,你必须具备耐心,从身体和情绪感受出发,逐层递进,弄清原委。

2025/7/5
articleCard.readMore

Claude Code Complexity: Safety, Safety, Safety

I tried Claude Code this week, and instantly felt the empowerment from the tool, and was stunned by how naturally it blends into developer workflows. It demonstrated how easy the LLM model makers can disrupt the application makers (Cursor in this case). This reminds me of the analogy Andrej Karpathy made in Software Is Changing (Again) presentation that LLM has strong analogies to operating systems. The LLM model makers can easily disrupt app makers like Apple can sherlock other softwares running on top of macOS. With a similar tool from Google called Gemini CLI released, I begin to question about what is the main complexity Claude Code has, and whether that complexity is challenging enough to support companies relying on building agentic tools. I found the following video where Boris Cherny (who is the creator of Claude Code) answered my first question: Audience: I was wondering what was the hardest implementation, like part of the implementation for you of building it? Boris: I think there’s a lot of tricky parts. I think one part that is tricky is the things that we do to make bash commands safe. Bash is inherently pretty dangerous and it can change system state in unexpected ways. But at the same time, if you have to manually approve every single bash command, it’s super annoying as an engineer. Boris: … the thing we landed on is there’s commands that are read-only, there’s static analysis that we do in order to figure out which commands can be combined in safe ways, and then we have this pretty complex tiered permission system so that you can allow list and block list commands at different levels. This highlights a key insight: In agentic systems, safety isn’t an afterthought—it’s the core challenge. How do we know if a command is safe to run? How can these tools predict the consequences of an action? Currently, the burden is shifted to the developer via permission dialogs. But eventually, developers will expect these tools to act more autonomously—without compromising safety. For commands that only affect local environments, Docker might offer a partial solution. But many real-world use cases involve remote effects—like modifying a task in Linear or changing a GitHub label. These remote side effects raise thorny questions about trust, auditability, and failure handling. After exploring Claude Code and Gemini CLI, I’m excited about where this space is headed. The next breakthroughs may come not just from smarter agents—but from safer ones. – EOF –

2025/6/27
articleCard.readMore

微信读书:LLM 自动化问答 PK

为了增加用户活跃度,微信读书团队开发了一个微信小游戏——问答 PK。这是一个双人对决形式的知识问答天梯,题目内容主要基于常识,比如成语填字,古诗词接上下句。 玩了几天后发现,光靠我的知识储备和记忆力,很难持续提升段位。答案在网上一搜就能找到,但是 10 秒钟的答题时间来不及搜索,于是我想到借助 DeepSeek 来自动答题。说干就干,Vide-Coding 了一个 Python 脚本,自动化了整个答题过程,并最终达到了最高等级。本文记录在开发过程中,遇到的问题与一些观察。 技术难点与观察 OCR 错误率导致的复杂度 我首先想到的是将窗口截图转为文字,这一步涉及图片到文字的模态转换: macOS 自带的 OCR 中文识别准确率并不完美。有些中文字符在不同帧中会被错误识别为相似字形。 为了判断题目是否更新,程序需要实现较复杂的题目刷新检测逻辑。 在存储与提取已答题目上,也因此增加了额外复杂度。 后来想到可以利用 macOS 的 Accessibility API 来获取小程序窗口的文字信息,实现起来就简单多了。 结论: 如果可以获取文本内容,应当优先使用文本内容,尽量避免不必要的复杂度。 第一个想到的方法不一定是最好的方法,实现之前可以再多花一点时间比较一下其他方法。 反馈机制的设计 LLM 并不能保证每道题都能准确回答,因此,需要设计一种反馈机制,用于处理错误回答,并逐步提高系统表现: 每次答题后,程序会记录实际答案与 LLM 输出是否一致。 若识别为错误,会将题目及正确答案保存进本地题库,供后续匹配使用。 随着题库积累,LLM 的回答可以逐步退居辅助角色,以“已知题目匹配”为主、生成式回答为辅。 在实践中,这种混合策略显著提高了答题准确率,也使系统更加可控。 工具效率与资源消耗 这类依赖模态转换和实时反馈的程序在效率上也面临挑战,尤其当一方发生变化、但未提供明确的推送机制时,工具只能通过“轮询”方式不断查询变化状态: 本例中,为了判断题目是否已经刷新,程序只能定期抓取小程序里的文字内容,并比对,轮询带来了显著的资源消耗。这种“拉取式”的检测逻辑效率低下,不适合长期运行。 本质上,这类问题的根源在于缺乏变化触发的事件通知机制。如果 macOS 或目标应用能提供“题目变动事件”的观察接口,将显著提高系统效率。期待苹果在接下来的几年持续进化 macOS 来帮助第三方软件加入更多 AI 驱动的功能。 实现的过程中用到了 MacPaw 开源的 macapptree 来抓取应用的 Accessibility Tree。估计 MacPaw 团队在开发 Envy 的 actions 也依赖 Accessibility API 来实现各种软件的自动化。 结论:在系统设计中,应尽量选择或构建具备事件驱动机制的组件,避免盲目轮询所带来的能耗与复杂度。 Vibe-Coding 作为一个 Weekend Fun Project,没有 Vibe-Coding,我无论如何也无法在两三天里快速迭代实现各种预想中的功能,修复各种 bug,并最终把程序跑起来,自动化整个答题过程的。不得不说,有了 Cursor 以后,没有办法回到一行一行写代码的日子了。Vibe-Coding is fun and the future for everyone。 – EOF –

2025/6/22
articleCard.readMore

Working on Moonshot Projects

Sundar Pichai: CEO of Google and Alphabet | Lex Fridman Podcast: Sundar Pichai views “moonshot” projects as crucial for several reasons: Driving Innovation: He believes that aiming for audacious, seemingly impossible goals, like the original moon landing, forces radical rethinking and leads to breakthroughs that wouldn’t happen with incremental improvements. It’s about finding “10X” improvements rather than “10 percent” improvements. Inspiring Talent and Passion: Big, challenging problems ignite both the hearts and minds of people. It’s easier to attract passionate and talented individuals to work on projects that could redefine humanity. Societal Impact: Moonshots, even if their initial goal is not fully realized, can lead to numerous technological advancements with real-world applications and inspire future generations. For example, Google considers fighting climate change as a “moonshot” due to its profound societal importance. Leveraging Constraints: Pichai has also highlighted that constraints can act as catalysts for innovation. Working within defined limits encourages teams to be more creative and focused, leading to groundbreaking ideas.

2025/6/11
articleCard.readMore

Vibe Coding - Baby Sleep Tracker

To monitor our baby from other rooms, we purchased a Nanit Baby Monitor. Using image recognition, Nanit provides insights into our baby’s nighttime sleep patterns through its app. Each state transition point includes a video for review. However, the display isn’t very intuitive — the chart doesn’t show the exact timestamps for each transition. For example, the start and end times of the two longer sleep sessions are not clearly marked. To more intuitively view this information and more flexibly display the baby’s sleep duration and time periods throughout the night, I used Cursor and video-coding to build a Web App: Fetch data from Nanit API for any given date Render sleep sessions throughout the day Plot sleeping trend of most recent dates Lessons learnt: Think through the main features and their designs you want before code generation with Cursor. Although LLM can generate code for you. You would still need to think through what are the features you have in mind, and what things would look like (the design). This reminds me how Firebase Studio is trying to help build a PRD (Product Requirements Document) before beginning to generate code. Remind me apps like https://stitch.withgoogle.com/ Think about testing if you would like to have some code maintainability. Fully AI generated code without any review and test is not maintainable. As a weekend project to meet myself’s requirements, I didn’t put much effort into how to make it maintainable. I feel the joy of vibe coding goes down slowly when I put more features to it as new changes could break existing features. I probably should add some end-to-end tests to make sure that new changes won’t break existing features. However, I didn’t figure out how to put tests in the iteration loop in Cursor yet. Tighter development loop and more agentic behaviors are needed. Cursor stops itself frequently even with agent mode to ask for all kinds of inputs: human input (confirmation, or opinion on design choices) app console output For the human input, I found myself becoming the bottleneck for it to do more useful things. When it’s waiting for some input, I wish it would begin working on other parts which don’t require human input. For the app console output, I wish it has a tighter loop so that I don’t need to copy console output from Chrome DevTools back to Cursor. (Maybe Chrome could provide something to close the loop here?) Analyzing images through AI generated code doesn’t work. As Nanit doesn’t provide a way to export data, I was trying to use app screenshots to parse the sleep information (which is challenging for me to code manually), and it turns out that the current AI models cannot do that as well even with dozens of prompts back and forth. I ended up using Proxyman to capture HTTPs requests and responses from the Nanit app to understand the API, and calling that directly from Python. Used some go code from https://github.com/gregory-m/nanit in the prompt to help LLM to implement the authentication part.

2025/6/4
articleCard.readMore

独立思考的人

独立思考的人, 世界上大部分的问题悬而未决, 观点就像流过身体的水, 保持质疑一切的态度, 听到一个观点之后, 做好随时修正持有观点的准备, 论辩不是为了输赢, 放下偏见和自傲,

2025/4/25
articleCard.readMore

Magic Moment

使用了一整天 MacWhisper 之后的感受: 语音输入文字本身并不是什么新鲜的功能,但就像 iPhone 键盘 的诞生一样,它背后仿佛存在着一道无形的界限——在跨越这道界限之前,一切都显得繁琐笨重;而一旦突破,用户才能真正感受到那种 Magic Moment,仿佛一切变得自然、顺畅,甚至有些神奇。

2025/4/22
articleCard.readMore

《思辨力35讲:像辩手一样思考》读书笔记

《思辨力35讲:像辩手一样思考》是最近读到的干货满满的一本书。 这本书前两章系统地整理了分析问题的逻辑框架和常见的逻辑谬误,对于如何提高思辨能力能有帮助。第三章辩论实战部分讲如何应用在辩论中,对于不直接参与辩论的读者不如前两章实用。 塑造理论的整体结构(第二章的内容) MECE(Mutually Exclusive, Collectively Exhaustive) 定义:相互独立、完全穷尽。这些点与点彼此不重合,叫相互独立;它们加在一起能够完整地覆盖对这个问题的分析,叫完全穷尽。 MECE这个概念对我比较有启发,工作中的一些讨论缺乏对问题的总体上的思考。 明确定义是讨论的开始 明确定义,达成共识,挖掘更深洞见 有标准,才有意义 比较标准是建立论证的关键因素 比较标准的公开是建立共识的前提。选择辩论队员上场的例子。 检视标准是发现分歧、明确重点的方式 比较标准的反驳:有效性、合理性与归谬反驳 明确比较标准:洞悉底层价值,引导决策方向 权衡价值与利益的“需根解损” 政策性辩论/价值性辩论 需根解损是政策性辩论的分析框架 概念: 需求:可以是问题导向(空气污染)、利益导向(更好的工作)或目标导向(更文明的社会)。 根属性指的是之所以会存在这个需求,其根本原因是什么。 解决力,也就是这个政策解决问题的效果。包含可行性和效果。 损益比,比比落实这个政策带来的好处和它产生的弊害,划算吗? 量化和补救措施 需根解损这个概念我是在这本书里第一次了解到。工作当中常用的一个决定项目优先级的框架和这个有相似之处:RICE(Rich,Impact,Confidence,Effort)。 没有绝对共识,但可比较利弊 为生命提供避风VS助长遗弃之风 利弊比较:让思考完整清晰,但没有绝对真理。利弊比较往往涉及到价值排序,所以因人而异,难以有绝对的共识。 利可否被替代,弊可否被规避 寻找同一标尺,平行比较利弊 看清事件本质,用价值排序判断利弊 不说废话,从“决胜点意识”开始 辩论中的决胜点意识:对,但为什么更对 明确目的,达成目的 论证观点,检视自己 如何论证论点? 论证的三个部分:逻辑、事实、价值 论证强度与论证责任 演绎论证:前提真实,逻辑有效,结果必然 归纳论证:结论超越前提,缺乏绝对有效性 归纳论证的4种方法:摆事实、举数据、讲机理、举例子、引用权威理论。 论证强度:标准不统一,视损益比而定 比例原则:论证强度与对应行为成比例 推定利益与举证责任 让道理听得进去 用例子完善逻辑,用故事锦上添花 说服力 常见的逻辑谬误(第一章的内容) 相关不等于因果。“错把相关当因果”是我们生活和工作中最常见的逻辑错误之一。 因果倒置 C同时带来A和B 如何克服:尝试反向思维,对于观点A带来B,B带来A成立吗;控制变量; 实然不能论证应然。 概念理解 如何理解“落后就要挨打”这句话?第一种理解:落后时更容易有人来欺负我。第二种理解:如果我落后了,别人打我、欺负我无可厚非,落后的人和国家就应该被欺负,甚至被消灭。两种不同的理解分别对应了两个概念——实然和应然。实然,descriptive,是指对现实的描述;应然,normative,讨论的是什么是应该的、好的、对的、值得追求的。这一讲我们就来区分这两个概念。 区分实然还是应然 门当户对是否过时?实然层面,只需要做问卷调查。应然层面,探讨现代人应不应该还在乎门当户对。 实然不能论证应然 对于存在即合理的误读。“合理”在黑格尔的原意是:凡是现实的都是有原因的、可被归因的、有迹可循的。 实然是对真实世界的确认,属于求真。应然是道德层面上的讨论。 行,但不对 行不行,指的是这些行为能否实现行为实施者的功利性目的;对不对,指的是这些行为在道德上是不是正义的和应该做的。 营救式刑求,行不行? 用一个例子来讲解功利道德观和道德绝对主义道德观之间的交锋。 利弊权衡中隐藏的风险与危机 功利主义更容易被认同。 如何推广这种绝对的道德观?创造某种沉浸式的体验;论证为什么持这样的道德观的世界会更好,这有些类似在功利主义角度去辩驳,杀一也许不能救百。 滑坡是谬误,也是合理质疑 滑坡谬误:一环连着一环的不成立 如果A发生,B就会发生;如果B发生,C就会发生。后半部分是真的吗? 关于同性婚姻的滑坡论证:有效自愿与道德原则 文明社会的两条最基本的行为原则是自愿和对他人无害。 根属性。一件事情发生的根属性是什么?利于艾滋病传播的因素不见得根属于同性性行为,而是根属于未受保护的同性性行为。 平等与正义之间隔着一个公平 Equity illustration: Equality(平等):每个人都被给予相同的资源或机会,但由于本身的差异,有人仍然无法受益。 Equity(公平):资源分配考虑到了个人的具体需要,使每个人都能达到同样的成果。 Justice(正义):通过系统性的改革(如移除障碍),让每个人都不再需要额外的帮助就能获得平等的机会。 《平权法案》(Affirmative action) 目标状态,起始状态和过渡状态 三段论里的不证自明 引子 大前提:人活着是好事。 小前提:我的伴侣是人。 结论:复活伴侣是好事。 什么是三段论? 大前提,小前提和结论。包含关系。 演绎论证(Deductive Argument)和归纳论证(Inductive Arument) 不是所有分歧都叫偷换概念 什么是偷换概念? 偷换概念指的是在同一思维过程中,用一个概念代替另一不同的概念,也就是说,同样的词或短语在同一个论证逻辑中,第一次和第二次出现时表面意思相同,但是实际上却是两个不同的概念,它违反了同一律要求,从而造成逻辑错误。 类比不当不是偷换概念 “人不可能伤害自己的孩子,因为虎毒还不食子呢!”你可以反驳我这句话是类比不当,因为人和老虎在对待孩子的恶毒程度上不见得足够相似,或者说人类世界的复杂程度要远远高于动物世界的复杂程度。但这并不是偷换概念。 稻草人谬误与红鲱鱼谬误 在辩论中故意把对方的观点曲解为一个更容易反驳的版本然后对其反驳并觉得自己赢了,这就是稻草人谬误。 稻草人谬误是对观点复杂性的粗暴简化 如何反驳稻草人谬误:忠实原则与宽容原则 所谓忠实原则,是当对方表达观点后,我们要尽可能按照他的本意去理解、去复述、去反驳,而不是编造出另一个不符合他本意的东西。 所谓宽容原则,是将疑点、利益归于提出观点的人,尽可能使他的论证有说服力。当然这也要在忠于他的原意的前提下。 在这样的前提下,我们反驳的才是这个观点,否则反驳的只是另一个概念,或者我们战胜的只是对方一时没说清的失误而已。 红鲱鱼谬误(Red Herring Fallacy) 比喻那些为了让人分散注意力而提出的不相干的观点甚至是错误信息。 如何反驳红鲱鱼谬误:识别被转移的焦点 样本偏误不可信 幸存者偏差:无视“牺牲者”的数据谬误 Survivorship bias 选择偏差:具有倾向性的样本无法代表总体全貌 Selection bias:选择样本是不是随机的 自选择偏差:主体自我选择带有的特征会影响因果关系的判定 Self-selection bias 离婚律师分析离婚 参与偏差(无反应偏差) Non-response bias 条件概率:收集信息,理解自己 Conditionial Probability 回避论证过程的循环谬误(Begging the question) 好马不吃回头草,因为吃回头草的不是好马。 进退两难也许只是假象 什么是虚假两难?虚假两难也称非黑即白,指的是在本来有其他选项的情况下,却要求人们做出非此即彼的选择。 光谱思维 人身攻击无法论证观点 人身攻击谬误 诉诸权威谬误 充分吗?必要吗? 比较级:面对有限现状,量化最优选项 我最求高尚,但是不追求更高尚。 充分与必要,充分不必要,必要不充分 霸道定义,包山包海:条件不中立,标准不统一 - EOF -

2025/4/21
articleCard.readMore

Daily Watched YouTube Videos

const svg = document.querySelector('.line-chart') const lineChart = new chartXkcd.Bar(svg, { title: 'Daily Watched YouTube Videos', // optional xLabel: 'Year', // optional data: { labels: ['2014', '2015', '2016', '2017', '2018', '2019', '2020', '2021', '2022'], datasets: [ { label: 'Number of Videos', data: [2, 2, 2, 7, 13, 15, 18, 26, 30], }], }, options: { // optional yTickCount: 3, legendPosition: chartXkcd.config.positionType.upLeft } }); - EOF -

2022/5/11
articleCard.readMore

深度体验

明明都是在刷手机,为什么有的时候我觉得自己有所收获,有的时候却觉得是浪费时间? 在我看来,这是深与浅的区别。深指的是内容层面的深,围绕一个固定的主题深入地阅读、理解和体验,得到的信息和情感逻辑连贯,充满细节。浅指的也是内容层面的浅,草草地划过一条由没头没尾信息组成的时间线,看似获取了大量的信息,却不知是大量低质量、重复甚至毫无价值的信息。这里的浅当然还包括行为的被动性。注意力被设计好的时间线牢牢捕获,盲目追求一种完整感,生怕错过一些实际上没什么价值的信息(即 FOMO:Fear of Missing Out)。 深度体验包括但不限于: 阅读一本书 观看一部电影 玩一场剧本杀 与朋友深入交谈 浅层体验包括但不限于: 浏览社交网络 浏览社会新闻 刷短视频 深层体验需要付出努力才能获得,让人获得复杂的情感体验,予人进步。浅层体验无需努力即可获得,让人轻松娱乐,但是长久进行会让人变得麻木,丧失自由意志。时间对每个人都是公平的。花更多时间浅层体验,就势必会减少深度体验的时间。面对充满诱惑的浅层体验,我们必须学会如何分配自己的时间,跳出浅层体验的陷阱。

2022/5/9
articleCard.readMore

家酿 Windows 媒体服务器

和很多人一样,我也喜欢把喜欢的视频、音频拖到本地,待日后慢慢享用。这里一步到位的方案是买一台 NAS 服务器,加上若干硬盘,插上电,下载应用,设置一下,即可开始使用。退而求其次的方法是一直开着一台电脑,把硬盘共享出来。 我只是存一些视频网站上看到的视频,Audible 上买的一些有声电子书,没有那么多大文件需要存储,就没买 NAS,一直是用一台 iMac 来充当这个媒体服务器的角色。搬家以后,iMac 装在箱子里了一段时间,最近老婆新买的桌子到了,才让它重见天日。这台 iMac 的硬盘是 Fusion Drive,容量也只有 1TiB,用起来捉襟见肘。平时主要是老婆在用,如果要当媒体服务器的话,要一直登录着我的账号。Fusion Drive 本来就慢,再加上一个额外的 macOS 账号登录着,跑着一些有的没的进程,更是慢上加慢。这些细节老婆也不清楚,就是觉得游戏开得慢,怨声载道。所以,我就着手另搭一台媒体服务器。 我有一台装了 Windows 的 NUC,本来是设想给它插上 eGPU 来打游戏的,无奈买的 eGPU 插上电就吱吱作响,加上工作书桌上堆得满满登登,再加上 Switch 上的游戏够我玩的了,就下电闲置了,这里刚好让它排上用场。 搬了新家以后,终于有了一个可以放电子设备的角落。我给 NUC 插上了两块移动硬盘,进系统给 Windows 简单设置了一下,确保系统不会自动休眠,远程登录正常,Plex Media Server 可以开机自动启动,一切就准备就系。 为什么没把系统刷成 Linux? 一是懒得折腾,二是万一那天想玩 PC 游戏,可以把 eGPU 插上开撸,三是其他电脑都是 macOS,有一个 Windows 系统跑着才好不要和时代脱节。 如何上传和下载? Windows 10 自带的文件共享功能足够好用了。开启之后,macOS 可以直接通过 Finder > Go > Connect to Server 挂载,挂载之后就是个本地文件夹,可以为所欲为。 远程播放媒体文件的话,推荐 Plex,出门在外也可以播放家里的影音文件。有在手机上离线的需求的话, 可以考虑购买 Plex Pass。 如何备份 NUC 上插的移动硬盘不是为 NAS 设计的,所以每周 7x24 这么跑着,相比 NAS 硬盘而言,更高可能哪天跑着就挂了。尽管重要的数据有其他备份,存在里面的数据没有那么重要,丢了还是怪麻烦的,所以我给这台主机上了份 Backblaze,作为它的远程备份。这样一旦硬盘挂了,可以从 Backblaze 恢复数据。 总结 基本上就是这些,大体上非常满意,折腾起来得心应手。一番折腾下来,最大收获是独立性。在这个视频、音频、照片纷纷被各大公司接管的今天,在本地保留一份拷贝,自由选择使用的方式,完全不受广告和推荐的打扰,实在是难能可贵。 - EOF -

2021/3/14
articleCard.readMore

2020 年订阅付费列表

2020 年,我为以下订阅内容付费: 项目 每月费用 1Password Family Plan $ 4.99 Amazon Prime $ 12.99 Audible Membership $ 14.95 Digital Ocean $ 5 iCloud Storage $ 2.99 Netflix Family Plan $ 11.99 Nintendo Switch Online Family Plan $ 3 Spotify Premium Duo Plan $ 12.99 Stratechery + Dithering $ 12.5 YouTube Premium Family Plan $ 14.99

2020/8/3
articleCard.readMore

Spotify Player

周末花时间学习了一下 React,试写了一个 Spotify 播放器。功能有限,添不添新功能随缘,Spotify 订阅用户可以一试。 访问地址:https://wangyi.ai/player Spotify Web Playback SDK 所限,不支持 Safari 以及手机上的浏览器,具体支持列表见 Spotify 官方文档。

2020/4/25
articleCard.readMore