« trac+apache+ldap验证 | Main | 手机丢了(值得学习)zz »

你如何知道一个函数或者方法太大了呢?zz

有一个人去一个公司面试一个编程的工作,面试官问他一个经典的问题: “你如何知道一个函数或者方法太大了呢?” 他回答说:“我不喜欢任何比我的脑袋还大的函数。” 面试官说:“你的意思是你的脑袋不能记住所有的细节?” 他说:“不。我的意思是,我把脑袋靠在屏幕上,代码看起来不应该比我的脑袋大。”

Comments (3)

johnpupu:

你如何知道一个函数或者方法太大了呢?
有英文嗎?
方法太大了?

方法: method,java的术语。相当于C++的member function.

以前有人说.一个方法如果需要滚屏就要考虑扯小.

没想到还有更经典的

Post a comment

Advertise

About

This page contains a single entry from the blog posted on August 28, 2006 10:53 PM.

The previous post in this blog was trac+apache+ldap验证.

The next post in this blog is 手机丢了(值得学习)zz.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by
Movable Type 4.01