Senior/Junior/AI coding差異分析 (AI整理)

Junior 在完成方案。
AI 在生成方案。
Senior 在仲裁方案,必要時連「問題原本是怎麼被定義的」一起推翻。

「寫程式」不只是單純寫程式,維護對現實的模型才是關鍵。

  • Senior工程師具備的能力
  • Senior/Junior/AI之間的差異
  • 總結

Senior工程師具備的能力:

能力問的問題
Problem Model我們真正要解的是什麼問題?
Domain Model這個世界裡有哪些 object、state、relationship?
Invariants無論怎麼實作,哪些事情一定不能被破壞?
Priority Hierarchy多個目標衝突時,誰優先?
Observation Model哪些 metrics、bug、行為是真正有意義的 signal?
Causal Model我看到的現象,是什麼機制造成的?
Pattern Library過往哪些 architecture / implementation pattern 可能適用?
Trade-off Ruleslatency、memory、complexity、correctness 衝突時怎麼取捨?
Boundary Conditions這個方案在哪些條件下成立?超過哪裡就失效?
Conflict Detection新方案是否和既有 invariant / priority 衝突?
Failure Classification問題是 code bug、design bug,還是 model 本身錯?
Rollback Ability已經寫很多了,還敢不敢整個作廢?
Verificationcompiler、test、benchmark、profiler、production evidence 是否支持模型?
Model Updating新證據出現後,要不要修改原本 assumptions?

這張表不是單純「Senior 知道哪些東西」,而是 Senior 用來維持、檢查、修正現實模型的一整套能力(i.e. 維護對現實的模型)。

Code 是 output;真正累積在 Senior 身上的,是那套會持續修正的 reality model。


Senior/Junior/AI之間的差異

Senior 的優勢,不只是「內在 model 比較完整」,而是這套 model 真的具有仲裁權。

同樣看到:

  • 同一組 events
  • 同一組 metrics
  • 同一段 code
  • 同一個 bug
  • 同一個 business constraint

Senior 會把它們放進一個較成熟的狀態模型:M={invariants, priorities, observations, causal model, tradeoff rules}M = \{invariants,\ priorities,\ observations,\ causal\ model,\ tradeoff\ rules\}

然後做:ObservationModelConflict DetectionJudgmentObservation \rightarrow Model \rightarrow Conflict\ Detection \rightarrow Judgment

最後甚至得到:

「不是這行 code 錯,是我們三週前決定的 architecture 錯。」

因此他敢把 sunk cost 作廢。


Junior 的主要問題則不是「不會思考」,而是他的 MM 還不完整:

  • invariants 掛得少
  • priority hierarchy 還模糊
  • 不知道哪些 observation 是重要 signal
  • 因果模型不足
  • trade-off rule 尚未穩定
  • conflict 發生時不知道誰應該被犧牲

所以他可能看到:

memory ↑
latency ↑
code complexity ↑

卻不知道這三件事情背後其實共同指向:

ownership model 可能錯了。

於是比較容易:

memory issue → patch
latency issue → optimize
complexity → abstraction

每個問題各自 local optimize。


AI 的問題又略有不同。

它可能知道大量 invariant、architecture pattern、trade-off,甚至比 Junior 說得更多;問題在於那些東西未必構成一個持續存在而且有否決權的內部世界模型

所以 AI 很容易發生:

前面:
「這個 system 必須 single source of truth。」
後面:
「為了方便,這邊另外 cache 一份 mutable state。」

兩句各自在局部都很合理。

但沒有一個足夠強的:

WAIT.
你剛剛違反第 1 條 invariant。
停止 generation。
回去重新設計。

這就是差異。


總結

不同對象主要限制
Junior世界模型尚未成熟,所以不知道什麼該被否決
AI知識很多,但缺乏穩定、持續、有強制力的仲裁狀態
Senior世界模型較成熟,而且能讓 invariant / priority 真正否決目前方案

所以 Senior 最值錢的其實不是:

I know more solutions.

而是:

I know what must remain true, what evidence matters, which constraint wins when they conflict, and when the current model should be abandoned.

不過也要保留一個反例:只要我們把 invariants、priority、tests、architecture rules 和 rollback mechanism 外部化成 AI 系統真正不能違反的 constraints,其中一部分 Senior 的仲裁能力是可以被機器接手的。真正最難被取代的,會逐漸往上一層移:哪些 invariant 本來就值得存在?哪些 observation 應該相信?環境變了之後,哪條舊原則反而應該被刪掉?

這已經不是「寫程式」本身,而是在維護對現實的模型

探索更多來自 LifeJourney 的內容

立即訂閱即可持續閱讀,還能取得所有封存文章。

繼續閱讀