For large companies this is a big deal since they typically like to create architectures that help them re-use code in different applications.
对大公司来说这很重要,因为他们一般喜欢创建能帮助他们在不同的应用中重用代码的架构。
For common validation concerns, such as E-mail validation, this approach can support design philosophies where code re-use and consistent application behavior are of utmost importance.
对于常见的验证问题,如电子邮件验证,这种方法可以支持这样一种设计理念,即代码重用和一致的应用程序行为是最重要的。
That's a possibility in this case, but you probably wouldn't perform this refactoring until you actually needed to re-use this code.
那就有可能是需要重构的原因了,不过除非真的需要重用这部分代码,否则您很可能并不会执行重构。
By the time you get to the end of the term, you're going to be dealing with some fairly complex things, so one of the things you're going to see is, we're going to make heavy use of libraries, or code written by others.
当你临近期末的时候,你们将要解决一些,相当复杂的难题,因此你们将会看到的其中一点是,我们要充分利用图书馆,或者别人编写的代码。
When we start building up code, we're going to use commands. Or statements.
当我们写代码的时候,我们会用到命令或者声明。
I stress it in particular because I know you're all going to get into this stage; you've got a problem set due in a couple of hours, you're still writing the code, you don't want to waste time, and I'm going to use quotes on "waste time", doing those extra things to do the defensive programming, you just want to get the darn thing done.
我特别强调了这一点,因为我知道你们都会慢慢成为程序员;,你在写代码过程中造成了一系列的错误,你还在写代码,你不想浪费时间,我想把“浪费时间“用引号圈起来,浪费时间来做因为防卫性程序设计,而带来的这些额外的事情,你只想赶紧把程序写完,这不是一个好习惯,因为当你做完回头。
应用推荐