Don't diddle code to make it faster—find a better algorithm.
不要为了使代码更快而胡乱编写代码——要找到更好的算法。
Breaking down problems into bite-sized chunks and using code to solve them becomes normal.
将问题拆解成更小的模块并使用代码来解决,这变得很普遍。
In one case, the professor didn't require students to buy a textbook, just an access code to turn in homework.
有一次,教授并没有要求学生购买教科书,只是需要作业提交的访问码。
The code to access the program cost $120—a big sum for Harper, who had already put down $450 for textbooks, and had rent day approaching.
获得进入这个程序的代码花费了120美元——这对哈珀来说是一笔大数目,因为她已经付了450美元的课本费,而且马上就要交房租了。
But the code to access the program cost $120—a big sum for Harper, who had already put down $450 for textbooks, and had rent day approaching.
但是进入这个程序的代码花费了120美元——这对哈珀来说是一笔大数目,因为他已经付了450美元的课本费,而且马上就要交房租了。
代码有多容易阅读?
编写代码以使测试通过。
The page shows the code to include.
该页面显示需要包含的代码。
The code to do this is shown below.
处理这种工作的代码如下所示。
扫描二维码,获取这个应用。
Much more code to develop and maintain.
需要开发和维护的代码多得多。
Click the code to see how it looks.
点一下这些代码看看怎么样。
Now, add more code to the controller.
现在,您可以向控制器中添加更多的代码。
You write the code to draw all the objects.
然后再编写代码来绘制这些对象。
The updated code to do that is in Listing 5.
在清单5中,更新的代码可以执行此操作。
Listing 1 shows sample code to achieve this.
清单1显示了实现这一点的样本代码。
We're going to add some new code to this file.
我们来添加一些新代码到这个文件中。
Here is sample code to illustrate this method.
下面是说明这种方法的样本代码。
Listing 10 shows the code to do just that.
清单10显示了实现这一点的代码。
Listing 16 shows the code to perform this task.
清单16给出执行此任务的代码。
Write just enough code to make the test compile.
编写足够的代码以使测试进行编译。
They refactor code to make it more testable.
他们重构代码,让代码更加易于测试。
Extract the source code to the build machine.
将源代码提取到用于构建的计算机上。
Provided with the framework code to sort the list.
提供了框架代码来将列表分类。
Get the migrated code to work and leave it at that.
使迁移后的代码能运行并就让它那样就行了。
You need to write code to handle this scenario.
您需要编写代码来处理这种情况。
Now you need some code to display the messages.
现在您需要编写代码来显示消息。
We also need to add code to process the output.
我们还需要添加代码来处理输出。
We also need to add code to process the output.
我们还需要添加代码来处理输出。
应用推荐