The Clean Coder 代码整洁之道 程序员的职业素养(不是 The Clean Code)

《The Clean Coder》是《The Clean Code》的延续,聚焦于程序员的专业精神。书中强调了持续重构、练习编码、正确预估工时、TDD的重要性,以及如何识别和避免开发中的陷阱。提倡敢于说不、明确承诺与预估的区别、避免在状态不佳时编码,同时倡导结对编程和代码审查作为提升团队能力的方式。
摘要由CSDN通过智能技术生成

The Clean Coder 是The Clean Code的姊妹篇,由同一个作者编写,The Clean Code主要讲述如何编写高质量的代码,而The Clean Coder则关于于人,讲述如何做一个”专业“的编码人员。
以下是我看完此书的一些笔记,做个小记。

  1. 持续重构:无论什么时候看到坏味道的代码,重构它,不要以”怕影响线上功能“为理由,如果想保证代码的高质量,只有不断的,无情的重构。同时,为了能保证重构前后代码的等效性,完备的测试代码是必不可少的。
  2. 练习编码:就像运动员需要训练、棋手需要对弈一样,程序员需要不断练习。这里的练习不是找尚未解决的问题,而是重复地练习固定的题目,只求越来越熟悉,直到训练出编写固定题目再无任何冗余动作的地步。它旨在练习手指和思路,还有工具的熟练程度。TDD、算法、固定起手式,都可以练习。并且练习可以结对进行,比如一人写测试用例,一人写实现,二者交换角色。这有助于练习结对编程。
  3. 对于工时预估:不可能准确的,但是专业的编码人员能识别延期的风险,最大限度告诉外界,给外界正确的预期。所以,我们要:
    1. 大胆说不,完成不了的时候,强硬的说完不成,只能做到预期功能的几分之几
    2. 要求告知工时的时候,区分 ”承诺“和”预估“ 能完成的时间,承诺必须遵守,而预估是一个可以不断修正的模糊值。
    3. 讲工时拆分,拆开为乐观估计、一般估计、悲观估计,三者综合考虑,或者仅仅考虑一般估计和悲观估计的加权平均(4:1)
    4. 如果发现进度落后&#
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Robert C. Martin, "The Clean Coder: A Code of Conduct for Professional Programmers" Prentice Hall | 2011 | ISBN: 0137081073 | 256 pages | PDF | 6 MB Programmers who endure and succeed amidst swirling uncertainty and nonstop pressure share a common attribute: They care deeply about the practice of creating software. They treat it as a craft. They are professionals. In The Clean Coder: A Code of Conduct for Professional Programmers, legendary software expert Robert C. Martin introduces the disciplines, techniques, tools, and practices of true software craftsmanship. This book is packed with practical advice—about everything from estimating and coding to refactoring and testing. It covers much more than technique: It is about attitude. Martin shows how to approach software development with honor, self-respect, and pride; work well and work clean; communicate and estimate faithfully; face difficult decisions with clarity and honesty; and understand that deep knowledge comes with a responsibility to act. Readers will learn: - What it means to behave as a true software craftsman - How to deal with conflict, tight schedules, and unreasonable managers - How to get into the flow of coding, and get past writer’s block - How to handle unrelenting pressure and avoid burnout - How to combine enduring attitudes with new development paradigms - How to manage your time, and avoid blind alleys, marshes, bogs, and swamps - How to foster environments where programmers and teams can thrive - When to say “No”—and how to say it - When to say “Yes”—and what yes really means Great software is something to marvel at: powerful, elegant, functional, a pleasure to work with as both a developer and as a user. Great software isn’t written by machines. It is written by professionals with an unshakable commitment to craftsmanship. The Clean Coder will help you become one of them—and earn the pride and fulfillment that they alone possess.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值