写作与思考2009artima.com
写软件就像……写作
Writing Software is Like ... Writing
导读
这篇短文把写软件类比为写作,讨论两者在创作过程和审美标准上的相似。评论者进一步列出适用于代码与写作的若干美学准则,值得写作者借鉴其尊重读者、追求简洁与整体质量的思路。
可以直接用的写作要点
- 01
别让读者白费力气:任何复杂、意外或需要思考之处,都应给读者相应回报。
- 02
能用一个好词或好句替代华丽章节时,就做替换;冗长会稀释优点、放大缺点。
- 03
质量是多维度、全尺度的,任何视角的缺陷都会拉低整体,写作者要在各方面力求胜任。
- 04
创新和破例都应有焦点和目的,否则只会增加读者负担。
HN 评论精选
写作与写代码共享一套美学准则:尊重读者投入、追求简洁连贯、质量全尺度一致、创新与破例须有目的。
他认为代码与写作最明显的相似在过程,并列出几条两者通用的美学准则:不能让读者费很大劲却不给回报;质量在多个维度和所有尺度上都可见,任何视角的缺陷都影响整体;读者追求简单和连贯,比如角色行为出乎意料时,读者会努力将其协调为连贯可信的人,角色可以多面和动态,但彻底疯狂要慎用(角色如此,对象、类和函数也如此);冗长稀释优点、放大缺点;如果美丽章节可被好句子替代,或美丽句子可被好词替代,就必须替换(这可能不适用于所有写作,但适用于所有代码);创新受欢迎,但应有焦点和目的;偏离规则也欢迎,但同样应有焦点和目的。
dkarl查看英文原文
I'm sure thousands of words could be written about why code is like writing. The similarity in process is what strikes me most, but I found it easier to write up a few aesthetic guidelines that apply to both. 1. You mustn't make your readers think hard without rewarding them for their effort. 2. Quality is apparent in many dimensions and at all scales. Defects from any perspective affect the quality of the work as a whole. Writers have strengths and weaknesses, but must strive for competence by every measure. 3. Readers strive for simplicity and coherence. For instance, if a character behaves in an unexpected manner, readers will try very hard to reconcile the character's behavior as the actions of a coherent, believable individual. Characters can be multifaceted and dynamic, but outright insanity should be used with caution. (See rule 1. What is true of characters is also true of objects, classes of objects, and functions.) 4. Verbosity dilutes good qualities and amplifies bad ones. (See rule 1.) 5. If a beautiful chapter can be replaced with a good sentence, or a beautiful sentence can be replaced with a good word, then the substitution must be made. (This may not be true for all writing, but it is true of all code.) 6. Innovation is welcome, but should be focused and purposeful. (See rule 1.) 7. Deviation from these rules is welcome, but should be focused and purposeful. (See rule 1.)
同类还值得读
不要想好再写,要写来思考
Don’t think to write, write to think
这篇短文主张不要把写作当成思考完成后的记录,而要把写作本身当作思考的工具:动笔的过程会逼出想不清楚的地方。
写作与思考2022 · 553 分 · 145 评4 条写作要点编辑精选写作即思考:学会自信地写作
Writing Is Thinking: Learning to Write with Confidence
这是一篇讲“写作即思考”的博客:作者认为写作不是把想好的东西誊写出来,而是借助写作本身把想法想清楚,因此写作者应当建立信心、敢于先写烂稿。
写作与思考2019 · 529 分 · 83 评4 条写作要点编辑精选如何用写作来思考
How to think in writing
这篇文章讨论的是「用写作来思考」:作者认为写作不只是把想清楚的东西表达出来,更是想清楚本身的工具——文字落在纸上,你才有机会看见自己思路里的跳跃、含混和漏洞。
写作与思考2024 · 424 分 · 120 评4 条写作要点编辑精选写作,帮你逃离默认的人生设置
Write to Escape Your Default Setting
文章的核心主张就写在标题里:写作是帮你逃离「默认设置」的手段——日常的思维和表达都有惯性默认的默认模式,而落笔能逼你跳出来,重新看清自己到底在想什么、要说什么。
写作与思考2025 · 407 分 · 93 评4 条写作要点编辑精选写作就是思考
Writing is thinking
文章以“写作即思考”为题,讨论写作不只是把已有想法记录下来,而是帮助澄清、组织和推进思考的过程。
写作与思考2025 · 330 分 · 128 评4 条写作要点编辑精选