我平时的工作内容是开发在服务端上运行的网络程序,主要语言是 C++,并且几乎全部跑在统一的机器环境上。所以我们一直以来都在使用一套简单从 blade-build 魔改
1 RED FLAGS 1.1 Shallow ModuleA shallow module is one whose interface is complicated relative to the functionality it provides. Shallow modules don’t help much in the battle against complexity, because the benefit they provide (not having to learn about how they work internally) is negated by the cost of learning and using their interfaces. Small modules tend to be shallow. 1.2 Information LeakageInformation leakage occurs
0.1 Symbols And Structure 表决 $B$ 1 2 3 4 5 6 struct Ballot { dec: Decree, // 表决的内容 vot: Set<Node>, // 表决投票通过的节点 qrm: Set<Node>, // 表决参与的节点 bal: u64, // 表决编号 } A ballot is said to be successful, if every quorum member voted. In math: $$ B_{qrm}
这个点子是我最初在网上其他地方看到的,感觉很好玩。就记录一下啦。 Reference: http://cpp.kjx.cz/private_backdoor.html
1 问题的开始问题起源于,我要搞一个模板,来检查一个类,是不是有一个特定的回调接口 OnAlarm()。我显然希望在我的模板类里面,直接调用这个
1 问题的开始问题的开始是同事聊到了我们笔试题的一个问题,是说下面这个代码其实在编译的时候是有问题的。 1 2 3 4 5 6 7 8 9 10 struct UserInfo { UserInfo(const std::string& name) : name_(name) {} private: