Raimund Krämer

Software Craftsman, Consultant, Coach

Tag: Software Design

  • Code Review: Text-based Monopoly in Java

    Code Review: Text-based Monopoly in Java

    Originally posted on Code Review Stack Exchange on 07.09.2021. Question asked by user “DexMax” and licensed under CC BY-SA 4.0. Answer provided by me and licensed under CC BY-SA 4.0. Original Question My Code Review Originally posted in 2021 as an answer on Code Review Stack Exchange. Kudos for this…

    Read more

  • StringBuilder Cargo Cult

    StringBuilder Cargo Cult

    This post is based on an answer I posted on Stack Overflow. The code example was submitted as part of the question by Bruno Rozendo under CC BY-SA 3.0.Note: The context is the StringBuilder class in Java. Code examples are in Java. The accepted answer already explains how to do…

    Read more

  • The Purpose of Getters and Setters

    The Purpose of Getters and Setters

    First of all, I don’t advocate for getters and setters at all. Don’t use them (especially setters) if you find an alternative. There usually is a better design. I won’t go into that here. I want to focus on a bigger, very common problem: Many of the people who use…

    Read more

  • SOLID Principles: Common Misconceptions

    SOLID Principles: Common Misconceptions

    The SOLID principles for software design can be a helpful thinking and communication tool of a software developer, even if perhaps just as a reason to think about software design from another perspective. While there are many more software design principles that are arguably at least as important, the SOLID…

    Read more

  • Taste Your Own Soup

    Taste Your Own Soup

    Imagine this scenario: A restaurant cook learned from their grandmother the secret of her tasty soup. “Always put a tablespoon of salt in your soup”. And so they follow the advice, every day, no exception – and the customer reviews are, well, not great. “Disgusting”, says a food critic in…

    Read more

  • Expressive Tests in JUnit 5 Using Nested Test Classes

    Expressive Tests in JUnit 5 Using Nested Test Classes

    I discovered some nice features in JUnit 5 that I haven’t really seen before in the wild, so I thought I’d share them with you. Testing frameworks like JUnit allow for pretty expressive tests if used well. Features I’ve already been using a lot for some time now are things…

    Read more