分类目录归档:技术文章

内联函数总结

内联函数定义

inline关键字是C99标准的型关键字,其作用是将函数展开,把函数的代码复制到每一个调用处。这样调用函数的过程就可以直接执行函数代码,而不发生跳转、压栈等一般性函数操作。可以节省时间,也会提高程序的执行速度。

继续阅读

逆向工程和装配的介绍

I recently wrote a blog post giving an introduction to reverse engineering and assembly language on the Purism blog. Considering that my last blog post on my own website is from 3 years ago and this post is useful beyond the needs of just Purism, I thought it might have a nice home in my own personal blog as well, so here’s a copy paste of the entire blog post, as is.
我最近在 Purism 博客上写了一篇博文,介绍了逆向工程和汇编语言。考虑到我上次在自己的网站上发表博文已经是三年前了,而且这篇文章的用途远不止 Purism 本身,我觉得它也应该放在我的个人博客里,所以就直接复制粘贴了。

继续阅读

单元测试原则 

Background   背景

I learned about the Unit Testing book through Saša Jurić’s Clarity talk. The entire talk was brilliant but the last 15 minutes especially, when he turned the discussion to testing, were eye-opening. Jurić attributed his style of testing units of behavior instead of units of code to Vladimir Khorikov’s Unit Testing book, so I decided to buy a copy.
我通过 Saša Jurić的 Clarity 演讲了解到这本单元测试的书。整个演讲都非常精彩,尤其是最后 15 分钟,当他把讨论转向测试时,让我大开眼界。Jurić将他的测试行为单元而不是代码单元的风格归功于 Vladimir Khorikov 的《单元测试》一书,因此我决定买一本。

继续阅读