15年5个月前IP:未同步
310566
11楼
引用第10楼ltl于2011-07-26 16:29发表的  :

谁告诉你代码是给人看的……你见过那个程序员过几天还看得懂自己的代码的……

多少年来人们一直在强调代码的可读性..
Steve McConnell哭了
Stanford 公开课程 编程方法 第二课

The important thing to realize in programming is programming is not just about writing a program that the computer understands. Programming is about writing programs that prople understand. I can't stress that enough. That's huge. That's what programming style is all about.  It's what good software engineering is all about. Writing a program that just works, that someone else can't read and understand, is actually really terrible sofrware engineering. And I've seen software companies do this where some hotshot programmer comes along and they're like, "Oh, I'm a great programmer." And they go and write some program to do something, and it works the first time and then it breaks. And then they come along and they say, "Hey, we need to actually get that program to do somthing slightly different, or we need to upgrade it." And it's written in terms of the code so badly that they can't do anyting with it, and they throw it out completely, fire the programmer, and get a team of good software engineers to actually do it. I've actually seen that happed multiple times. Okay, so write programs for people to read, not just for computers to read. Both of them need to be able to read it, but it's far more important that a person reads it and understands it. That's the first software engineering principle to think about.
评论
文号 / 310566

百炼成钢
名片发私信
学术分 1
总主题 44 帖总回复 347 楼拥有证书:学者 笔友
注册于 2006/10/31 13:24:10最后登录 2018/01/10 01:03:11
主体类型:个人
所属领域:无
认证方式:邮箱
IP归属地:0

个人简介

暂未填写
笔记
{{note.content}}
{{n.user.username}}
{{fromNow(n.toc)}} {{n.status === noteStatus.disabled ? "已屏蔽" : ""}} {{n.status === noteStatus.unknown ? "正在审核" : ""}} {{n.status === noteStatus.deleted ? '已删除' : ''}}
  • 编辑
  • 删除
  • {{n.status === 'disabled' ? "解除屏蔽" : "屏蔽" }}
我也是有底线的