# Inheritance

Inheritance is an object-oriented programming concept in which classes inherit, reuse, extend, or modify state and behavior from other classes.

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

## Inheritance and Composition in Python

DevFeed: [Inheritance and Composition in Python](<https://devfeed.tech/articles/how-to-oop-in-python-like-a-pro-38807.md>)

Original publisher: [Read original article](<https://thepalindrome.org/p/how-to-oop-in-python-like-a-pro>)

Author: Stephen Gruppetta

Published: 2026-05-30T06:49:08Z

Content type: tutorial

Language: en

Sources: [The Palindrome](<https://devfeed.tech/sources/the-palindrome.md>)

Topics: [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>), [Python](<https://devfeed.tech/topics/python.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>)

Tags: [how-to](<https://devfeed.tech/tags/how-to.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [oop](<https://devfeed.tech/tags/oop.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

A tutorial about inheritance and composition in Python.

### Source excerpt

Inheritance and composition

## Object Oriented Programming - The Key Terms

DevFeed: [Object Oriented Programming - The Key Terms](<https://devfeed.tech/articles/object-oriented-programming-the-key-terms-34688.md>)

Original publisher: [Read original article](<https://newsletter.systemdesigncodex.com/p/object-oriented-programming-the-key>)

Author: Saurabh Dashora

Published: 2026-03-24T08:38:43Z

Content type: article

Language: en

Sources: [System Design Codex](<https://devfeed.tech/sources/system-design-codex.md>)

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

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [concepts](<https://devfeed.tech/tags/concepts.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [maintainability](<https://devfeed.tech/tags/maintainability.md>), [object-oriented](<https://devfeed.tech/tags/object-oriented.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [programming](<https://devfeed.tech/tags/programming.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

This tutorial introduces object-oriented programming through four principles: abstraction, encapsulation, inheritance, and polymorphism. It explains how abstraction hides implementation details, encapsulation controls access to data and methods, and inheritance supports reuse and hierarchical relationships. The supplied text begins its discussion of polymorphism but is truncated.

### Source excerpt

The essential concepts

## two mechanisms for dynamic type checks

DevFeed: [two mechanisms for dynamic type checks](<https://devfeed.tech/articles/two-mechanisms-for-dynamic-type-checks-35030.md>)

Original publisher: [Read original article](<https://wingolog.org/archives/2026/02/18/two-mechanisms-for-dynamic-type-checks>)

Author: Andy Wingo

Published: 2026-02-18T16:21:10Z

Content type: tutorial

Language: en

Sources: [wingolog](<https://devfeed.tech/sources/wingolog.md>)

Topics: [virtual machines](<https://devfeed.tech/topics/virtual-machines.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [JIT](<https://devfeed.tech/topics/jit.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [cardelli](<https://devfeed.tech/tags/cardelli.md>), [cohen](<https://devfeed.tech/tags/cohen.md>), [dfs](<https://devfeed.tech/tags/dfs.md>), [display-hack](<https://devfeed.tech/tags/display-hack.md>), [dybvig](<https://devfeed.tech/tags/dybvig.md>), [scheme](<https://devfeed.tech/tags/scheme.md>), [vitek](<https://devfeed.tech/tags/vitek.md>), [wasm](<https://devfeed.tech/tags/wasm.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

### AI overview

This technical note explains two mechanisms for dynamic instance type checks in virtual machines with single inheritance. It describes DFS numbering when the type set is fixed and the display hack, based on per-type supertype arrays, when types can be added at run time.

### Source excerpt

Today, a very quick note on dynamic instance type checks in virtual machines with single inheritance. The problem is that given an object o whose type is t, you want to check if o actually is of some more specific type u. To my knowledge, there are two sensible ways to implement these type checks. if the set of types is fixed: dfs numbering Consider a set of types T := {t, u, ...} and a set of edges S := {<t|ε, u>, ...} indicating that t is the direct supertype of u, or ε if u is a top type. S should not contain cycles and is thus a direct acyclic graph rooted at ε. First, compute a pre-order and post-order numbering for each t in the graph by doing a depth-first search over S from ε. Something like this: def visit(t, counter): t.pre_order = counter counter = counter + 1 for u in S[t]: counter = visit(u, counter) t.post_order = counter return counter Then at run-time, when making an object of type t, you arrange to store the type's pre-order number (its tag) in the object itself. To test if the object is of type u, you extract the tag from the object and check if tag-u.pre_order mod 2n < u.post_order-u.pre_order. Two notes, probably obvious but anyway: one, you know the numbering for u at compile-time and so can embed those variables as immediates. Also, if the type has no subtypes, it can be a simple equality check. Note that this approach applies only if the set of types T is fixed. This is the case when statically compiling a WebAssembly module in a system that doesn't allow modules to be instantiated at run-time, like Wastrel. Interestingly, it can also be the case in JIT compilers, when modeling types inside the optimizer. if the set of types is unbounded: the display hack If types may be added to a system at run-time, maintaining a sorted set of type tags may be too much to ask. In that case, the standard solution is something I learned of as the display hack, but whose name is apparently ungooglable. It is described in a 4-page technical note by Norman H. Coh

## Unconventional PostgreSQL Optimizations

DevFeed: [Unconventional PostgreSQL Optimizations](<https://devfeed.tech/articles/unconventional-postgresql-optimizations-33925.md>)

Original publisher: [Read original article](<https://hakibenita.com/postgresql-unconventional-optimizations>)

Author: Haki Benita

Published: 2026-01-19T22:00:00Z

Content type: tutorial

Language: en

Sources: [Haki Benita](<https://devfeed.tech/sources/haki-benita.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [Database](<https://devfeed.tech/topics/database.md>), [Query (disambiguation)](<https://devfeed.tech/topics/query.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>)

Tags: [articles](<https://devfeed.tech/tags/articles.md>), [database-optimization](<https://devfeed.tech/tags/database-optimization.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [partitioning](<https://devfeed.tech/tags/partitioning.md>), [performance](<https://devfeed.tech/tags/performance.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [query](<https://devfeed.tech/tags/query.md>), [vacuum](<https://devfeed.tech/tags/vacuum.md>)

### AI overview

This article presents unconventional PostgreSQL optimization techniques. It explains how constraint exclusion can use check constraints to avoid scanning a table for impossible conditions, while noting that enabling it broadly can add planning overhead; partition pruning is enabled by default for partitioned tables.

### Source excerpt

When it comes to database optimization, developers often reach for the same old tools: rewrite the query slightly differently, slap an index on a column, denormalize, analyze, vacuum, cluster, repeat. Conventional techniques are effective, but sometimes being creative can really pay off!

## Inside Burst's Test Interceptors

DevFeed: [Inside Burst's Test Interceptors](<https://devfeed.tech/articles/inside-burst-s-test-interceptors-32245.md>)

Original publisher: [Read original article](<https://publicobject.com/2025/09/06/inside-bursts-test-interceptors/>)

Author: Jesse Wilson

Published: 2025-09-06T04:27:03Z

Content type: article

Language: en

Sources: [Public Object](<https://devfeed.tech/sources/public-object.md>)

Topics: [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Compiler](<https://devfeed.tech/topics/compiler.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [tests](<https://devfeed.tech/tags/tests.md>)

### AI overview

This article explains Burst's test interceptors, which provide JUnit-rule-like capabilities for connecting lifecycle behavior to test execution. It describes how Burst, a Kotlin Multiplatform library, uses a compiler plugin instead of reflection and handles interceptor ordering, inheritance, and independently compiled modules.

### Source excerpt

I recently posted on the Cash Code Blog announcing Burst's new test interceptors feature. They are similar to JUnit rules in API and capability. A Small API A typical use case is connecting some lifecycle to a test's execution. Perhaps we want a chess engine to be available

## Sealed classes and interfaces in Kotlin

DevFeed: [Sealed classes and interfaces in Kotlin](<https://devfeed.tech/articles/sealed-classes-and-interfaces-in-kotlin-39339.md>)

Original publisher: [Read original article](<https://kt.academy/article/kfde-sealed>)

Published: 2023-09-04T00:01:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [sealed class](<https://devfeed.tech/topics/sealed-class.md>), [sealed interface](<https://devfeed.tech/topics/sealed-interface.md>), [interface](<https://devfeed.tech/topics/interface.md>), [abstract class](<https://devfeed.tech/topics/abstract-class.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [sealed](<https://devfeed.tech/tags/sealed.md>), [sealed-classes](<https://devfeed.tech/tags/sealed-classes.md>), [sealed-interface](<https://devfeed.tech/tags/sealed-interface.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This Kotlin tutorial explains sealed classes and sealed interfaces as restricted hierarchies whose direct subclasses are controlled. It contrasts them with regular interfaces and abstract classes, describes their package and module requirements, and explains their use in exhaustive expressions.

### Source excerpt

What are sealed classes and interfaces in Kotlin and how do we use them.

## Sealed classes in Kotlin

DevFeed: [Sealed classes in Kotlin](<https://devfeed.tech/articles/sealed-classes-in-kotlin-23690.md>)

Original publisher: [Read original article](<https://medium.com/betclic-tech/sealed-classes-in-kotlin-74b1d28aaef2?source=rss----7e406d68d94b---4>)

Author: Florian Garcia

Published: 2022-09-26T13:51:32Z

Content type: tutorial

Language: en

Sources: [betclic-tech - Medium](<https://devfeed.tech/sources/betclic-tech-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [Code](<https://devfeed.tech/topics/code.md>), [Exception](<https://devfeed.tech/topics/exception.md>)

Tags: [classes](<https://devfeed.tech/tags/classes.md>), [code](<https://devfeed.tech/tags/code.md>), [exception](<https://devfeed.tech/tags/exception.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [sealed](<https://devfeed.tech/tags/sealed.md>), [sealed-classes](<https://devfeed.tech/tags/sealed-classes.md>)

### AI overview

A tutorial explaining how Kotlin sealed classes and interfaces represent restricted class hierarchies. It shows how they help the compiler identify all supported cases and avoid missing-case handling when the hierarchy changes.

### Source excerpt

In this article, we will talk about sealed classes and interfaces. What they are, what problem they solve and how we can leverage this in real life. The problem Let's take the following code: https://medium.com/media/f1f04b5ee8f0bfc98d41cad1fbd803a2/href Our code only handles two types of animals (cats and dogs). But the compiled code does not know that only those two types exist. This means we have to add this ugly else block in our when. This can be a real issue because you start to think about what to do in a situation that shouldn't exist but that will potentially exist in the future. For instance, say that tomorrow we add cows to the list of supported animals, the code will compile just fine because we have put the else block. We could change the else part to throw an exception but Kotlin does not have checked exceptions (so it's easy to forget to catch one), and thus we end up with runtime exceptions. That's a bit sad because we probably want to know at compile time that we need to handle this new case. Solution As you probably have guessed, the solution is sealed classes or interfaces. But what are they? From the Kotlin documentation: Sealed classes and interfaces represent restricted class hierarchies that provide more control over inheritance. All direct subclasses of a sealed class are known at compile time. No other subclasses may appear after a module with the sealed class is compiled. For example, third-party clients can't extend your sealed class in their code. Thus, each instance of a sealed class has a type from a limited set that is known when this class is compiled. If rephrased, this means that we can define a bounded hierarchy. One of the important things to know when working with sealed classes is that you cannot instantiate the sealed class; thus only the leaves of the structure exist at runtime (but you can use the interface as a type). When we develop applications that are not libraries, it is pretty rare to allow an abstract class / interfac

## Effective Kotlin Item 36: Prefer composition over inheritance

DevFeed: [Effective Kotlin Item 36: Prefer composition over inheritance](<https://devfeed.tech/articles/effective-kotlin-item-36-prefer-composition-over-inheritance-39274.md>)

Original publisher: [Read original article](<https://kt.academy/article/ek-composition>)

Published: 2021-04-25T00:00:00Z

Content type: article

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [reuse](<https://devfeed.tech/topics/reuse.md>), [superclass](<https://devfeed.tech/topics/superclass.md>)

Tags: [approach](<https://devfeed.tech/tags/approach.md>), [behavior](<https://devfeed.tech/tags/behavior.md>), [hierarchy](<https://devfeed.tech/tags/hierarchy.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [object](<https://devfeed.tech/tags/object.md>), [oop](<https://devfeed.tech/tags/oop.md>), [reuse](<https://devfeed.tech/tags/reuse.md>), [superclass](<https://devfeed.tech/tags/superclass.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

The article argues that inheritance should primarily model a clear "is a" relationship and can be problematic when used mainly for code extraction or reuse. It presents class composition as a safer and more explicit alternative, while acknowledging that composition requires additional code.

### Source excerpt

Years of OOP made us overuse inheritance. Instead, we should more often use a composition that is safer and more explicit. More often, but not always...

## Sealed goodies coming in Kotlin 1.5

DevFeed: [Sealed goodies coming in Kotlin 1.5](<https://devfeed.tech/articles/sealed-goodies-coming-in-kotlin-1-5-27082.md>)

Original publisher: [Read original article](<https://zsmb.co/sealed-goodies-coming-in-kotlin-1-5/>)

Author: Márton Braun

Published: 2021-01-19T14:00:00Z

Content type: article

Language: en

Sources: [zsmb.co](<https://devfeed.tech/sources/zsmb-co.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [classes](<https://devfeed.tech/tags/classes.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [marton-braun](<https://devfeed.tech/tags/marton-braun.md>), [pattern-matching](<https://devfeed.tech/tags/pattern-matching.md>), [preview](<https://devfeed.tech/tags/preview.md>), [sealed](<https://devfeed.tech/tags/sealed.md>), [sealed-classes](<https://devfeed.tech/tags/sealed-classes.md>), [zsmb](<https://devfeed.tech/tags/zsmb.md>), [zsmb-co](<https://devfeed.tech/tags/zsmb-co.md>), [zsmb13](<https://devfeed.tech/tags/zsmb13.md>), [zsmbco](<https://devfeed.tech/tags/zsmbco.md>)

### AI overview

This article explains Kotlin sealed classes and previews planned Kotlin 1.5 improvements, including relaxed inheritance restrictions and the introduction of sealed interfaces. It also discusses interoperability with newer Java sealed constructs.

### Source excerpt

Kotlin 1.5 will bring exciting new features, among them improvements to sealed classes and an introduction of sealed interfaces. Let's take a look at what that will look like!

## Effective Class Delegation

DevFeed: [Effective Class Delegation](<https://devfeed.tech/articles/effective-class-delegation-27061.md>)

Original publisher: [Read original article](<https://zsmb.co/effective-class-delegation/>)

Author: Márton Braun

Published: 2020-09-29T20:00:00Z

Content type: tutorial

Language: en

Sources: [zsmb.co](<https://devfeed.tech/sources/zsmb-co.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [bytecode](<https://devfeed.tech/tags/bytecode.md>), [delegation](<https://devfeed.tech/tags/delegation.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interface](<https://devfeed.tech/tags/interface.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [marton-braun](<https://devfeed.tech/tags/marton-braun.md>), [override](<https://devfeed.tech/tags/override.md>), [subclass](<https://devfeed.tech/tags/subclass.md>), [superclass](<https://devfeed.tech/tags/superclass.md>), [zsmb](<https://devfeed.tech/tags/zsmb.md>), [zsmb-co](<https://devfeed.tech/tags/zsmb-co.md>), [zsmb13](<https://devfeed.tech/tags/zsmb13.md>), [zsmbco](<https://devfeed.tech/tags/zsmbco.md>)

### AI overview

This tutorial explains how Kotlin class delegation can implement an interface by forwarding calls to a contained object. It contrasts this concise approach with Java solutions motivated by Effective Java's recommendation to favor composition over inheritance.

### Source excerpt

One of the most significant items of the Effective Java book is Item 18: Favor composition over inheritance. Let's see how Kotlin promotes this with class delegation.

## Under the hood of Kotlin Class Delegation

DevFeed: [Under the hood of Kotlin Class Delegation](<https://devfeed.tech/articles/under-the-hood-of-kotlin-class-delegation-25974.md>)

Original publisher: [Read original article](<https://medium.com/snapp-mobile/under-the-hood-of-kotlin-class-delegation-24d53f9aa924?source=rss-8efc0359e234------2>)

Author: Jossi Wolf

Published: 2019-04-09T13:20:12Z

Content type: tutorial

Language: en

Sources: [Stories by Jossi Wolf on Medium](<https://devfeed.tech/sources/stories-by-jossi-wolf-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [software-development](<https://devfeed.tech/topics/software-development.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [bytecode](<https://devfeed.tech/tags/bytecode.md>), [delegation](<https://devfeed.tech/tags/delegation.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [proxy](<https://devfeed.tech/tags/proxy.md>), [stories](<https://devfeed.tech/tags/stories.md>)

### AI overview

This Kotlin tutorial explains how class delegation can expose an interface through a class without cluttering it with proxy methods. It also describes the generated delegation functions and their effect on compiled code size.

### Source excerpt

I was told to add an image to the post, so here's one Photo by Jf Brou from Unsplash. Bonus points since Samoyeds are some of the cutest dogs out there! A piece of rather popular advice heard in software development is "favour composition over inheritance". I won't go into the details of why as there is an excellent chapter in "Effective Java" about it, as well as this nice article by Eric Lin. This article explores how class delegation can be useful and how it works under the hood. In our case, we had a custom view which should expose an interface looking like this: https://medium.com/media/2efb0d0125ffec7f388ee2df190bcf6a/href Now it was time to create the CanvasCapabilities implementation. https://medium.com/media/3d8b72ac99b28b99f39c95c882a69dce/href Of course, we don't want to start putting logic into our view just for the sake of exposing the interface through it, which meant that the view now had to act as a "proxy" (implementing the interface and calling the ArtboardCanvas ): https://medium.com/media/f3d51d082e7f23d725ef7efafb3fe131/href Not a nice solution, but at least we extracted the logic. The view was still cluttered though :( Class Delegation to the rescue Using the by keyword in Kotlin, properties and even classes can be delegated. You might know it from using lazy : https://medium.com/media/cbea2e6d1363f31e28552d9a8c87823e/href You can also delegate inheritance, which is what we are after. The usage looks like this: https://medium.com/media/5482d423d1b2a0fcff239f25c4ab31e9/href This delegates the methods from CanvasCapabilities to ArtboardCanvas . No more cluttering with "proxy" calls! Under The Hood Under the hood, Kotlin actually doesn't do any "black magic": It just generates a function which invokes the delegate. The bytecode, decompiled to Java looks like this: https://medium.com/media/34cf5d85a4bcf122bc98d74425e9a5dd/href If you have a lot of methods, that code will still be generated and adding to your compiled code's size, but at least it do

## Modern C++ for C Programmers: Part 3

DevFeed: [Modern C++ for C Programmers: Part 3](<https://devfeed.tech/articles/modern-c-for-c-programmers-part-3-36324.md>)

Original publisher: [Read original article](<https://berthub.eu/articles/posts/cpp-3/>)

Published: 2018-07-02T19:30:31Z

Content type: tutorial

Language: en

Sources: [Bert Hubert's writings](<https://devfeed.tech/sources/bert-hubert-s-writings.md>)

Topics: [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [code](<https://devfeed.tech/tags/code.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>)

### AI overview

Part 3 of a tutorial on modern C++ for C programmers explains inheritance and polymorphism, including base and derived classes, virtual methods, runtime type metadata, and related overhead.

### Source excerpt

Welcome back! In part 2 I discussed basic classes, threading, atomic operations, smart pointers, resource acquisition and (very briefly) namespaces. In this part we continue with further C++ features that you can use to spice up your code 'line by line', without immediately having to use all 1400 pages of 'The C++ Programming Language'. Various code samples discussed here can be found on GitHub. If you have any favorite things you'd like to see discussed or questions, please hit me up on @bert_hu_bert or bert@hubertnet.

## Pro Android Studio - Code navigation

DevFeed: [Pro Android Studio - Code navigation](<https://devfeed.tech/articles/pro-android-studio-code-navigation-28666.md>)

Original publisher: [Read original article](<https://jeroenmols.com/blog/2018/02/22/androidstudioshortcuts/>)

Author: info@jeroenmols.com (Jeroen Mols)

Published: 2018-02-22T00:00:00Z

Content type: tutorial

Language: en

Sources: [Jeroen Mols](<https://devfeed.tech/sources/jeroen-mols.md>)

Topics: [Android Studio](<https://devfeed.tech/topics/android-studio.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [Code](<https://devfeed.tech/topics/code.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>)

Tags: [android-studio](<https://devfeed.tech/tags/android-studio.md>), [androidstudio](<https://devfeed.tech/tags/androidstudio.md>), [blogs](<https://devfeed.tech/tags/blogs.md>), [code](<https://devfeed.tech/tags/code.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [shortcuts](<https://devfeed.tech/tags/shortcuts.md>), [tools](<https://devfeed.tech/tags/tools.md>)

### AI overview

A practical guide to navigating and refactoring code in Android Studio. It covers searching for classes, symbols, and files; moving between tests and declarations; inspecting class relationships and inheritance hierarchies; and viewing class structure.

### Source excerpt

Struggling to navigate your code? Getting lost in deep inheritance hierarchies? Hard time figuring out relations between classes? Let's learn how to navigate code in Android Studio like a pro.

## Inheritance gone wrong

DevFeed: [Inheritance gone wrong](<https://devfeed.tech/articles/inheritance-gone-wrong-27277.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/201708/inheritance-gone-wrong/>)

Published: 2017-08-15T00:00:00Z

Content type: tutorial

Language: en

Sources: [Paweł Chudzik](<https://devfeed.tech/sources/pawe-chudzik.md>)

Topics: [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [Java](<https://devfeed.tech/topics/java.md>), [coding](<https://devfeed.tech/topics/coding.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [intellij-idea](<https://devfeed.tech/tags/intellij-idea.md>), [interface](<https://devfeed.tech/tags/interface.md>), [java](<https://devfeed.tech/tags/java.md>)

### AI overview

The article explains how inheritance can expose inappropriate operations through a class hierarchy, using Java's Stack and Vector as an example. It recommends delegation or depending on behavior through interfaces to keep implementations encapsulated and easier to change.

### Source excerpt

We all know how inheritance works and implemented some kind of class hierarchy at least few times during our career. Some of us know already that inheritance is not the silver bullet. Some of us know that inheritance must not be overused and considered with caution. Now I'm going to show you how choosing the quick win might cost you some unexpected troubles in the future. Read more

## Interfaces in Kotlin. Who said interfaces can't have code? (KAD 26)

DevFeed: [Interfaces in Kotlin. Who said interfaces can't have code? (KAD 26)](<https://devfeed.tech/articles/interfaces-in-kotlin-who-said-interfaces-can-t-have-code-kad-26-27173.md>)

Original publisher: [Read original article](<https://antonioleiva.com/interfaces-kotlin>)

Published: 2017-06-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Antonio Leiva](<https://devfeed.tech/sources/antonio-leiva.md>)

Topics: [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [Java](<https://devfeed.tech/topics/java.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [context](<https://devfeed.tech/tags/context.md>), [delegation](<https://devfeed.tech/tags/delegation.md>), [implement](<https://devfeed.tech/tags/implement.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>)

### AI overview

This tutorial explains how Kotlin interfaces can include method implementations, enabling code reuse and composition beyond traditional Java interfaces. It also covers the limitation that interfaces cannot retain state and introduces interface delegation.

### Source excerpt

Everything Android, Kotlin and other random topics

## A decorator vs. a subclass

DevFeed: [A decorator vs. a subclass](<https://devfeed.tech/articles/a-decorator-vs-a-subclass-26264.md>)

Original publisher: [Read original article](<https://www.justinweiss.com/articles/a-decorator-vs-a-subclass/>)

Author: Justin Weiss

Published: 2017-05-09T04:40:15Z

Content type: tutorial

Language: en

Sources: [Justin Weiss](<https://devfeed.tech/sources/justin-weiss.md>)

Topics: [Rails](<https://devfeed.tech/topics/rails.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [code](<https://devfeed.tech/tags/code.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [rails](<https://devfeed.tech/tags/rails.md>)

### AI overview

This article explains when to use a decorator instead of a subclass in Rails. It shows how decorators add behavior to existing objects without inheritance, while preserving the option to use the original object and reducing dependence on implementation details.

### Source excerpt

In my most recent article, I mentioned a great new feature in Rails 5.1, delegate_missing_to. With delegate_missing_to, any method that you can't find on one object is called on another object, instead: class Player delegate_missing_to :@user def initalize(user) @user = user end def points Game.points_for_user(user.id) end end Player.new(user).name # calls user.name But, like Gavin mentioned in the comments, this seems like an odd way to avoid inheritance. Why not just use a subclass? You'd get the same effect, and you don't have to add a whole new feature. It seems like a weird thing to add. There must be a reason delegate_missing_to was added, though. And for Rails features, pull requests are a great way to find those reasons. In this pull request, DHH mentioned why he suggested the feature: Here's a common pattern if you want to build a decorator: That seems like a pretty good place to start digging. Why decorators? When you build a decorator, you're changing the way an object acts, without creating a new subclass. For example, in the code from earlier: class Player delegate_missing_to :@user def initalize(user) @user = user end def points Game.points_for_user(user.id) end end You'd say that "Player decorates user," because a Player almost acts like a User, but has an extra method, points. And it does this without inheritance. Why would you need something like this? That's a tough question to answer, because like many design patterns, it's not always clear where you'd want to use it instead of something else. When would you use a decorator? Decorators could just be a more complicated way to do inheritance. I mean, which of these two lines of code is better? player = Player.new(User.new(name: "Justin")) # Player decorates User player = Player.new(name: "Justin") # Player subclasses User Clearly the second one, right? Here, creating Player as a decorator instead of a subclass is just a waste of code. But sometimes, you want to add functionality to an object later o

## Design Patterns in Ruby

DevFeed: [Design Patterns in Ruby](<https://devfeed.tech/articles/design-patterns-in-ruby-27771.md>)

Original publisher: [Read original article](<https://gagor.pro/book/2016/design-patterns-in-ruby/>)

Author: Tom

Published: 2016-02-10T00:00:00Z

Content type: opinion

Language: en

Sources: [Tomasz Gągor](<https://devfeed.tech/sources/tomasz-gagor.md>)

Topics: [ruby programming language](<https://devfeed.tech/topics/ruby-programming-language.md>), [Programming language](<https://devfeed.tech/topics/programming-language.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>)

Tags: [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [developer](<https://devfeed.tech/tags/developer.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [technology](<https://devfeed.tech/tags/technology.md>)

### AI overview

A personal review of Russ Olsen's Design Patterns in Ruby, describing it as an effective introduction to Ruby for experienced programmers. The review highlights its idiomatic solutions, clear examples, exercises, and discussion of composition versus inheritance.

### Source excerpt

Ruby Wzorce projektowe Author: Russ Olsen My adventure with Ruby books started with "The Ruby Programming Language" . To be honest, it wasn't quite what I was looking for at the time. But "Design Patterns in Ruby" filled that gap perfectly. It provides a quick and effective introduction to the language, which is perfect if you're already familiar with another programming language and don't need a primer on the basics. The book then iteratively explores various programming problems and presents idiomatic Ruby solutions. I particularly enjoyed the section on composition versus inheritance, which clarified why building deep object hierarchies isn't always the best approach. That was a lightbulb moment for me; I finally grasped the benefits of interfaces and felt like I'd become a more capable developer after reading it. The examples were clear and the exercises were engaging.

## Why use Observable.create() and not just inherit from Observable?

DevFeed: [Why use Observable.create() and not just inherit from Observable?](<https://devfeed.tech/articles/why-use-observable-create-and-not-just-inherit-from-observable-29128.md>)

Original publisher: [Read original article](<https://www.grokkingandroid.com/why-use-observable-create-and-not-just-inherit-from-observable/>)

Author: Wolfram Rittmeyer

Published: 2015-10-09T05:00:40Z

Content type: tutorial

Language: en

Sources: [Grokking Android](<https://devfeed.tech/sources/grokking-android.md>)

Topics: [RxJava](<https://devfeed.tech/topics/rxjava.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [hooks](<https://devfeed.tech/topics/hooks.md>), [debug](<https://devfeed.tech/topics/debug.md>), [Monitoring](<https://devfeed.tech/topics/monitoring.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [create](<https://devfeed.tech/tags/create.md>), [debug](<https://devfeed.tech/tags/debug.md>), [hooks](<https://devfeed.tech/tags/hooks.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [monitoring](<https://devfeed.tech/tags/monitoring.md>), [observable](<https://devfeed.tech/tags/observable.md>), [rxjava](<https://devfeed.tech/tags/rxjava.md>)

### AI overview

This tutorial explains why RxJava developers should generally create Observables with Observable.create() instead of inheriting from Observable. It discusses final methods, the fluent API, and hooks that support debugging and monitoring, while noting that inheritance can still be appropriate in cases such as Subject.

### Source excerpt

When starting to use RxJava you have to create Observables. They are at the very core of RxJava. But how to do so? A look at the Observable class might make you dizzy. Looking at the source even more so. Not only does this beast consist of nearly 10.000 lines (though, 7600 lines of that [...] Continue Reading "Why use Observable.create() and not just inherit from Observable?" The post Why use Observable.create() and not just inherit from Observable? appeared first on Grokking Android.

## ReactOS Report on Windows Address Bar Handling and Navigation Updates

DevFeed: [ReactOS Report on Windows Address Bar Handling and Navigation Updates](<https://devfeed.tech/articles/the-bar-of-the-tasks-33024.md>)

Original publisher: [Read original article](<https://reactos.org/blogs/the-bar-of-the-tasks/>)

Published: 2014-05-18T00:00:00Z

Content type: article

Language: en

Sources: [Front Page on ReactOS Website](<https://devfeed.tech/sources/front-page-on-reactos-website.md>)

Topics: [ReactOS](<https://devfeed.tech/topics/reactos.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [debugging](<https://devfeed.tech/topics/debugging.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [opensource](<https://devfeed.tech/topics/opensource.md>)

Tags: [debugging](<https://devfeed.tech/tags/debugging.md>), [free](<https://devfeed.tech/tags/free.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [navigation](<https://devfeed.tech/tags/navigation.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [opensource](<https://devfeed.tech/tags/opensource.md>), [os](<https://devfeed.tech/tags/os.md>), [react](<https://devfeed.tech/tags/react.md>), [reactos](<https://devfeed.tech/tags/reactos.md>), [win32](<https://devfeed.tech/tags/win32.md>), [winapi](<https://devfeed.tech/tags/winapi.md>), [windows](<https://devfeed.tech/tags/windows.md>)

### AI overview

A ReactOS progress report discusses investigating how Windows manages the address bar, including COM and ATL class behavior, interface inheritance, debugging, and functions that populate or update the navigation combobox.

### Source excerpt

Hello! Another weekend is here, time for me to write a new report... Good news! I'm recovered and back on track! ;P The week started by doing some boring investigation on how Windows manages the addressbar. If you didn't guess already, analysing the behaviour of COM(ATL) classes is anything but simple. Interface inheritance is good for encapsulation, but bad for about anything else, including debugging. I did manage to figure out that it has two functions related to filling the addressbar combobox: one of them resets the contents and fills them from scratch, and the other only adds/changes/removes items related to the navigation.

## Things that make me dislike Java

DevFeed: [Things that make me dislike Java](<https://devfeed.tech/articles/things-that-make-me-dislike-java-37860.md>)

Original publisher: [Read original article](<https://carlosbecker.com/posts/things-that-make-me-dislike-java/>)

Author: Carlos Alexandro Becker

Published: 2012-12-15T00:00:00Z

Content type: opinion

Language: en

Sources: [Carlos Becker](<https://devfeed.tech/sources/carlos-becker.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Object-oriented programming (OOP)](<https://devfeed.tech/topics/oop.md>), [class](<https://devfeed.tech/topics/class.md>), [generics](<https://devfeed.tech/topics/generics.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>)

Tags: [generics](<https://devfeed.tech/tags/generics.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [java](<https://devfeed.tech/tags/java.md>), [object-oriented](<https://devfeed.tech/tags/object-oriented.md>)

### AI overview

An opinion piece discussing aspects of Java that the author dislikes, especially its object-oriented model, primitive types, wrapper classes, generics, autoboxing, and null behavior. The author also acknowledges Java's community, specifications, and libraries.

### Source excerpt

So, I just compiled a little list of things that, I believe, make me dislike Java everyday a little more.

## Design Patterns: Bridge

DevFeed: [Design Patterns: Bridge](<https://devfeed.tech/articles/design-patterns-bridge-40672.md>)

Original publisher: [Read original article](<https://radek.io/posts/design-patterns-bridge/>)

Published: 2011-08-26T00:00:00Z

Content type: tutorial

Language: en

Sources: [Radek Pazdera](<https://devfeed.tech/sources/radek-pazdera.md>)

Topics: [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [abstraction](<https://devfeed.tech/topics/abstraction.md>), [implementation](<https://devfeed.tech/topics/implementation.md>), [interface](<https://devfeed.tech/topics/interface.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Python](<https://devfeed.tech/topics/python.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [bridge](<https://devfeed.tech/tags/bridge.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [code](<https://devfeed.tech/tags/code.md>), [design-patterns](<https://devfeed.tech/tags/design-patterns.md>), [examples](<https://devfeed.tech/tags/examples.md>), [github](<https://devfeed.tech/tags/github.md>), [implementation](<https://devfeed.tech/tags/implementation.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [python](<https://devfeed.tech/tags/python.md>), [software-design](<https://devfeed.tech/tags/software-design.md>)

### AI overview

An introduction to the Bridge design pattern, explaining how it decouples abstraction from implementation so they can vary independently. The article presents diagrams and C++ and Python examples, and contrasts Bridge with Adapter.

### Source excerpt

Software design patterns by example

## The UML Class Diagram

DevFeed: [The UML Class Diagram](<https://devfeed.tech/articles/the-uml-class-diagram-40756.md>)

Original publisher: [Read original article](<https://radek.io/posts/uml-class-diagram/>)

Published: 2011-08-13T00:00:00Z

Content type: tutorial

Language: en

Sources: [Radek Pazdera](<https://devfeed.tech/sources/radek-pazdera.md>)

Topics: [class](<https://devfeed.tech/topics/class.md>), [classes](<https://devfeed.tech/topics/classes.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>)

Tags: [aggregation](<https://devfeed.tech/tags/aggregation.md>), [cheat-sheet](<https://devfeed.tech/tags/cheat-sheet.md>), [class](<https://devfeed.tech/tags/class.md>), [classes](<https://devfeed.tech/tags/classes.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [relationships](<https://devfeed.tech/tags/relationships.md>), [software-development](<https://devfeed.tech/tags/software-development.md>)

### AI overview

This article explains UML class diagrams, including how to represent classes, methods, attributes, inheritance, interfaces, associations, aggregation, and composition. It also describes the distinctions among these relationships and their graphical notation.

### Source excerpt

One of the most useful UML diagrams explained.

## Interface Segregation Principle

DevFeed: [Interface Segregation Principle](<https://devfeed.tech/articles/interface-segregation-principle-40702.md>)

Original publisher: [Read original article](<https://radek.io/posts/interface-segregation-principle-in-software-design/>)

Published: 2011-08-12T00:00:00Z

Content type: tutorial

Language: en

Sources: [Radek Pazdera](<https://devfeed.tech/sources/radek-pazdera.md>)

Topics: [Software Engineering](<https://devfeed.tech/topics/software-engineering.md>), [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>), [abstraction](<https://devfeed.tech/topics/abstraction.md>), [reuse](<https://devfeed.tech/topics/reuse.md>)

Tags: [abstraction](<https://devfeed.tech/tags/abstraction.md>), [code](<https://devfeed.tech/tags/code.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [reuse](<https://devfeed.tech/tags/reuse.md>), [software-design](<https://devfeed.tech/tags/software-design.md>), [solid](<https://devfeed.tech/tags/solid.md>)

### AI overview

This tutorial explains the Interface Segregation Principle, the final principle in the SOLID object-oriented design set. It describes how oversized interfaces create unused or dummy methods and recommends splitting them into smaller, purpose-specific interfaces, illustrated with a car example involving automatic transmission and air conditioning.

### Source excerpt

I build software products and write on the Internet.

## Static variables and methods in Python

DevFeed: [Static variables and methods in Python](<https://devfeed.tech/articles/static-variables-and-methods-in-python-40743.md>)

Original publisher: [Read original article](<https://radek.io/posts/static-variables-and-methods-in-python/>)

Published: 2011-07-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [Radek Pazdera](<https://devfeed.tech/sources/radek-pazdera.md>)

Topics: [Python](<https://devfeed.tech/topics/python.md>), [class](<https://devfeed.tech/topics/class.md>), [Inheritance](<https://devfeed.tech/topics/inheritance.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [code](<https://devfeed.tech/tags/code.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [python](<https://devfeed.tech/tags/python.md>), [static](<https://devfeed.tech/tags/static.md>), [variables](<https://devfeed.tech/tags/variables.md>)

### AI overview

A tutorial explaining how Python class variables, static methods, and class methods work. It compares the @staticmethod and @classmethod decorators, including their access to class variables and behavior with inheritance.

### Source excerpt

Bringing a bit of C++ into Python.