Category: Clean Code
-
PayloadOffset_t: A small type design challenge
Recently, I had to make a relatively small design decision – which type to use for a small range of values. As usual in C++, there were a number of […] The post PayloadOffset_t: A small type design challenge appeared first on Simplify C++!.
-
Core Guidelines are not Rules
There is a difference between guidelines and rules. Boiling down guidelines to one-sentence rules has drawbacks that make your code harder to understand. The famous quote by Captain Barbossa from […] The post Core Guidelines are not Rules appeare…
-
isValid()? Establish invariants and avoid zombie objects
When classes have an “isValid” method or similar, the code using them often is less clear and harder to maintain. If possible, validity should be an invariant that can not […] The post isValid()? Establish invariants and avoid zombie …