Best of Design PatternsJanuary 2026

  1. 1
    Article
    Avatar of vlg5h0gcnu7htgcs5hyexKrzysztof·19w

    What is your most used design pattern

    A developer shares their experience with design patterns, noting that while many patterns exist, few are commonly implemented in practice. The Singleton pattern stands out as their most frequently used pattern, first encountered while working with Unity Engine for managing shared state across scenes, and later applied across various technologies including Java and TypeScript. The post invites others to share their most commonly used design patterns.

  2. 2
    Article
    Avatar of francofernandoThe Polymathic Engineer·17w

    Software Design Principles That Matter

    Three fundamental software design principles help build flexible, maintainable code. The Open-Closed Principle advocates for code that's open for extension but closed for modification, using interfaces to separate varying parts from stable ones. Dependency Injection reduces coupling by providing dependencies through constructors rather than creating them internally. Inversion of Control removes responsibilities from classes by letting frameworks control application flow while your code acts as plugins. Together, these principles reduce complexity and make code easier to test, extend, and maintain.

  3. 3
    Video
    Avatar of zoranhorvatZoran Horvat·19w

    Stop Adding a Service Layer to Every Web API

    Service layers are often unnecessarily added to Web APIs. A service layer is only justified when orchestrating changes across multiple independent mutable systems (like a database and payment gateway). Most Web APIs write to a single database and read from multiple sources, making a service layer pure overhead. The one-to-one relationship between endpoints and service methods creates boilerplate code for DTO mapping, error translation, and localization without providing architectural value. The decision is simple: if your API doesn't orchestrate multiple transactional boundaries, skip the service layer and implement logic directly in endpoints.

  4. 4
    Article
    Avatar of aarononthewebAaronontheweb·17w

    Why Your Software Sucks: Inheritance

    Deep inheritance hierarchies create unmaintainable codebases through cognitive overload and "everything touches everything" architectures. The author examines real-world examples including a five-layer inheritance hierarchy for a payment page and an 866-line generic repository, demonstrating how preemptive framework design leads to rigid abstractions that resist change. The solution is to extract patterns after solving problems multiple times, prefer composition over inheritance, and remain skeptical of deep hierarchies beyond two or three layers.