Posts

  • FizzBuzz Generics

    Last time (again, quite a while ago) I ended with a generalization of the “FizzBuzz” problem that parameterized the divisibility rules and cached constant results for inputs using a function cache the size of the least common multiple, which is the count at which the rules that generate the output will cycle.

  • Faster FizzBuzz

    Last time (quite a while ago) I talked about “enterprise” code design with the “FizzBuzz” problem. I ended with the shortest implementation in LINQ, which (not-so-coincidentally) is the lightest of the “enterprise” patterns (in terms of number of abstractions) while having a level of parameterization not in the standard “first-draft” procedural method.

  • FizzBuzz enterprise-style gone too far

    “Enterprise-class” code design can very easily degenerate into what I will call “interface obsession” (named after the “primitive obsession” code smell). Let’s take a look at various strategies of abstraction and over-obessions in the context of the classic “FizzBuzz” interview question.