← 2026-10-10 📂 All Days 2026-10-12 →

📅 Week in Review — Week 41 (8 min read)

📊 NeetCode: 106/150 · SysDesign: 60/40✅ · Behavioral: 60/40✅ · Frontend: 37/50 · AI: 30/30✅

🔥 Day 137 — Expert Phase, Synthesis Mode!


🗓️ 本周回顾 / This Week's Journey

日期Day主题概要
Mon Oct 5—休整 / Rest week
Tue Oct 6—休整 / Rest week
Wed Oct 7—休整 / Rest week
Thu Oct 8—休整 / Rest week
Fri Oct 9—测试内容 / Test run only
Sat Oct 10137综合日 / Synthesis Day — LLM后端·最大乘积子数组·Python并发·软技能·AI新闻
本周是一个轻量周,但周六的综合内容质量非常高——将过去137天的知识点串联成一个完整的系统设计全景。
A lighter volume week, but Saturday's synthesis content was dense and high-quality — connecting 137 days of learning into one cohesive architecture picture.

🧠 系统设计:核心要点 / System Design: Key Takeaways

Day 137 主题:LLM 应用后端架构全景

这一天的系统设计做了一件很有价值的事:把过去60个系统设计主题"连线"到一个真实的 AI 产品后端中。

三大核心概念:

  1. 语义缓存(Semantic Cache)

LLM 调用 $0.01/次,缓存命中 $0.0001/次。对相似问题(不需完全相同)使用向量相似度检索缓存结果,覆盖率约 30-40%,大幅降低成本。真实系统中这是"降本最快"的一步。

Semantic caching on similar (not identical) queries reduces costs 100x. The ~30-40% hit rate makes this the fastest ROI optimization in LLM backends.

  1. 流式响应(Streaming / SSE)

不等完整结果,SSE 流式推送 token,将 TTFB 从 2s 降到 200ms。这是用户体验的分水岭——用户感知到"在回答"和"还没回答"的区别。

Streaming SSE drops perceived latency from 2s to 200ms — the difference between "it's thinking" and "it's broken."

  1. 多模块串联(Module Integration)

一个 AI 编程助手后端用到了过去60天覆盖的几乎所有模块:API Gateway(Day 16)、Rate Limiter(Day 17-18)、Load Balancer(Day 4)、Redis Cache(Day 6)、Message Queue(Day 13)、Vector DB(RAG)、Distributed Tracing(Day 68)、Circuit Breaker(Python Craft)、Multi-region Active-Active(Day 54)。

No topic in system design is isolated. Real systems are always module combinations — this week's synthesis proved it.


💻 算法:模式总结 / Algorithms: Patterns Mastered

Day 137 题目:#152 Maximum Product Subarray(Medium)— 1-D DP 模式第 9/12 题

模式进度(1-D Dynamic Programming):9/12 完成

  • Day 127: #70 Climbing Stairs → dp[i] = dp[i-1] + dp[i-2]
  • Day 129: #198 House Robber → dp[i] = max(dp[i-1], dp[i-2] + nums[i])
  • Day 131: #213 House Robber II → 环形数组分两段
  • Day 132: #5 Longest Palindromic Substring → 二维 DP
  • Day 133: #647 Palindromic Substrings → 中心扩展
  • Day 134: #91 Decode Ways → 条件版斐波那契
  • Day 136: #322 Coin Change → 完全背包
  • Day 137: #152 Maximum Product Subarray ← 本周新解锁

本周核心洞察(Key Insight):

乘法 DP 的"陷阱":负数 × 负数 = 正数,所以必须同时追踪当前最大值和当前最小值。最小值随时可能翻身成最大值(当下一个数是负数时)。

# 关键技巧:一次遍历,同时维护 max 和 min
for n in nums[1:]:
    candidates = (n, cur_max * n, cur_min * n)
    cur_max = max(candidates)
    cur_min = min(candidates)
    result = max(result, cur_max)

规律总结: 当操作不是单调的(乘法、异或等),考虑同时维护多个 DP 状态。这是从加法 DP 到乘法 DP 的关键跨越。

Pattern: When the operation isn't monotonic (multiplication, XOR), maintain multiple DP states simultaneously.


🗣️ 软技能:练习重点 / Soft Skills: What to Practice

Day 137 场景:当你满怀信心的技术决策被事后证明是错的

这道题超越了标准"我犯了个错"的框架,考察的是 Senior/Staff 工程师的自我意识、透明度、以及系统性学习能力。

本周覆盖的核心场景:

  • 技术选型失误(Postgres sharding hot spot 在 5× 流量下暴露)
  • 如何在团队和 stakeholder 面前承认错误
  • 带方案,不带问题(三条修复路径 + 风险评估)
  • 将个人错误转化为团队 checklist(blameless postmortem)

Senior vs Staff 的区别点(需要练习):

  1. 速度:承认错误要快,不要等问题更大
  2. 校准感(Calibration):你知道自己的判断在哪些情况下可能失效——这比"从不出错"更值钱
  3. 机制化:个人错误 → 团队决策 checklist → Staff 级影响力

练习建议: 回顾一个你做过但现在会做不同决策的技术选型,按 STAR 框架写一段 2 分钟的口述。重点练习"我当时没有考虑到 X"的自我归因表达,以及后续的修复动作描述。

Practice: Recall a past technical decision you'd make differently. Narrate it in 2 minutes with STAR, focusing on self-attribution ("I didn't account for X") and systematic fix.


🎨 前端:知识巩固 / Frontend: Concepts to Lock In

本周无新前端内容(轻量周)。当前进度:37/50,还有 13 个主题待覆盖。

