独孤九剑 Dit (0x04) - 测试篇

《南皮县志·风土志下·歌谣》:“兵马不动,粮草先行”。作战时兵马还没出动,军用粮草的运输要先行一步。在开发新功能之前,先编写测试代码,然后只编写使测试通过的功能代码,这种以测试驱动开发的开发模式是我非常推荐的。 对 Dit 的贡献要求需要通过单元测试,编写 Dit 的任意模块,都需要一并编写测试用例。本文先简述一下 Go 对测试的支持,后续会陆续提供 Dit 的测试方案和测试报告。

独孤九剑 Dit (0x03) - 缓存篇

每个人都会变成自己讨厌的人 Git 通过二进制文件 .git/index 来缓存当前目录,实现工作目录和仓库数据的快速交换。Git 的缓存却保存在 index 文件里,为什么不是 cache,很奇怪。

英语小抄

这里记录一些有用的单词,句子

LLDB debug Golang

除了 GDB,还可以使用 LLDB debug go code 熟练调试工具是程序员的必备技能,lldb 的发展势头,大有取缔 gdb 的趋势,因此需要把 lldb 加入到自己的工具箱里。 LLDB 命令 LLDB 的所有命令都遵从以下格式: <noun> <verb> [-options [option-value]] [argument [argument...]] 对于常用命令,可设置别名,降低输入负担。(可通过别名设置和 GDB 相同的语法,降低记忆负担)。

Make mistakes

Do you want to know the difference between a master and a beginner? The master has failed more times than the beginner has tried. We need to think about failure differently. Most people think mistakes are a necessary evil. Mistakes are not necessary evil, they aren't evil at all. They are an inevitable(不可避免的) consequence of doing something new and as such should be seen as valuable.