读后感:真正编程的力量
读到 coding horror (不知道中文翻译是什么,“代码恐慌”?) 中的文章 Real Ultimate Programming Power
文中讲到了软件开发中的方法论和其的演化,但是最让人觉得有意思的是两个引述:
The majority of developers do not suffer from too much design patterns, or too much SOLID, or agile, or waterfall for that matter. They suffer from whipping out cowboy code in a pure chaos environment, using simplistic drag & drop, data driven, vb-like techniques.
翻译: 让大多数软件开发者痛苦的,不是过多的设计模式,过多的SOLID(见注解), 过多的敏捷开发,或者瀑布模型;让大多数开发者痛苦的是在混乱的环境中用低级方式除去代码仙人留下来的古怪代码(好吧,这是我对cowboy code的曲解)。
But here’s the paradox: the types of programmers who would most benefit from these guidelines, rules, principles, and checklists are the least likely to read and follow them. Throwing a book of rules at a terrible programmer just creates a terrible programmer with a bruise on their head where the book bounced off.
翻译:…悖论的是,那些最能够从编程指导,规矩,原则和核对清单等方法中收益的人往往是那些最少读这些东西的人。把一本有关编程原则的书扔向一个烂程序员,顶多也就是让他脑袋上多一块淤青,书被弹回来而已。
流程对生产软件的作用可能是只有站在改造IBM的Peter Drucker那个高度的人才有价值的(但是,当你站在足够远的地方,地球不也就是一个蓝色的小点儿么?) 一个好的软件的产生,往往还是需要英雄人物的带领,剩下来的,还是人的问题。
附录:文中引到了一个很有价值的书目 (reading list): 从《代码大全》,《人月神话》,《点石成金》到《编程珠玑》、《精通正则表达式》,值得一览,在去书店的路上或者在当当网上闲荡的时候可以回顾一下。
SOLID:
five principles are principles of class design. They are:
SRP
The Single Responsibility Principle
A class should have one, and only one, reason to change.
OCP
The Open Closed Principle
You should be able to extend a classes behavior, without modifying it.
LSP
The Liskov Substitution Principle
Derived classes must be substitutable for their base classes.
DIP
The Dependency Inversion Principle
Depend on abstractions, not on concretions.
ISP
The Interface Segregation Principle
Make fine grained interfaces that are client specific.
转载于酷壳CoolShell 无删改 仅以此纪念陈皓(左耳朵耗子)
www.huohuaai.com 给提提意见 502 Bad Gateway 无法注册 502 注册劝退 哈哈 www.huohuaai.com/api/v1…
服务器是 aws m8g.2xlarge 8 核 32GB 内存 整个服务器上就一个 Docker ,里面运行这个服务 以前 .NET 5 的都是秒编译 现在经常要半个小时,有…
先给 V 站大佬们汇报一下所谓"最优平衡"的思路,纯粹从个人的"穷+我全都要"的立场出发。若不合理还望指正并轻拍。要点如下: 安全+便捷角度 1 )不用 RAID5 ,大容量单…