patterns
-
😊 Align the "happy path" in your code
An idiom that I learned in the Go community is to align the happy path. An example in C below: happy path not aligned int process_file(const char* filename) { FILE* f = fopen(filename, "r"); if (f != NULL) { char b…
-
🔎 Seeing patterns
Patterns are important. Seeing patterns allows us to simplify things by using common data structures, re-using code/design, finding solutions to common problems, etc. Being able to see patterns also allows us to troubleshoot effectively. Bu…