Go homepage(回首页)
Upload pictures (上传图片)
Write articles (发文字帖)

The author:(作者)
published in(发表于) 2013/11/12 12:32:31
Law of programming June

Law of law of programming in June-June, programming, programmer-it information Law of programming June

Last week, I was forced to make some changes to an old project. The trouble is, when you started, I really can't remember exactly how old this item.

This one I actually use Codeigniter to achieve first MVC project. Open the project file, a lot of things are making me dizzy. First, there is no version control, second, there is no comment.

Reading the code, my "F*CK/minutes" project has been started to break through the roof.

Very few Model projects. Controller has a lot of duplicate code, View mast creepy. I believe the logical View is actually better than Model and Controller layers add up to much.

Should I be ashamed?

The answer is NO. (If it were, I wouldn't be writing this blog. )

And why not?

Because there is a law of June. June law says is that every programmer should look back at their own 6 months ago to write code, and should be rejected at that time to write the code.

That brings the focus of this article: If you're a programmer, when you look at 6 months ago when I wrote the code, if you find the same as now write the code level, please don't write, you should learn some new things.

That's why when I saw the previous write ugly code, but am glad that reason. Very happy. That means my progress. So, instead of feeling shame for those ugly code, rather than delighted to accept them, it means you are growing up.


(

编程的六月定律 - 六月定律,编程,程序员 - IT资讯
编程的六月定律

上周,我被迫对一个很老的项目做一些修改。麻烦是,当开始着手时,我真的记不清这个项目究竟有多老了。

这实际上是我使用Codeigniter实现的第一个MVC项目。打开项目文件后,很多东西都让我头晕。首先,没有版本控制,第二,没有注释。

读起代码,我的“F*CK/分钟”的值一直冲破屋顶。

项目里面的Model很少。Controller层有大量重复的代码,View层肥大的令人毛骨悚然。我相信View层里的逻辑实际上比Model层和Controller层的加起来都要多。

我该为此感到羞耻吗?

答案是NO。(如果是的话我也不会写这篇博客里。)

为什么不?

因为有个六月定律。六月定律说的是,每个程序员都应该回头看看自己6个月前写的代码,并且应该会唾弃当时写的那些代码。

这就引出了本文的重点:如果你是个程序员,当你看6个月前写的代码时,如果发现跟现在写代码的水平一样,请别写了,你应该学习一些新东西了。

这就是为什么当我看到以前的代码写的奇丑无比时反而很高兴的原因。非常高兴。这说明我进步了。所以,与其为那些丑陋的代码感到羞耻,不如高兴的接受它们,这意味着你在成长。


)


If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)





QQ:154298438
QQ:417480759