This article illustrates five common problems in database design, in the PHP code that accesses databases, and how to fix these problems when you see them.
本文说明了数据库设计和访问数据库的 PHP 代码中出现的五个常见问题,以及在遇到这些问题时如何修复它们。
Here I'll talk about what to do once you've unearthed reusable design in code, covering techniques for harvesting those patterns.
在这里我要讲一下在发掘出代码中的可重用设计之后应该做些什么,介绍获取这些模式所用的方法。
Duplication in code obscures the design because you can't find idiomatic patterns.
代码复制使设计变得更加模糊,因为您无法找到惯用模式。
First one, when I write a piece of code, especially code that has branches in it, when I design test cases for that piece of code, I should try and have a specific test case for each possible path through the code.
第一点,当我们写代码的时候,尤其是一些含有分支语句的代码的时候,当我为这些代码,设计测试用例的时候,我应该为每一个可能的程序路径,都设计一个特别的用例。
应用推荐