← 回到動態
poteto@poteto

滿有趣的,好多人回我說可維護性跟整潔程式碼還是很重要。我倒覺得這已經不成立了,大家都該更新一下先驗,重新想想 2026 年的「好程式碼」到底是什麼意思。 整潔程式碼一直都是有代價的——效能。各種間接層、讓程式碼對人類好讀好懂,這些都不是免費的,常常要犧牲效能。我們以前能接受,是因為有摩爾定律,而且大部分程式碼都不在熱路徑上。 這些原則也來自人類維護程式碼的年代。那時候為人類優化很合理,但現在代理已經在寫所有程式碼了,就沒那麼合理了。我們其實很可能會發現、想出新的原則:對代理友善的架構原則(我打算很快多寫一些這方面的想法)

it's very interesting how many replies i've gotten about maintainability and clean code being still important. i would argue that that is no longer true and we all need to update our priors on what Good Code really means in 2026. clean code has always come at a cost - performance. indirection and making code readable/understandable for a human is not free, it often comes at the cost of worse performance. we have historically been okay with this because of Moore's Law and the fact that most code is not on the hot path. these principles also came from a time where humans maintained code. it made sense to optimize for humans then, but it makes less sense now when agents are already writing all the code. we will in fact probably discover and come up with new principles: principles of agent friendly architecture (i plan to write more thoughts about this soon)
動態
poteto
滿有趣的,好多人回我說可維護性跟整潔程式碼還是很重要。我倒覺得這已經不成立了,大家都該更新一下先驗,重新想想 2026 年的「好程式碼」到底是什麼意思。 整潔程式碼一直都是有代價的——效能。各種間接層、讓程式碼對人類好讀好懂,這些都不是免費的,常常要犧牲效能。我們以前能接受,是因為有摩爾定律,而且大部分程式碼都不在熱路徑上。 這些原則也來自人類維護程式碼的年代。那時候為人類優化很合理,但現在代理已經在寫所有程式碼了,就沒那麼合理了。我們其實很可能會發現、想出新的原則:對代理友善的架構原則(我打算很快多寫一些這方面的想法)
← 回到動態