# solid principles

Published articles for solid principles.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## How to Apply SOLID Principles in Programming

DevFeed: [How to Apply SOLID Principles in Programming](<https://devfeed.tech/articles/how-to-be-a-solid-programmer-28570.md>)

Original publisher: [Read original article](<https://thehustlingengineer.substack.com/p/how-to-be-a-solid-programmer-d9c>)

Author: Hemant Pandey

Published: 2026-06-18T14:27:58Z

Content type: tutorial

Language: en

Sources: [The Hustling Engineer](<https://devfeed.tech/sources/the-hustling-engineer.md>)

Topics: [solid principles](<https://devfeed.tech/topics/solid-principles.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [deep](<https://devfeed.tech/tags/deep.md>), [deep-dive](<https://devfeed.tech/tags/deep-dive.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [programming](<https://devfeed.tech/tags/programming.md>), [solid](<https://devfeed.tech/tags/solid.md>), [solid-principles](<https://devfeed.tech/tags/solid-principles.md>)

### AI overview

A deep dive into SOLID principles and their application in programming.

### Source excerpt

Deep Dive into SOLID principles in Programming

## The Liskov Substitution Principle: Subtyping Contracts, Invariants, and History Properties

DevFeed: [The Liskov Substitution Principle: Subtyping Contracts, Invariants, and History Properties](<https://devfeed.tech/articles/the-liskov-substitution-principle-does-more-than-you-think-25507.md>)

Original publisher: [Read original article](<https://buttondown.com/hillelwayne/archive/the-liskov-substitution-principle-does-more-than/>)

Author: Hillel Wayne

Published: 2026-01-06T16:51:26Z

Content type: article

Language: en

Sources: [Newsletter feed for Hillel Wayne's Newsletter](<https://devfeed.tech/sources/newsletter-feed-for-hillel-wayne-s-newsletter.md>)

Topics: [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [inheritance](<https://devfeed.tech/tags/inheritance.md>), [oop](<https://devfeed.tech/tags/oop.md>), [properties](<https://devfeed.tech/tags/properties.md>), [solid-principles](<https://devfeed.tech/tags/solid-principles.md>), [subtype](<https://devfeed.tech/tags/subtype.md>)

### AI overview

The article explains that the Liskov Substitution Principle is broader than simply treating it as subtyping. It presents requirements involving method preconditions and postconditions, supertype state invariants, and history properties.

### Source excerpt

Happy New Year! I'm done with the newsletter hiatus and am going to try updating weekly again. To ease into things a bit, I'll try to keep posts a little more off the cuff and casual for a while, at least until Logic for Programmers is done. Speaking of which, v0.13 should be out by the end of this month. So for this newsletter I want to talk about the Liskov Substitution Principle (LSP). Last week I read A SOLID Load of Bull by cryptographer Loupe Vaillant, where he argues the SOLID principles of OOP are not worth following. He makes an exception for LSP, but also claims that it's "just subtyping" and further: If I were trying really hard to be negative about the Liskov substitution principle, I would stress that it only applies when inheritance is involved, and inheritance is strongly discouraged anyway. LSP is more interesting than that! In the original paper, A Behavioral Notion of Subtyping, Barbara Liskov and Jeannette Wing start by defining a "correct" subtyping as follows: Subtype Requirement: Let ϕ(x) be a property provable about objects x of type T. Then ϕ(y) should be true for objects y of type S where S is a subtype of T. From then on, the paper determine what guarantees that a subtype is correct.1 They identify three conditions: Each of the subtype's methods has the same or weaker preconditions and the same or stronger postconditions as the corresponding supertype method.2 The subtype satisfies all state invariants of the supertype. The subtype satisfies all "history properties" of the supertype. 3 e.g. if a supertype has an immutable field, the subtype cannot make it mutable. (Later, Elisa Baniassad and Alexander Summers would realize these are equivalent to "the subtype passes all black-box tests designed for the supertype", which I wrote a little bit more about here.) I want to focus on the first rule about preconditions and postconditions. This refers to the method's contract. For a function f, f.Pre is what must be true going into the function, and

## 6 Testing Mistakes You Should Avoid

DevFeed: [6 Testing Mistakes You Should Avoid](<https://devfeed.tech/articles/6-testing-mistakes-you-should-avoid-26198.md>)

Original publisher: [Read original article](<https://craftbettersoftware.com/p/6-testing-mistakes-you-should-avoid>)

Author: Daniel Moka

Published: 2025-04-05T05:00:42Z

Content type: tutorial

Language: en

Sources: [Craft Better Software](<https://devfeed.tech/sources/craft-better-software.md>)

Topics: [Testing](<https://devfeed.tech/topics/testing.md>), [mutation-testing](<https://devfeed.tech/topics/mutation-testing.md>), [Development](<https://devfeed.tech/topics/development.md>), [clean-code](<https://devfeed.tech/topics/clean-code.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [clean-code](<https://devfeed.tech/tags/clean-code.md>), [code-testing](<https://devfeed.tech/tags/code-testing.md>), [mutation-testing](<https://devfeed.tech/tags/mutation-testing.md>), [shift-left](<https://devfeed.tech/tags/shift-left.md>), [solid-principles](<https://devfeed.tech/tags/solid-principles.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A practical guide to avoiding common testing mistakes, including testing late, relying too heavily on code coverage, testing implementation details, and neglecting clean test code. It recommends shift-left testing, mutation testing, behavior-focused tests through public APIs, and treating tests as maintainable code.

### Source excerpt

Each with a simple fix you can apply today

## Generics vs. Interfaces

DevFeed: [Generics vs. Interfaces](<https://devfeed.tech/articles/generics-vs-interfaces-22185.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2022/12/generic-vs-interfaces.html>)

Published: 2022-12-16T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Binance](<https://devfeed.tech/topics/binance.md>), [backends](<https://devfeed.tech/topics/backends.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [adapter-pattern](<https://devfeed.tech/tags/adapter-pattern.md>), [api](<https://devfeed.tech/tags/api.md>), [api-server](<https://devfeed.tech/tags/api-server.md>), [business-logic](<https://devfeed.tech/tags/business-logic.md>), [decoding](<https://devfeed.tech/tags/decoding.md>), [decoupling](<https://devfeed.tech/tags/decoupling.md>), [encoding](<https://devfeed.tech/tags/encoding.md>), [function](<https://devfeed.tech/tags/function.md>), [generics](<https://devfeed.tech/tags/generics.md>), [go](<https://devfeed.tech/tags/go.md>), [go-api-server](<https://devfeed.tech/tags/go-api-server.md>), [gorm](<https://devfeed.tech/tags/gorm.md>), [http](<https://devfeed.tech/tags/http.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [reusable-code](<https://devfeed.tech/tags/reusable-code.md>), [solid](<https://devfeed.tech/tags/solid.md>), [solid-principles](<https://devfeed.tech/tags/solid-principles.md>), [transactions](<https://devfeed.tech/tags/transactions.md>), [video](<https://devfeed.tech/tags/video.md>)

### AI overview

A video explains how generic functions and adapter functions can reduce code duplication and decouple business logic from API server handlers in Go. It demonstrates HTTP handlers, GORM database transactions, performance evaluation with PPROF, and generic data encoding and decoding.

### Source excerpt

Introduction In this video, Paulo shows the benefit of leveraging generic functions to write less code that does more. He starts by walking you through an API server he initially wrote that makes use of Go's default HTTP handlers with a sprinkle of GORM to manage database transactions. He then refactors that code by introducing the concept of adapter functions. Paulo's approach consists of decoupling his business logic with his API code. To achieve this, he defines an adapter function that will establish a bridge between his business logic and API server handlers. This proves to be an effective way to abstract request processing and handling. This approach also promotes code reusability because the business logic is loosely coupled with the API service invoking it.