本文讨论了编写整洁、最优化和严格代码背后的一些概念,尤其强调了在开发Web站点模板时要使用这些技术。
This article discusses the concepts behind writing clean, optimized, and strict code with particular attention to using these techniques in the development of templates for Web sites.
某些实践例如严格的代码所有权或瀑布过程,可能会与重构背道而驰。
Some practices, like strict code ownership or a waterfall process, can play against refactoring.
然而,除非维护一个非常严格的规程,否则不久将出现模型和代码之间的缺口,或断路。
However, unless a very strict discipline is maintained, there will very soon be a gap, or disconnect, between the models and the code.
由于采用了严格的遗留代码,花费了大量资源(时间和资金)进行新功能开发——每个版本的开发时间都要花费六个月时间,占用超过8,000小时开发时间。
With rigid legacy code, considerable amount of resources (both time and money) was spent on new functionality development - each version took six months to develop and more than 8,000 developer hours.
举例来说,一些使用全面的MDD,以及完全的代码生成的组织已经成功地开发了具有非常严格的实时需求的导弹控制系统。
For example, some organizations using full-scale MDD with complete code generation have successfully developed missile control systems with very strict real-time requirements.
为了实现过滤,你可以严格定义使用的规则或者对一些限定的类应用特定的一些规则来进行代码复查。
To filter, you can either restrict the list of rules that are applied, or instruct Code Review to apply the rules to a limited set of classes.
虽然大部分J2EE代码可以不作任何修改就运行,但是那些不严格符合规范的代码将不能正常工作。
While most J2EE code should run without modification, code that does not strictly conform to the specification may not work as well.
工具必须严格遵合同:生成的代码必须能够和以前一样工作。
The tool must adhere to a strict contract: the resulting code must still work just as it did before.
归根结底,我们所描述的就是一般所称的代码检查,尽管它不需要像名称所暗示的那样严格。
When you boil it all down, what we have described is something that might commonly be called a code review, although it does not need to be as rigid as the name implies.
应用程序经过了严格的QA测试,您确信代码可以完全适合业务的需求。
Your apps have gone through rigorous QA testing, and you're confident that your code is going to fulfill the business requirements.
具有严格的企业安全指南,并得以严格执行来确保这些指南得到了遵从,包括应用程序体系结构和代码检查。
There are strict corporate security guidelines that are rigorously enforced,, including application architecture and code inspections, to ensure compliance.
在模型中,移动分解的变化会产生严重的影响,这是因为包和命名空间容纳和在代码中相比被更加严格地指定。
In models, move-refactoring changes have high impact, because Package and namespace containment is specified more rigorously than in code.
因此,必须对假设的条件仔细证明,并且这些模式被严格地封装了起来,因为即使非常小的更改也会损坏您的代码!
It is critical that your assumptions be carefully documented and these patterns strongly encapsulated because very small changes can break your code!
在讲解代码之前,介绍一些基本概念很重要。严格地说,jaxp是api,但是将其称为抽象层更准确。
Strictly speaking, JAXP is an API, but it is more accurately called an abstraction layer.
这使得开发员可以以一种更加灵活的方式使模型与代码保持同步化,同时适应Ada严格的排序需求。
This enables developers to work in a more flexible fashion that keeps the model and code synchronized, while also accommodating the strict ordering requirements of Ada.
其中所具有的选项还使用户可以控制生成的代码文件是否是只读的,以及是否严格验证schema描述。
Options also allow the user to control whether generated code files are read-only, and whether the Schema description is strictly validated.
Django严格遵循Don ' tRepeat Yourself (DRY)原则,因此每个不同的代码片段或数据仅在一个位置上出现。
Django strictly observes the Don't Repeat Yourself (DRY) principle, whereby every distinct piece of code or data lives in only one place.
通过使用这个RealTimeSystemAPI,可以降低具有严格时间要求的代码区域中发生锁定初始化的机率。
By using this RealTimeSystem API, you can reduce the chance that lock initialization happens within a time-critical code region.
一些过程,例如代码发布,比其他过程,例如软件编码,需要更严格的治理。
Some processes, such as code release, require stricter governance than other processes, such as software coding.
这可能需要一些不会推广到生产环境中的额外代码或基础设施,这些代码或基础设施将严格用于性能测试目的。
This might require some additional code or infrastructure that would not be promoted to production, but rather would exist strictly for performance testing purposes.
如果我们有严格地立场,“从不破坏现有代码”,那么我们将被迫拒绝这项有用的新功能。
If we were to take the strict position of "never break existing code," we would be forced to reject this useful new feature.
历史上,共识都将严格地保护所有的源代码,并严谨地支配它如何被管理。
Historically, the consensus was to rigidly guard all source code and strictly govern how it was managed.
在强代码所有权中,严格区分我的代码和你的代码,我不能改动你的代码。
In strong code ownership, there's my code and your code. I can't change your code.
一个结合了对剩余数据进行代码级验证的真正严格的模式也许不会留下可操纵的空间。
A really restrictive schema combined with code-level verification of the remaining data may leave you with no room to maneuver.
大部分员工工作于企业网络之外,掌管秘密的专利信息如源代码的系统会受到严格的保护。
Most employees work outside the corporate network, and systems that house secret proprietary information, such as source code, are strictly guarded.
即使只涉及几个开发人员的小项目,也需要对源代码的更改进行严格控制。
Even small projects that involve only a few developers require tight control over changes in source code.
原因有三,第一个原因,是出于质量控制考虑:严格说来,彩蛋是一段未经测试的程序,理论上来讲,它可能会对整个程序中其他重要的功能代码产生影响。
Part of the reason was quality control: by definition, an Easter egg is an untested feature. It's a loose cannon that could, in theory, interfere with other, more important parts of the program.
严格说来,AST(抽象语法树)也是一种IR——因为它既不是源代码,也不是目标语言。
Strictly speaking, the AST (abstract syntax tree) is also an IR (intermediate representation) - since it is not quite the source, and not quite the target language.
这对于某些底层任务来说是无价的,例如对代码进行分析,或者在设备驱动程序或其他严格时间要求的代码中进行精确的延时。
This can be invaluable for lower-level tasks such as code profiling or precise delays in device drivers and other time-critical code.
这对于某些底层任务来说是无价的,例如对代码进行分析,或者在设备驱动程序或其他严格时间要求的代码中进行精确的延时。
This can be invaluable for lower-level tasks such as code profiling or precise delays in device drivers and other time-critical code.
应用推荐