摘要:
This wasoriginallyposted to Kristina Chodorow’s blog,Snail in a Turtleneck我参与编写了The Definitive Guide中关于Journaling的部分,但是我意识到其中很多实现细节大家重视的不够,所以这次在博客里我会用易于理解的图来进行说明。那么Journaling是怎么工作的呢,假设如图所示,你的硬盘上有数据文件和日志文件当你启动mongod,它会映射你的数据文件到一个共享的视图中,比方说操作系统会把你2,000 bytes的数据文件映射到内存地址1,000,000-1,002,000中,这样你访问1,000, 阅读全文
摘要:
What does the ‘unit’ in ‘unit test’ mean?(byRoy Osherove)I used to think it was a method. Then I thought it coule be several methods. then I thought it might be several classes. then I realized it changes all the time.我曾经觉得这指的是一个方法,几个方法或者几个类,我的看法一直在变化着。It means “unit of work”.我现在觉得单元指的是工作单元。A unit . 阅读全文
摘要:
原文:Why you should think about TOOP- Testable Object Oriented Programming 作者:Typemock首席架构师Roy OSherove ---The Art of Unit Testing: With Examples in .Net的作者我觉得面向对象设计\编程(Object Oriented Design\Programming)是时候要做些改变了。质量和对可测试性、持续集成的追求在业界已经开始萌芽。我们需要思考一个简单的事实:在很多情况下,纯OOD和可测试设计在概念上有些许冲突。我曾经写过一篇文章,FXCop为了追求纯粹 阅读全文
摘要:
#encoding=utf8__author__ = 'Administrator'#如果是直接运行文件的话if __name__=="__main__": print("main")#怎么做性能测试import timedef timer(reptimes,func,*pargs,**kargs): start=time.clock() for i in range(reptimes): func(*pargs,**kargs) return time.clock()-startdef test(test): [i for i in r 阅读全文