重构第一步,构造可靠的测试环境。
What
任何可以立即查阅的东西,都故意不去记忆。
什么是重构
重构,对软件内部结构调整,在不改变外部可观察行为的前提下,提高其可理解性,减低修改成本。
重构难题
对于修改接口,能获取所有调用者,那么可以安心修改。如果无法修改全部调用者,如果是公开已经发布的接口,就需要同时维护新旧两个接口,直到所有用户将该变化做出反应。
How
Duplicated Code
重复代码提炼。兄弟类,则推到 super class,如果是不完全相同的,则分解方法提炼统一的方法。
Long method
小函数准确的命
Read more ...
最近用 [[GoldenDict]] 查词非常频繁且非常有效的提高了阅读的效率,但是在日常有的时候听一些英语口语的广播节目的时候,经常会有一些短语搭配,而我们平时如果写作的话,其实短语较于单词更为重要,口语亦然。所以产生了一个念头,如果有一本英语搭配语字典就能够提高不少效率,没想到都不用去刻意搜索,就出来了好几个推荐。
Oxford Collocation Dictionary 牛津英语搭配语词典
The BBI dictionary of English word combinations BBI 英语搭配词典
Longman Coll
Read more ...
Shell Syntax - what is your input means to the shell
Shell Operations - what can shell do
read input from file
breaks the input into words and operations
parse the token into simple and compound commands
performs the various shell expansions
redirections
execute th
Read more ...