These code snippets increase productivity by reducing the amount of time spent typing repetetive code or searching for samples 这些代码段减少了键入重复代码或搜索示例所用的时间,从而提高了工作效率。
Refactoring : refactor out any duplicate code generated in a coding session . you can do this with confidence that you didn ' t break anything because you have the tests 求精( ) :去掉在编码过程中产生的任何重复代码,你可以自信地认为这么做不会破坏任何东西,因为你还有测试作为后盾。
If you share files with users at other sites that use distinct code pages , you should save your file with the appropriate unicode code page to prevent errors when reading the file 如果与其他站点上使用非重复代码页的用户共享文件,则应使用相应的unicode代码页保存文件,以避免读取该文件时出错。
Rails strives for development ease by eliminating complicated xml configuration files and using the very dynamic nature of the ruby language to help minimize much of the repeating code often found in static typed languages Rails通过消除复杂的xml配置文件,使用ruby语言的动态性质,帮助把静态类型语言中常见的许多重复代码减少到最少,努力使开发工作变得更容易。
( 2 ) it negotiated the idea of xp programming . it put forward the process of making unit testing , the method of predigesting the content of it , and the measures of realizing the simple design . ( 3 ) it analyzed the relations of xp team practices ( 2 )讨论了xp编程的思想,给出了进行单元测试的步骤、对单元测试内容的简化方法,为实现简单设计而在消除重复代码上所采取的功能细粒度、创建新方法的措施。
The program will be marked according to the following criteria : whether the layout of the program is good , whether you have used functions properly , whether you ' ve dealt with the three sections of data with minimum duplication of code , whether you ' ve chosen a sensible hash function , and how you ' ve presented the results 你的程序会根据一下标准来打分:你的程序设计是否合理,你用的函数是否正确,你处理3个部分是否用了最少的重复代码,你是否选择了一个合理的哈希函数以及你给出结果的方法。
Since jms 1 . 1 unifies the point - to - point and publish subscribe messaging domains , to avoid duplicate code , these two methods simply call a third , private method , producemessage string , string , string , which does all of the work of creating the message and adding it to either a queue or a topic 由于jms 1 . 1将点到点和发布/订阅消息传递域统一起来,因此为了避免重复代码,这两个方法只需调用第三个方法私有方法producemessage ( string , string , string )来完成创建消息和将消息添加到队列或主题的所有工作。
In this paper , how to evolve the action component part of struts framework into black - box framework using java reflection and program generator respectively is discussed , taking the adding , deleting , modifying in a database in struts + ejb - kiatabase three layers architecture as an example . i first present a white - box framework based implementaion that adding , deleting , modifying a database , then how to evolve the action component part of struts framework into black - box framework using java reflection and program generator respectively in the target domain is discussed , thereby all these operations can implement without programmingjust config in a xml file , reach the objective of reducing the duplicate codes , improving the maintainability , cutting down the cost of developing applications 首先给出了基于白盒struts框架的对数据库表的增、删、改操作的一个实现,然后分别采用反射机制和程序生成器技术将struts框架的action组件部分在这一目标领域里进化为黑盒框架,从而使所有对数据库的增、删、改不再需要编程,只需在xml文件中进行相应配置即可,达到减少重复代码的数量,提高程序的可维护性,降低开发成本的目的。
( 2 ) a fragment combining algorithm is designed to judge the combined ability of the parameterized duplication code fragment which are found by the former method , so the discontiguous parameterized duplication code is detected . the analysis indicates that the new algorithm has an acceptable complexity 经过改进,算法的空间复杂性得到降低,使之更适于大型程序文本的匹配; ( 2 )提出了程序碎片合并算法,判断通过参数化匹配算法找到的重复代码段之间的可合并性,从而能从程序中识别出非连续的近似重复代码。