在看代码之前我们必须考虑好我们要做什么和怎么做。
Before peeking at the code, we must have an idea of what we are supposed to do and how.
现在看一下生成这个漂亮页面的代码(见清单3),首先从页面顶端开始。
Now look at the code (in Listing 3) that generated this beautiful page, starting with the top of the page.
让我们在这个列表上运行归并排序,然后我们在看一下代码。
Let's run merge sort on it, and then we'll look at the code.
Well there are a couple of interesting intermediate values here, right? There's tmp.
回去再看第一段代码,那么在这里我该关注什么呢?
Because there will not be time to look at that code for the first time during the quiz, and figure out what it's doing.
因为在考试中,是没有时间去第一次看代码,并弄懂它的意思的。
At least you maybe finding that and if not when you look back at the code you then have written you'll realize that in fact it just requires a few lines of code.
至少你会发现这一点,不然的话,在你写完代码,返回去,看的时候你会意识到,实际上它只需要几行代码。
应用推荐