
poteto@poteto
程式碼庫裡一直都有隨便亂寫的東西。我們一直都能接受,因為除了任務關鍵的「硬」軟體(例如嵌入式),程式碼很少需要完美。 swe 是一種很特別的工程,因為你常常在打造一個不斷演化、幾乎像有生命的東西——使用者口味會變,你的心智模型會變,功能來了又走。 老實說,我和很多寫了很久程式的人一開始(像是 2024 年那時候)都懷疑 agent 會不會寫正式環境的程式碼。「那我們漂亮的程式碼庫裡混進來的那些垃圾怎麼辦?」 可是以前就有人類寫的垃圾,而且多得是!說真的,大多數人把「不是我寫的程式碼」叫垃圾。現實是 99% 的人(包括我自己)根本不知道好程式碼長什麼樣,更別說寫得出來。我認為好程式碼是: • 正確 • 沒有 bug • 跑起來又快又省成本 真正的好程式碼一直以來都又難又貴,因為有很長一段時間(也許 @bendlang 會改變這件事),程式碼並不是能便宜、形式化地保證同時具備這三個特性。這就是為什麼寫硬軟體更難更貴,因為看用途,你可能只有一次機會,所以一開始就得對。 但我們用的大多數軟體並不需要是好程式碼才有價值。事實上,我們用的軟體很可能大多都無法形式化驗證!我們用一些 bug 換速度和進展,所以靠測試和 o11y,採取更迭代的做法。這是好事! agent 幫我們跑得更快,如果你願意接受,它也能幫我們寫出更好的程式碼。它不會是「好程式碼」(那還是很貴),但平均來說、規模化之後很可能好得多。 swe 的新手藝就是搞懂怎麼做到這件事。現在這是你的工作了!如果你用不用 agent 的生產力沒差多少,那你是哪裡做錯了。但現在接受它、把它當成學一整棵新技能樹的機會,還不算太晚。
codebases have always contained slop. we have always been okay with this because code rarely needs to be perfect, outside of mission critical "hard" (eg embedded) software.
swe is a unique form of engineering because you're often building something that constantly evolves and is almost organic - user tastes change, your mental models evolve, and features come and go.
admittedly, i and many others who've been coding for a long time were initially (like back in 2024) skeptical that agents would write production code. "but what about all the slop that would enter our beautiful codebase?".
well, even before, we had human slop, and there was a lot of it! if we're being truthful, most people call "code i didn't write" slop. the reality is that 99% of people (i include myself in that number) don't even know what Good Code looks like, let alone be capable of writing it. i would propose that Good Code is:
• correct
• bug free
• fast and cost efficient to run
it has always been exceedingly difficult and expensive to write truly Good Code, because for the longest time (maybe @bendlang will change that), code was not something you could cheaply and formally guarantee to have all 3 of these properties. this is why writing hard software is much more difficult and expensive, because depending on the use case, you may only get one chance and so you have to be right from the start.
but the vast majority of software we use does not need to be Good Code to provide value to users. in fact, it is very likely that most software we use is not formally verifiable! we accepted some bugs in exchange for velocity and progress, so we rely on tests and o11y instead and have adopted a more incremental approach. this is a good thing!
agents help us move faster, and if you're open to the idea, are capable of helping us write better code. it won't be Good Code (that is still expensive), but it is likely to be much better on average at scale.
the new craft of swe is to figure out how to do this. it's your job now! if your productivity with and without agents is not significantly different, you're doing something wrong. but it's not too late to embrace it and use it as an opportunity to learn a whole new skill tree
