# Polymorphism

An object-oriented programming concept that lets derived objects be treated as base-class objects while invoking overridden behavior based on runtime type.

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

## Modern App Protection Requires Polymorphism | Guardsquare

DevFeed: [Modern App Protection Requires Polymorphism | Guardsquare](<https://devfeed.tech/articles/modern-app-protection-requires-polymorphism-guardsquare-26311.md>)

Original publisher: [Read original article](<https://www.guardsquare.com/blog/polymorphic-mobile-app-protection>)

Author: Jason Cortlund - Technical Marketing Writer

Published: 2026-08-18T13:45:43Z

Content type: article

Language: en

Sources: [Guardsquare Blog](<https://devfeed.tech/sources/guardsquare-blog.md>)

Topics: [Mobile](<https://devfeed.tech/topics/mobile.md>), [Mobile Security](<https://devfeed.tech/topics/mobile-security.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Security](<https://devfeed.tech/topics/security.md>), [Development](<https://devfeed.tech/topics/development.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [agentic-ai](<https://devfeed.tech/tags/agentic-ai.md>), [ai](<https://devfeed.tech/tags/ai.md>), [development](<https://devfeed.tech/tags/development.md>), [dexguard](<https://devfeed.tech/tags/dexguard.md>), [ixguard](<https://devfeed.tech/tags/ixguard.md>), [large-language-models-llms](<https://devfeed.tech/tags/large-language-models-llms.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [protection](<https://devfeed.tech/tags/protection.md>), [reverse-engineering](<https://devfeed.tech/tags/reverse-engineering.md>), [security](<https://devfeed.tech/tags/security.md>), [security-research](<https://devfeed.tech/tags/security-research.md>), [thought-leadership](<https://devfeed.tech/tags/thought-leadership.md>), [vulnerabilities](<https://devfeed.tech/tags/vulnerabilities.md>)

### AI overview

The article argues that mobile app protection should use polymorphism, with protections changing for each application build. It links this approach to the risks created by development speed, AI-generated code, and scalable reverse-engineering attacks.

### Source excerpt

According to credit reporting agency Equifax, "...mobile app security is often neglected by developers -- making apps more vulnerable to fraud." The reason for this is quite simple for most organizations: development speed is the dominant priority. In fact, 79% of mobile developers cite time-to-market pressure as the top barrier to stronger protection.

## Benchmarks Are Free Now

DevFeed: [Benchmarks Are Free Now](<https://devfeed.tech/articles/benchmarks-are-free-now-20533.md>)

Original publisher: [Read original article](<https://code.dblock.org/2026/08/15/benchmarks-are-free-now.html>)

Author: Daniel Doubrovkine (dblock@dblock.org)

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

Content type: article

Language: en

Sources: [Daniel Doubrovkine](<https://devfeed.tech/sources/daniel-doubrovkine.md>)

Topics: [Ruby](<https://devfeed.tech/topics/ruby.md>), [Benchmark](<https://devfeed.tech/topics/benchmark.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [GitHub Copilot CLI](<https://devfeed.tech/topics/github-copilot-cli.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [caching](<https://devfeed.tech/tags/caching.md>), [cli](<https://devfeed.tech/tags/cli.md>), [copilot](<https://devfeed.tech/tags/copilot.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [performance](<https://devfeed.tech/tags/performance.md>), [ruby](<https://devfeed.tech/tags/ruby.md>)

### AI overview

A Ruby enum inheritance fix was correct but made subclass lookups about five times slower because merged enum hashes were rebuilt on every call. Benchmarks generated with Copilot CLI exposed the regression, and memoization restored subclass performance to the base-class level. Additional benchmarks quantified the gem's small overhead for hash-backed lookups and much larger overhead for exhaustive matching.

### Source excerpt

My previous post walked through four bugs in ruby-enum, a gem I maintain, all stemming from the fact that class-level instance variables aren't inherited by subclasses. The third fix, #59, made keys, key?, value?, key, value, to_h, parse and each walk up superclass and merge in a parent's enums, so a subclass would see everything its ancestors defined. It was correct, fully tested, and shipped. It also made every one of those methods roughly 5x slower on any subclass. def _enum_hash if superclass < Ruby::Enum superclass.send(:_enum_hash).merge(_own_enum_hash) else _own_enum_hash end end This recomputes the merged hash, walking the entire ancestor chain, on every single call. There's no caching. A one-level subclass calling .value pays for building a brand new hash, on top of the superclass doing the same, every time. The test suite didn't notice because tests check correctness, not speed, and correctness was fine. I only found this because I asked Copilot CLI to add a benchmark script comparing lookups at different inheritance depths, mostly out of curiosity about how the "Benchmarks" section of the README would read next to the new feature. It took one prompt and about a minute to get a working script: class Colors include Ruby::Enum define :RED, 'red' define :GREEN, 'green' end class SubColors < Colors define :BLUE, 'blue' end class SubSubColors < SubColors define :YELLOW, 'yellow' end benchmark('base class (no inheritance)', n) { Colors.value(:RED) } benchmark('subclass (1 level)', n) { SubColors.value(:RED) } benchmark('sub-subclass (2 levels)', n) { SubSubColors.value(:RED) } The first run told the story immediately: a 1-level subclass's .value calls took roughly 5x as long as the base class, and a 2-level subclass was worse still. Nobody had written this benchmark before merging #59 because writing a throwaway benchmark script used to feel like more ceremony than it was worth for a one-off performance check. Now it's a single sentence to an agent, and the scri

## SpectrePaste: An AI-Assisted, Fileless PowerShell Malware Delivery System

DevFeed: [SpectrePaste: An AI-Assisted, Fileless PowerShell Malware Delivery System](<https://devfeed.tech/articles/spectrepaste-22546.md>)

Original publisher: [Read original article](<https://medium.com/walmartglobaltech/spectrepaste-b20bc2f6ded8?source=rss----905ea2b3d4d1---4>)

Author: Joshua Platt

Published: 2026-07-06T18:54:30Z

Content type: article

Language: en

Sources: [Walmart Global Tech](<https://devfeed.tech/sources/walmart-global-tech.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Malware](<https://devfeed.tech/topics/malware.md>), [Threat Research](<https://devfeed.tech/topics/threat-research.md>), [PowerShell](<https://devfeed.tech/topics/powershell.md>), [C2](<https://devfeed.tech/topics/c2.md>), [Caching](<https://devfeed.tech/topics/caching.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>), [Resilience](<https://devfeed.tech/topics/resilience.md>), [Routing (disambiguation)](<https://devfeed.tech/topics/routing.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [Spec Driven Development](<https://devfeed.tech/topics/spec-driven-development.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [backend](<https://devfeed.tech/tags/backend.md>), [c2](<https://devfeed.tech/tags/c2.md>), [cache](<https://devfeed.tech/tags/cache.md>), [cybersecurity](<https://devfeed.tech/tags/cybersecurity.md>), [detection-engineering](<https://devfeed.tech/tags/detection-engineering.md>), [encryption](<https://devfeed.tech/tags/encryption.md>), [malware](<https://devfeed.tech/tags/malware.md>), [malware-analysis](<https://devfeed.tech/tags/malware-analysis.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [powershell](<https://devfeed.tech/tags/powershell.md>), [resilience](<https://devfeed.tech/tags/resilience.md>), [routing](<https://devfeed.tech/tags/routing.md>), [spec-driven-development](<https://devfeed.tech/tags/spec-driven-development.md>), [threat-intelligence](<https://devfeed.tech/tags/threat-intelligence.md>)

### AI overview

The article describes SpectrePaste, a previously undocumented fileless malware delivery system that threat actors used with AI as its primary orchestrator and developer. Its early architecture included automated AMSI-bypass generation, XOR-encrypted payloads, resilient command-and-control traffic handling, caching, request queuing, and administrative priority routing.

### Source excerpt

by Joshua Platt and Jason Reaves [TLP:CLEAR] Earlier this year, Google Threat Intelligence[1] reported threat actors are increasingly deploying novel, AI-enabled malware in active operations[2]. While investigating a recent OSINT article[3] on malware campaign activity reported as "DeepLoad", our threat intelligence team identified a separate, previously undocumented fileless delivery system we track as "SpectrePaste". The prior public reporting correctly suspected AI involvement in the "DeepLoad" delivery chain, but our analysis reveals a more conclusive and concerning reality. AI did not just play a supporting role. It acted as the primary orchestrator and developer behind the entire SpectrePaste system. Threat actors internally referred to the early system as "PasteFast Panel." In this initial iteration, the system was highly modular, structured, and designed specifically for resilience against high-volume bot traffic. One of the hallmarks of automated, AI-assisted development. The early architecture functioned as a centralized PowerShell payload delivery system with several notable features: Automated Evasion Generation: The paste builder module automatically prepended Anti-Malware Scan Interface (AMSI) bypass scripts to payloads upon creation, followed by XOR encryption using a custom obfuscator template. This ensured every payload served was dynamically packed. C2 Resilience & High-Load Handling: The most sophisticated feature of the early version was its custom cache manager queue system. The threat actors anticipated massive, simultaneous beaconing from compromised hosts. To prevent database exhaustion, the panel featured an automated threshold toggle. During traffic spikes, the system queued requests, cached the encrypted payloads in memory, and deduplicated IP addresses to ensure a single infected bot could not inadvertently DDoS the command server. Admin Priority Routing: Developer requirements explicitly prioritized operator access. Administrative routes

## Managing Multi Table Inserts With Room

DevFeed: [Managing Multi Table Inserts With Room](<https://devfeed.tech/articles/managing-multi-table-inserts-with-room-22825.md>)

Original publisher: [Read original article](<http://androidessence.com/multi-table-inserts/>)

Author: Adam McNeilly

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

Content type: article

Language: en

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

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [database](<https://devfeed.tech/tags/database.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interfaces](<https://devfeed.tech/tags/interfaces.md>), [oop](<https://devfeed.tech/tags/oop.md>)

### AI overview

This article explains how to handle multi-table inserts in Room when entities have nested dependencies. It first considers separate DAO interfaces and a wrapper class, then shows how interface inheritance can centralize insertion logic and let dependent DAOs reuse it.

### Source excerpt

A properly relational database may have a type that appears referenced multiple times. In my SpaceNerd playground app, that is the Country object. An Agency has a country, and an Agency is a dependency of a Launch, of a Space Station, and likely more types to come. How do I enforce that any time I insert an Agency, I also insert the Countries associated with it? That's what this blog post sets out to explore, and the answer is much simpler than I thought when I started.

## 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

## 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

## Bazel rule extensions

DevFeed: [Bazel rule extensions](<https://devfeed.tech/articles/bazel-rule-extensions-25413.md>)

Original publisher: [Read original article](<https://smileykeith.com/2025/10/31/bazel-rule-extensions/>)

Author: Keith Smiley

Published: 2025-10-31T17:00:00Z

Content type: tutorial

Language: en

Sources: [Keith Smiley](<https://devfeed.tech/sources/keith-smiley.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [Code](<https://devfeed.tech/topics/code.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [bazel](<https://devfeed.tech/tags/bazel.md>), [extensions](<https://devfeed.tech/tags/extensions.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>)

### AI overview

This article explains Bazel 8.0 rule extensions, which let developers inherit and modify the behavior of existing rules without reimplementing them or maintaining a fork. It presents examples of post-processing rule outputs and manipulating providers, including a use case for consistent debug information across macOS and Linux.

### Source excerpt

One of Bazel's best features is being able to easily write custom rules specific to your project. This is great for many use cases, but when what you really want is to enhance the behavior of existing rules, historically your options have been limited. What you would often do is wrap the existing rule in a macro, and add some number of custom rules to try and achieve the desired effect. When really what you want is to edit the existing rule, without having to re-implement all of its functionality (or maintain a fork). With Bazel 8.0, Googlers added a few new ways to extend existing rules that can help with this use case. In this post we will look at the aptly named rule extensions feature and some practical use cases I have found for it. Basic rule extensions Rule extensions allow you to inherit the behavior of an existing rule, similar to class inheritance in object-oriented programming. Importantly you can make a few modifications to augment the behavior of the rule to your liking. Let's say you have a rule that concatenates the given srcs: def _foo_impl(ctx): output = ctx.actions.declare_file("output.txt") ctx.actions.run_shell( inputs = ctx.files.srcs, outputs = [output], command = "cat {} > {}".format(" ".join([src.path for src in ctx.files.srcs]), output.path), ) return [DefaultInfo(files = depset([output]))] foo = rule( implementation = _foo_impl, attrs = { "srcs": attr.label_list(allow_files = True), }, ) Now let's assume in your project, you want the output file to be sorted. If you own the original rule you could of course change _foo_impl to handle that for you, but if you are relying on a more complex upstream rule, you may not have that luxury. Here's how we can extend this to post-process the file it produces: def _bar_impl(ctx): providers = ctx.super() # Invoke 'foo' and get the providers # NOTE: This assumes there's always only the provider we want. original_output = providers[0].files.to_list()[0] new_output = ctx.actions.declare_file("new_output.tx

## 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.

## Interfaces 101 : Interface Design Considerations Ep. 7

DevFeed: [Interfaces 101 : Interface Design Considerations Ep. 7](<https://devfeed.tech/articles/interfaces-101-interface-design-considerations-ep-7-22217.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2023/03/interfaces-101-interface-design-considerations.html>)

Published: 2023-03-13T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [interfaces](<https://devfeed.tech/topics/interfaces.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [IO](<https://devfeed.tech/topics/io.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [go](<https://devfeed.tech/tags/go.md>), [golang](<https://devfeed.tech/tags/golang.md>), [interface](<https://devfeed.tech/tags/interface.md>), [io](<https://devfeed.tech/tags/io.md>), [io-copy-function](<https://devfeed.tech/tags/io-copy-function.md>), [io-interfaces](<https://devfeed.tech/tags/io-interfaces.md>), [io-reader](<https://devfeed.tech/tags/io-reader.md>), [io-writer](<https://devfeed.tech/tags/io-writer.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

A video tutorial about Go interface design. It explains how interfaces express what code needs, discusses criteria for effective interfaces, and introduces Go's io.Reader and io.Writer interfaces. It also covers polymorphism through type assertions and cautions that overly large interfaces can weaken abstraction.

### Source excerpt

Introduction In episode 6, Miki built a logger package with the aim of making it as versatile as possible. To achieve this, he constructed his logger object with a function that would: accept the io.Writer interface as a parameter and perform type assertions to retrieve other interface types as needed. By building this, Miki demonstrated how polymorphism is achieved with Go by changing the type of a variable with type assertions.

## Interface Delegation

DevFeed: [Interface Delegation](<https://devfeed.tech/articles/interface-delegation-39200.md>)

Original publisher: [Read original article](<https://kt.academy/article/ak-interface-delegation>)

Published: 2023-03-06T00:15:00Z

Content type: tutorial

Language: en

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

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

Tags: [delegates](<https://devfeed.tech/tags/delegates.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>), [safety](<https://devfeed.tech/tags/safety.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This tutorial explains Kotlin interface delegation through the delegation pattern, composition, and comparison with inheritance. It describes how delegation reuses implementations, supports polymorphic behavior, and reduces the additional code needed when specifying a delegate.

### Source excerpt

One of the least known Kotlin features, that can be sometimes found really useful.

## What's a vtable? What's an IUnknown?

DevFeed: [What's a vtable? What's an IUnknown?](<https://devfeed.tech/articles/what-s-a-vtable-what-s-an-iunknown-39729.md>)

Original publisher: [Read original article](<https://www.timdbg.com/posts/vtables/>)

Author: Tim Misiak

Published: 2022-12-18T15:30:09Z

Content type: tutorial

Language: en

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

Topics: [C++](<https://devfeed.tech/topics/c-plus-plus.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [debug](<https://devfeed.tech/topics/debug.md>), [MSVC](<https://devfeed.tech/topics/msvc.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [class](<https://devfeed.tech/tags/class.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [debugger](<https://devfeed.tech/tags/debugger.md>), [function](<https://devfeed.tech/tags/function.md>), [msvc](<https://devfeed.tech/tags/msvc.md>), [virtual](<https://devfeed.tech/tags/virtual.md>), [windows](<https://devfeed.tech/tags/windows.md>)

### AI overview

This tutorial explains how C++ virtual function tables, or vtables, support dynamic dispatch and how they relate to COM objects on Windows. It also introduces debugger-based techniques for examining vtables and discusses errors that can be difficult to diagnose.

### Source excerpt

Understanding vtables (also called VMT/Virtual Method Tables or VFT/Virtual Function Tables) is important for understanding how many C++ features work on any OS. They are even more important to understand on Windows, where vtables are used for communication between modules using COM. There are a few types of errors that can happen when things go wrong with them, and some of these will be extremely difficult to diagnose unless you understand how vtables actually work.

## Why Are There Functions?

DevFeed: [Why Are There Functions?](<https://devfeed.tech/articles/why-are-there-functions-32236.md>)

Original publisher: [Read original article](<https://bruceeckel.com/2022/09/29/why-are-there-functions/>)

Author: Bruce Eckel

Published: 2022-09-29T00:00:00Z

Content type: opinion

Language: en

Sources: [Bruce Eckel - Computing Thoughts](<https://devfeed.tech/sources/bruce-eckel-computing-thoughts.md>)

Topics: [Programming](<https://devfeed.tech/topics/programming.md>), [function](<https://devfeed.tech/topics/function.md>), [Assembly](<https://devfeed.tech/topics/assembly.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [C](<https://devfeed.tech/topics/c.md>), [reusable code](<https://devfeed.tech/topics/reusable-code.md>)

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

### AI overview

The article examines why programmers write functions, drawing on the author's experience with assembly language for embedded systems. It argues that functions reduce repeated code, memory use, duplicate debugging effort, and reliability risks, while enabling reusable code; C automates much of the calling work required in assembly language.

### Source excerpt

Returning from giving my Polymorphism Unbound presentation at StrangeLoop (not yet available on YouTube, but all the examples and presentation slides are on Github), I found myself dissatisfied. Part of this was certainly my failure to cram a 2-hour presentation into 40 minutes (after cutting it down from a day-long, workshop-length size). The bigger issue was my inability to answer the essential question at the end of the presentation: why are we writing polymorphic functions?

## if-else-switch

DevFeed: [if-else-switch](<https://devfeed.tech/articles/if-else-switch-21793.md>)

Original publisher: [Read original article](<http://blog.cleancoder.com/uncle-bob/2021/03/06/ifElseSwitch.html>)

Published: 2021-03-06T00:00:00Z

Content type: opinion

Language: en

Sources: [Robert C. Martin](<https://devfeed.tech/sources/robert-c-martin.md>), [The Clean Code Blog](<https://devfeed.tech/sources/the-clean-code-blog.md>)

Topics: [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Software](<https://devfeed.tech/topics/software.md>), [systems](<https://devfeed.tech/topics/systems.md>), [cloud-infrastructure](<https://devfeed.tech/topics/cloud-infrastructure.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [monolithic-architecture](<https://devfeed.tech/tags/monolithic-architecture.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [software](<https://devfeed.tech/tags/software.md>), [source](<https://devfeed.tech/tags/source.md>), [structure](<https://devfeed.tech/tags/structure.md>)

### AI overview

The article argues that repeated if/else or switch statements create fragile systems and tangled dependencies. It recommends isolating the conditional logic in a factory and using polymorphic objects to break dependencies on lower-level modules, supporting more flexible component-based architectures.

### Source excerpt

A few days ago someone tweeted a question asking which of the following PHP snippets was better than the others, or whether there might be an even better approach. I tweeted my answer in the following cryptic paragraph. Place the if/else cases in a factory object that creates a polymorphic object for each variant. Create the factory in 'main' and pass it into your app. That will ensure that the if/else chain occurs only once. Others have since asked me for an example. Twitter is not the best medium for that so... Firstly, if the sole intent of the programmer is to translate: 0->'male', 1->'female' otherwise -> 'unknown' ...then his refactoring #2 would be my preference. However, I have a hard time believing that the business rules of the system are not using that gender code for making policy decisions. My fear is that the if/else/switch chain that the author was asking about is replicated in many more places within the code. Some of those if/else/switch statements might switch on the integer, and others might switch on the string. It's not inconceivable that you'd find a if/else/switch that used an integer in one case and a string in the next! The proliferation of if/else/switch statements is a common problem in software systems. The fact that they are replicated in many places is problematic because when such statements are inevitably changed, it is easy to miss some. This leads to fragile systems. But there is a worse problem with if/else/switch statements. It's the dependency structure. Such statements tend to have cases that point outwards towards lower level modules. This often means that the module containing the if/else/switch will have source code dependencies upon those lower level modules. That's bad enough. We don't like dependencies that run from high level modules to low level modules. They thwart our desire to create architectures that are made up of independently deployable components. However, the above diagram shows that it's worse than that. Other hig

## Solid Relevance

DevFeed: [Solid Relevance](<https://devfeed.tech/articles/solid-relevance-21791.md>)

Original publisher: [Read original article](<http://blog.cleancoder.com/uncle-bob/2020/10/18/Solid-Relevance.html>)

Published: 2020-10-18T00:00:00Z

Content type: opinion

Language: en

Sources: [Robert C. Martin](<https://devfeed.tech/sources/robert-c-martin.md>), [The Clean Code Blog](<https://devfeed.tech/sources/the-clean-code-blog.md>)

Topics: [Architecture & Design](<https://devfeed.tech/topics/architecture-design.md>), [Code](<https://devfeed.tech/topics/code.md>), [Microservice](<https://devfeed.tech/topics/microservice.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [gui](<https://devfeed.tech/tags/gui.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

The article argues that the SOLID principles remain relevant despite modern development practices such as microservices and reduced reliance on inheritance. It explains that software fundamentals have changed little and illustrates the Single Responsibility Principle by separating business rules, GUI code, SQL queries, communications protocols, and independently changing modules. The supplied text ends partway through the discussion.

### Source excerpt

Recently I received a letter from someone with a concern. It went like this: For years the knowledge of the SOLID principle has been a standard part of our recruiting procedure. Candidates were expected to have a good working knowledge of these principles. Lately, however, one of our managers, who doesn't code much anymore, has questioned whether that is wise. His points were that the Open-Closed principle isn't very important anymore because most of the code we write isn't contained in large monoliths and making changes to small microservices is safe and easy. The Liskov Substitution Principle is long out of date because we don't focus on inheritance nearly as much as we did 20 years ago. I think we should consider Dan North's position on SOLID - "Just write simple code." I wrote the following letter in response: The SOLID principles remain as relevant to day as they were in the 90s (and indeed before that). This is because software hasn't changed all that much in all those years -- and that is because software hasn't change all that much since 1945 when Turing wrote the first lines of code for an electronic computer. Software is still if statements, while loops, and assignment statements -- Sequence, Selection, and Iteration. Every new generation likes to think that their world is vastly different from the generation before. Every new generation is wrong about that; which is something that every new generation learns once the next new generation comes along to tell them how much everything has changed. <grin> So let's walk through the principles, one by one. SRP) The Single Responsibility Principle. Gather together the things that change for the same reasons. Separate things that change for different reasons. It is hard to imagine that this principle is not relevant in software. We do not mix business rules with GUI code. We do not mix SQL queries with communications protocols. We keep code that is changed for different reasons separate so that changes to one part t

## Android and Java Technical Interview Questions for Large Technology Companies

DevFeed: [Android and Java Technical Interview Questions for Large Technology Companies](<https://devfeed.tech/articles/crack-top-android-development-company-interview-23098.md>)

Original publisher: [Read original article](<https://medium.com/android-news/crack-top-android-development-company-interview-f106756f045e?source=rss----8fca399d4de---4>)

Author: Budhdi Sharma

Published: 2020-05-08T20:48:42Z

Content type: tutorial

Language: en

Sources: [Android & Tech News -- Medium](<https://devfeed.tech/sources/android-tech-news-medium.md>)

Topics: [Development](<https://devfeed.tech/topics/development.md>), [Android](<https://devfeed.tech/topics/android.md>), [Java](<https://devfeed.tech/topics/java.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [crack](<https://devfeed.tech/tags/crack.md>), [development](<https://devfeed.tech/tags/development.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [interview](<https://devfeed.tech/tags/interview.md>), [java](<https://devfeed.tech/tags/java.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [tips](<https://devfeed.tech/tags/tips.md>)

### AI overview

This interview-preparation article outlines knowledge areas for Android development interviews, including Java fundamentals, Android questions, advanced development technologies, and cross-platform hybrid development. It highlights topics such as Java APIs, source-code implementation principles, algorithms, design patterns, equality and hash codes, primitive sizes, and polymorphism.

### Source excerpt

The interviewer in interviews asked these questions with top-tier Internet companies. Familiarity with the knowledge points listed in this... Continue reading on AndroidPub "

## Mongoid - Inheritance: change embedded document's type via nested attributes

DevFeed: [Mongoid - Inheritance: change embedded document's type via nested attributes](<https://devfeed.tech/articles/mongoid-inheritance-change-embedded-document-s-type-via-nested-attributes-37450.md>)

Original publisher: [Read original article](<https://iridakos.com/programming/2019/11/22/mongoid-nested-attributes-embedded-type>)

Author: Lazarus Lazaridis

Published: 2019-11-22T07:00:00Z

Content type: tutorial

Language: en

Sources: [Lazarus Lazaridis](<https://devfeed.tech/sources/lazarus-lazaridis.md>)

Topics: [file](<https://devfeed.tech/topics/file.md>), [Rails](<https://devfeed.tech/topics/rails.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Forms](<https://devfeed.tech/topics/forms.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [code](<https://devfeed.tech/tags/code.md>), [create](<https://devfeed.tech/tags/create.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [mongodb](<https://devfeed.tech/tags/mongodb.md>), [mongoid](<https://devfeed.tech/tags/mongoid.md>), [opensource](<https://devfeed.tech/tags/opensource.md>), [programming](<https://devfeed.tech/tags/programming.md>), [rails](<https://devfeed.tech/tags/rails.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial examines problems that arise when changing the type of an embedded Mongoid document through nested attributes. Using a Rails console example with Book and BoardGame subclasses of Item, it demonstrates failed attribute assignments, leftover attributes, and incorrect validators caused by the in-memory object retaining its previous type.

### Source excerpt

I recently faced some issues when trying to update a nested document's type via nested attributes using the mongoid gem. Bare with me if this sentence doesn't make any sense yet. Use case Suppose we have a document named Person that embeds a document that can be any of the types Book or BoardGame which inherit from the class Item. Item class Item include Mongoid::Document embedded_in :person, inverse_of: :item field :name end Book class Book < Item field :authors, type: Array end BoardGame class BoardGame < Item field :players, type: Integer end Person class Person include Mongoid::Document embeds_one :item, inverse_of: :person accepts_nested_attributes_for :item, allow_destroy: true end The problems To simplify the post I won't go with the scenario of building the forms and the controller actions to demonstrate the problems but instead I will simulate the behavior in the rails console. Let's create a Person with a Book as an Item. >> person = Person.create!({ item_attributes: { _type: "Book", name: "Jitterbug Perfume", authors: ["Tom Robbins"] } }) => #<Person _id: 5dd7b01ec2889856ab8a619f, > >> person.item => #<Book _id: 5dd7ae76c2889856ab8a619e, name: "Jitterbug Perfume", _type: "Book", authors: ["Tom Robbins"]> Failing attribute assignments Let's try to change the person's item from Book to BoardGame with 5 players. >> person.update_attributes({ item_attributes: { _type: "BoardGame", name: "Ticket to Ride", players: 5 } }) Traceback (most recent call last): 1: from (irb):9 Mongoid::Errors::UnknownAttribute () message: Attempted to set a value for 'players' which is not allowed on the model Book. summary: Without including Mongoid::Attributes::Dynamic in your model and the attribute does not already exist in the attributes hash, attempting to call Book#players= for it is not allowed. This is also triggered by passing the attribute to any method that accepts an attributes hash, and is raised instead of getting a NoMethodError. resolution: You can include Mongoid::

## Abstracting Kotlin Sealed Classes

DevFeed: [Abstracting Kotlin Sealed Classes](<https://devfeed.tech/articles/abstracting-kotlin-sealed-classes-29349.md>)

Original publisher: [Read original article](<https://arturdryomov.dev/posts/abstracting-kotlin-sealed-classes/>)

Author: Artur Dryomov

Published: 2019-06-04T00:00:00Z

Content type: article

Language: en

Sources: [Artur Dryomov](<https://devfeed.tech/sources/artur-dryomov.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [bytecode](<https://devfeed.tech/tags/bytecode.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [models](<https://devfeed.tech/tags/models.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [properties](<https://devfeed.tech/tags/properties.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [sealed](<https://devfeed.tech/tags/sealed.md>), [sealed-classes](<https://devfeed.tech/tags/sealed-classes.md>)

### AI overview

This article examines ways to declare common properties in Kotlin sealed class hierarchies. It compares approaches involving type declarations, constructors, and separate Java-rooted abstractions, including their ergonomics and generated bytecode implications.

### Source excerpt

Things tend to be similar. Cars and bikes are different for sure but both have wheels, engines, exhaust systems and so on. Such similarities between models are usually described using basic polymorphism in virtual domain modeling. Kotlin makes this process a bit more pragmatic using sealed class declarations. Specifying type hierarchies using sealed classes is simple, but what about declaring common properties? Fortunately or not there are multiple ways to achieve this -- partially because of the Java baggage. Which one is the best?

## The Economics of Generated Code

DevFeed: [The Economics of Generated Code](<https://devfeed.tech/articles/the-economics-of-generated-code-20977.md>)

Original publisher: [Read original article](<https://jakewharton.com/the-economics-of-generated-code/>)

Published: 2019-03-26T00:00:00Z

Content type: article

Language: en

Sources: [Jake Wharton](<https://devfeed.tech/sources/jake-wharton.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Library](<https://devfeed.tech/topics/library.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [JSON](<https://devfeed.tech/topics/json.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [code](<https://devfeed.tech/tags/code.md>), [json](<https://devfeed.tech/tags/json.md>), [library](<https://devfeed.tech/tags/library.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>)

### AI overview

The article explains the economics of generated code: because a generator is written once but its output is repeated many times, optimizing generated output can quickly repay the investment. It examines method-reference counts and shows how consolidating behavior in a runtime-library base class, then explicitly referencing the supertype method, can reduce hundreds of redundant references to one in an API model layer.

### Source excerpt

Among the many things that I've stolen learned from Jesse Wilson is the phrase "the economics of generated code". This captures the idea that the things we value when generating code are different than those we value for code that's manually written. A code generator is only written once but the code it generates occurs many times. Thus, any investment into making the generator emit more efficient code will pay for itself very quickly. This generally means output less code and allocate fewer objects wherever possible. I'd like to expand on that with two specific, real-world examples which I've run into. Extra Method References While it's not as much of a problem as it used to be, method reference count is still something worth keeping an eye on. This is especially true for generated code. Small changes in the generator can result in the count going up or down by the hundreds or thousands. It's common for generated classes to be a subtype of a class in the runtime library. Aside from facilitating polymorphism, this allows consolidating common utilities and behavior. Take a JSON model that wants to retain unknown keys and values encountered during parsing. Each generated class could maintain its own Map<String, ?> for the unknown pairs, but this is a great candidate for consolidation into a base class in the library. abstract class JsonModel { private final Map<String, ?> unknownPairs; public final Map<String, ?> getUnknownPairs() { return unknownPairs; } // ... } Not having a getUnknownPairs() method in each generated class should obviously reduce the count. But since the count is not just about declared methods, reducing the referenced methods in the generated code will also have an impact. Each generated class extends JsonModel and implements toString() which outputs its own fields and the getUnknownPairs() map. final class UserModel extends JsonModel { private final String name; private final String email; // ... @Override public String toString() { return "UserModel{

## Modeling Polymorphism in Django

DevFeed: [Modeling Polymorphism in Django](<https://devfeed.tech/articles/modeling-polymorphism-in-django-33917.md>)

Original publisher: [Read original article](<https://hakibenita.com/modeling-polymorphism-in-django>)

Author: Haki Benita

Published: 2019-01-01T22:00:00Z

Content type: tutorial

Language: en

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

Topics: [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>), [Django](<https://devfeed.tech/topics/django.md>), [Object-relational mapping](<https://devfeed.tech/topics/orm.md>), [Database](<https://devfeed.tech/topics/database.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [articles](<https://devfeed.tech/tags/articles.md>), [django](<https://devfeed.tech/tags/django.md>), [orm](<https://devfeed.tech/tags/orm.md>), [polymorphism](<https://devfeed.tech/tags/polymorphism.md>), [relational-databases](<https://devfeed.tech/tags/relational-databases.md>), [techniques](<https://devfeed.tech/tags/techniques.md>)

### AI overview

The article presents several techniques for modeling polymorphic objects in relational databases using Django's object-relational mapping (ORM).

### Source excerpt

Modeling polymorphism in relational databases is a challenging task. In this article, we present several modeling techniques to represent polymorphic objects in a relational database using the Django object-relational mapping (ORM).

## 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.

## Object Relational Database Management System

DevFeed: [Object Relational Database Management System](<https://devfeed.tech/articles/object-relational-database-management-system-34586.md>)

Original publisher: [Read original article](<https://tapoueh.org/blog/2018/03/object-relational-database-management-system/>)

Author: Dimitri Fontaine PostgreSQL Major Contributor; Author

Published: 2018-03-22T16:40:39Z

Content type: article

Language: en

Sources: [Dimitri Fontaine](<https://devfeed.tech/sources/dimitri-fontaine.md>)

Topics: [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>), [Database](<https://devfeed.tech/topics/database.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [database](<https://devfeed.tech/tags/database.md>), [object-oriented](<https://devfeed.tech/tags/object-oriented.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [ordbms](<https://devfeed.tech/tags/ordbms.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

This article explains why PostgreSQL is described as an object-relational database management system. It introduces object-oriented programming and discusses object-orientation models, including message passing, in relation to database systems and programming languages.

### Source excerpt

PostgreSQL is the world's most advanced open source database, and per the PostgreSQL Wikipedia page it is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards compliance. In this article, we try to understand why would PostgreSQL be named an object-relational thing. What is Object Oriented Programming and how does that apply to a database system?

## An Illustrated Guide to Covariance and Contravariance in Kotlin

DevFeed: [An Illustrated Guide to Covariance and Contravariance in Kotlin](<https://devfeed.tech/articles/an-illustrated-guide-to-covariance-and-contravariance-in-kotlin-25035.md>)

Original publisher: [Read original article](<https://typealias.com/guides/illustrated-guide-covariance-contravariance/>)

Author: author@typealias.com (Dave Leeds)

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

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [generics](<https://devfeed.tech/topics/generics.md>), [Polymorphism](<https://devfeed.tech/topics/polymorphism.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [contravariance](<https://devfeed.tech/tags/contravariance.md>), [covariance](<https://devfeed.tech/tags/covariance.md>), [generic-variance](<https://devfeed.tech/tags/generic-variance.md>), [generics](<https://devfeed.tech/tags/generics.md>), [guide](<https://devfeed.tech/tags/guide.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [interface](<https://devfeed.tech/tags/interface.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This illustrated Kotlin tutorial explains the foundational concepts behind generic variance. It focuses on subtyping, function arguments and results, and how covariance and contravariance appear in class and interface inheritance.

### Source excerpt

Generics can often seem confusing. How often have you started to solve a problem with generics, only to realize that they don't quite work like you thought they did? The good news is that there are some simple, foundational concepts that underpin generic variance. And once you understand those concepts, you won't have to memorize acronyms or resort to trial-and-error - you'll simply understand how and why they work! In this article, I'm going to cover these foundational concepts, and then demonstrate how they play out in Kotlin class and interface inheritance.

## Invariance

DevFeed: [Invariance](<https://devfeed.tech/articles/invariance-25018.md>)

Original publisher: [Read original article](<https://typealias.com/concepts/invariance/>)

Author: author@typealias.com (Dave Leeds)

Published: 2017-11-28T03:03:36Z

Content type: tutorial

Language: en

Sources: [Dave Leeds on Kotlin - typealias.com](<https://devfeed.tech/sources/dave-leeds-on-kotlin-typealias-com.md>)

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

Tags: [classes](<https://devfeed.tech/tags/classes.md>), [function](<https://devfeed.tech/tags/function.md>), [generic](<https://devfeed.tech/tags/generic.md>), [generics](<https://devfeed.tech/tags/generics.md>), [inheritance](<https://devfeed.tech/tags/inheritance.md>), [invariance](<https://devfeed.tech/tags/invariance.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [properties](<https://devfeed.tech/tags/properties.md>), [subtype](<https://devfeed.tech/tags/subtype.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [variance](<https://devfeed.tech/tags/variance.md>)

### AI overview

This tutorial explains invariance in generic subtyping. It shows that generic types can remain unrelated even when their component types have a subtype relationship, and discusses default invariance in Kotlin and Java, multiple type parameters, and variance in inherited properties and function types.

### Source excerpt

When dealing with simple classes, subtyping is straightforward. But once we start talking about generics, subtyping rules become more complicated, and we describe the subtyping rules in terms of variance. What is Invariance? Invariance describes a relationship between two sets of types where the complex types do not subtype at all, despite any subtyping that might exist for the component types. Does that sound confusing?1 Thankfully, it's way more easily demonstrated than defined, so let's look at an example.

[Next page](<https://devfeed.tech/topics/polymorphism.md?cursor=WyIyMDE3LTExLTI4VDAzOjAzOjM2KzAwOjAwIiwgIjgwMGM1ZjA2LTBlNzAtNDgyMy1iNWE5LTQ2NTE2YjJiOWYxMSJd>)