Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loop invariants #220

Open
nnop opened this issue Sep 29, 2018 · 3 comments
Open

loop invariants #220

nnop opened this issue Sep 29, 2018 · 3 comments

Comments

@nnop
Copy link
Owner

nnop commented Sep 29, 2018

Cornell CS 2110 (有video)

@nnop
Copy link
Owner Author

nnop commented Sep 29, 2018

@nnop
Copy link
Owner Author

nnop commented Sep 29, 2018

如果你使用 IDE 只是为了在其帮助下写出能过编译的代码,或是为了调试改 Bug,那么我不认为你是一名合格的程序员——我认为程序员可以被分为两种:

  • 先确认前条件/不变式/终止条件/边界条件,然后写出正确的代码
  • 先编写代码,然后通过各种用例/测试/调试对程序进行调整,最后得到似乎正确的代码

我个人保守估计前者开发效率至少是后者的 10 倍,因为前者不需要浪费大量时间在 编码-调试-编码 这个极其耗时的循环上。通过白板编程,面试官可以有效的判定出面试者属于前者还是后者,从而招进合适的人才,并把老油条或是嘴遁者排除在外。

@nnop nnop added the algorithm label Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant