Tags

patterns

  • 2025-09-30

    😊 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…

  • 2024-09-03

    🔎 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…