建议自查(复习 Day 34-37 的 React 性能系列):

  • [ ] 你能解释 React.memo、useMemo、useCallback 三者的应用场景差异吗?
  • [ ] 什么情况下虚拟化(Virtualization)是必要的?
  • [ ] Code Splitting 的 React.lazy + Suspense 模式能徒手写出来吗?

下周预计覆盖的前端主题: 继续推进 React 高级模式或框架深度内容。

No new frontend content this week. Self-check: Can you explain the React.memo / useMemo / useCallback triangle without notes?


🤖 AI:本周亮点 / AI: What Stuck

Day 137 AI 新闻(来源网络搜索,数据标注"据报道"):

三大新闻:

  1. 据报道,智能体 AI(Agentic AI)时代全面到来

行业焦点从"对话式 AI"转向"自主完成多步骤任务"的智能体系统。Microsoft Copilot 推出按量付费智能体(据报道),Replit Agent 4 据报道让非程序员可通过自然语言构建并部署软件。

Reportedly, the industry pivot from chat AI to agentic AI is complete — systems that autonomously execute tasks across apps.

  1. 据报道,新模型密集发布

据报道本周新模型包括:OpenAI GPT-6.1 Sol(高性价比编程场景)、Anthropic Claude Opus 5.5、Mistral Large 4(据报道万亿参数 MoE 多模态,欧洲开发托管)、Google Nano Banana 2.1。Mistral Large 4 万亿参数仍可实用,印证了稀疏激活(MoE)架构正主导超大模型设计。

Reportedly, Mistral Large 4 at 1T parameters being practical validates MoE (sparse activation) as the dominant architecture for large models.

  1. AI 内容水印与治理

据报道 OpenAI 在欧洲为 ChatGPT 生成文本嵌入不可见水印,Google 扩展 SynthID 验证系统。核心工程挑战:水印要对抗改写、翻译、截断攻击,同时不影响文本质量。

Reportedly, AI watermarking faces robustness vs. quality tradeoffs — paraphrasing, translation, and truncation attacks can all defeat naive implementations.

工程师最重要的 takeaway: 智能体化意味着你的 API 需要"智能体友好"——幂等性、明确的错误信息、细粒度速率限制、可审计的执行链路。


🐍 Python Craft:本周技巧 / Python Craft: This Week's Skill

Day 137 主题:Python 并发三大模型终极对比

这是系统学习 Python 并发的最佳总结——threading、multiprocessing、asyncio 一张决策树打通:

任务类型? ├─ CPU 密集型(矩阵、加密、图像)→ multiprocessing.Pool(真正并行,突破 GIL) ├─ I/O 密集 + async 库支持 → asyncio(单线程,最低开销,最高并发上限) ├─ I/O 密集 + 同步库(requests) → ThreadPoolExecutor └─ 混合型(I/O + CPU) → asyncio + ProcessPoolExecutor 组合

关键陷阱: 在 asyncio 中调用 time.sleep() 会阻塞整个事件循环!正确做法:await loop.run_in_executor(None, blocking_func)。

The cardinal sin: calling blocking code inside async functions. Use run_in_executor to push sync code into threads.


⚠️ 需要复习的内容 / What to Review

  1. 1-D DP 剩余题目(3/12 待完成):#139 Word Break、#300 LIS(Longest Increasing Subsequence)。这两题模式各有变体,LIS 有 O(n²) 和 O(n log n) 两种解法,后者需要二分搜索,难度更高。建议下周集中完成。
  1. Python asyncio 陷阱实战:本周覆盖了理论,建议动手写一个"在 asyncio 中误调同步阻塞函数"的例子,亲自感受卡死的效果,再用 run_in_executor 修复——肌肉记忆比读代码更可靠。
  1. 前端进度落后:37/50,距离完成还有 13 个主题,但本周没有推进。需要注意不要让前端部分进度过于滞后于其他模块。

Top review priority: Finish the 1-D DP block (2 problems left) and squeeze in 1-2 frontend topics next week.


🏆 本周亮点 / Win of the Week

系统设计毕业级综合 🎓

Day 137 的系统设计内容达到了课程的一个里程碑——把过去 60 个系统设计主题用一个 AI 编程助手后端串联起来,画出了完整的架构图,并且标注了每个模块对应的学习日。这不是新知识,而是知识整合能力的体现。

能从零画出这张图,解释每个模块的选型理由和权衡,就已经具备了通过 Staff 级系统设计面试的基础能力。

🎉 系统设计:60/40,超额完成!行为面试:60/40,超额完成!AI:30/30,全部完成!三大模块已满!

The week's synthesis diagram — mapping 60 system design topics onto one real AI backend — represents a graduation milestone. Being able to draw that from memory and explain every tradeoff is Staff-level system design.


🎯 下周预告 / Next Week Preview

模块预计内容
算法1-D DP 最后 3 题:#139 Word Break、#300 LIS(含二分优化)、#152 变体巩固 → 完成 1-D DP 模块后进入 2-D DP
系统设计综合模式持续:可能进入最终 mock interview 形式的综合演练
Python Craft综合阶段:分布式系统相关 Python 工具或测试工程深化
前端补足进度:目标推进 2-3 个主题(建议 Next.js 或 TypeScript 高级内容)
AI新闻速递 + 可能深入智能体架构(Agent Architecture)主题
重点提醒: 1-D DP 模块只剩 3 题,下周有望完整闭环——这将是第一个从 Easy 到 Hard 全部刷完的算法大模块!
Key milestone incoming: Completing the 1-D DP block (12/12) next week would be the first full algorithm pattern completed end-to-end.

byte-by-byte · Week 41 · Day 137 · Expert Phase 🔥