惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Attack and Defense Labs
Attack and Defense Labs
V2EX - 技术
V2EX - 技术
O
OpenAI News
S
Secure Thoughts
H
Heimdal Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Schneier on Security
Schneier on Security
H
Hacker News: Front Page
S
Security Affairs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Proofpoint News Feed
The Register - Security
The Register - Security
GbyAI
GbyAI
Cloudbric
Cloudbric
MongoDB | Blog
MongoDB | Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
K
Kaspersky official blog
Forbes - Security
Forbes - Security
Y
Y Combinator Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Scott Helme
Scott Helme
Hacker News - Newest:
Hacker News - Newest: "LLM"
The Cloudflare Blog
Recorded Future
Recorded Future
人人都是产品经理
人人都是产品经理
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
Webroot Blog
Webroot Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog
T
Tor Project blog
Microsoft Azure Blog
Microsoft Azure Blog
博客园_首页
Hacker News: Ask HN
Hacker News: Ask HN
Blog — PlanetScale
Blog — PlanetScale
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog RSS Feed
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
I
Intezer
V
V2EX
T
Tailwind CSS Blog
SecWiki News
SecWiki News
NISL@THU
NISL@THU
C
Check Point Blog

博客园 - Easy Company

如何取得显示实现方法的MethodInfo SQL Server 2008中许多兼容性上的问题 Mock 对象何时使用? ThreadPool 在.Net 2.0 SP1中的部分变化可能会让你的程序停止工作 目前不能使用SQL Server 2008 CTP February 2008存储Team Foundation Server 2008的数据 Javascript操作在各浏览器下的性能比较 WCF Web 编程模型资源 在按钮点击后禁用它直到操作完成 - Easy Company - 博客园 ASP.NET 2.0中使用强类型访问PreviousPage属性页的控件 Silverlight 与 Microsoft ASP.NET Futures (July 2007) 更新 VS 2008 和.NET 3.5 Beta 2 安装注意事项 Partial Methods CIL(Common Intermediate Language)指令集 刚刚下载了 Visual Studio 2005 Service Pack 1 (SP1) 使用 Facade 设计模式管理 ASP.Net Session 变量 .Net 中的日志 使用 Membership 时获取用户的最后登录时间 How To 推荐用于 AJAX 页面的进度指示器图片
代码行数引起的思考
Easy Company · 2007-12-27 · via 博客园 - Easy Company

今天读了 Steve Yegge 的 Code's Worst Enemy  触动了我,将自己的看法也记录下来。

Steve Yegge 说“......I believe, quite staunchly I might add, that the worst thing that can happen to a code base is size.”。

我觉得庞大的代码库是极难维护的,而且不断的维护只会让它越来越大。

“......My minority opinion is that a mountain of code is the worst thing that can befall a person, a team, a company. I believe that code weight wrecks projects and companies, that it forces rewrites after a certain size, and that smart teams will do everything in their power to keep their code base from becoming a mountain. Tools or no tools. That's what I believe.”

多年的工作让我非常认同他的观点:山一样的代码是一个人、一个团队、一家公司所以遭遇的最严重的灾害。

当 团队、公司的开发成员不断的流动时,原有的代码库只能越来越大。某些功能的实现其实它已经存在,可是因为你对它的不了解、甚至忘了它们的存在。到了那个时 候,你将(不可避免地)编写它的新实现。试想去搞清楚一个包含多个项目的解决方案,它的代码在100,000行左右,你需要多长时间。可是100,000 并不是最终的值,它还在因为需求、bug等原因在不断的增加。尝试辨认出总体的结构可能就要花费数周甚至数月,这取决于信息的密度。重大的架构变更可能需 要数月甚至数年。

.net framework 的版本在不断的更新,每一次都会增加一些帮助程序员减少代码行数的内容,如2.0中的 C# 关键字 yield、3.5中的 LINQ 等等。但每一次版本的变更对于部分程序员来说都是痛苦的,因为他们要去学习新的东西。在新的开发工具和框架版本出现时,我见过的对于在先前版本中编写的程 序最多的作法,也只是简单的迁移而不是用新版本的语言去升级。即使它漏洞百出,也是如此。

或许我是错的但到目前为止我还是坚信:不仅是在架构设计上,在程序的任何脚落都要保持简单。简单的才是最好的!

KEEP IT SIMPLE!!!