# Collections

Published articles for Collections.

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

## Kotlin 2.4.20 Collection Checks and Experimental Context-Sensitive Resolution

DevFeed: [Kotlin 2.4.20 Collection Checks and Experimental Context-Sensitive Resolution](<https://devfeed.tech/articles/features-you-waited-for-so-long-in-kotlin-22944.md>)

Original publisher: [Read original article](<https://proandroiddev.com/features-you-waited-for-so-long-in-kotlin-6c822e9e344a?source=rss----c72404660798---4>)

Author: Andrii Dubovyk

Published: 2026-09-14T06:32:51Z

Content type: tutorial

Language: en

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

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-development](<https://devfeed.tech/tags/android-development.md>), [collections](<https://devfeed.tech/tags/collections.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [features](<https://devfeed.tech/tags/features.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [list](<https://devfeed.tech/tags/list.md>), [mobile-app-development](<https://devfeed.tech/tags/mobile-app-development.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [technology](<https://devfeed.tech/tags/technology.md>)

### AI overview

The article explains two Kotlin features: allDistinctBy and allEqualBy in Kotlin 2.4.20 for checking collection values, and experimental context-sensitive resolution introduced in Kotlin 2.2 to reduce repetition when the expected type is known.

### Source excerpt

Kotlin 2.4.20 gives your collections opinions, and 2.2's compiler finally learns to read the room Some Kotlin features get a lot of attention when they arrive. Others are much less noticeable, but still make everyday code a little easier to write. Two examples of the latter are allDistinctBy/ allEqualBy in Kotlin 2.4.20 and context-sensitive resolution, which was introduced experimentally in Kotlin 2.2. allDistinctBy/ allEqualBy: A Simpler Way to Check Collections For years, checking whether all values in a collection were unique often looked something like this: val users = listOf( User(name = "A", age = 20), User(name = "B", age = 25), User(name = "C", age = 30) ) users.map { it.age }.distinct().size == users.size // true It works, but it creates another list, removes duplicates, counts the result, and then compares the sizes just to get a Boolean answer. Kotlin 2.4.20 adds a more direct way to express the same check: users.allDistinctBy { it.age } // true users.allEqualBy { it.age } // false allDistinctBy returns false as soon as it finds a duplicate, so it doesn't need to process the entire collection or create a separate Set. allEqualBy does the opposite: it checks whether all elements produce the same value when passed through the selector. Both functions work with Iterable, Sequence, and arrays. They use structural equality. For floating-point values, they follow Double.equals semantics, so NaN is considered equal to NaN, while -0.0 is different from 0.0. They're still @ExperimentalStdlibApi, so you'll need to opt in before using them in production code. The underlying allDistinct() and allEqual() requests have also been around in YouTrack for quite a while, which makes their appearance in the standard library feel long overdue. Context-Sensitive Resolution: Less Repetition in when The second feature is more about syntax. When the compiler already knows the type you're working with, you can sometimes leave out the type qualifier. Before: enum class Problem {

## Visite du Computer Museum NAM-IP

DevFeed: [Visite du Computer Museum NAM-IP](<https://devfeed.tech/articles/visite-du-computer-museum-nam-ip-41830.md>)

Original publisher: [Read original article](<https://www.bortzmeyer.org/musee-informatique-namur.html>)

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

Content type: opinion

Language: fr

Sources: [Blog de Stéphane Bortzmeyer](<https://devfeed.tech/sources/blog-de-stephane-bortzmeyer.md>)

Topics: [Collections](<https://devfeed.tech/topics/collections.md>), [Micro](<https://devfeed.tech/topics/m3o.md>)

Tags: [collections](<https://devfeed.tech/tags/collections.md>), [computer](<https://devfeed.tech/tags/computer.md>), [mcp](<https://devfeed.tech/tags/mcp.md>)

### AI overview

A personal account of visiting the Computer Museum NAM-IP in Namur, describing its collections of historic computers, software, peripheral equipment, and interactive exhibits. The article reflects on computing history as a series of experiments, failures, and abandoned predictions.

### Source excerpt

Le 13 août de cette année, je suis allé visiter le Computer Museum NAM-IP (https://www.nam-ip.be/) à Namur. Plein de vieux ordinateurs vous y attendent ! Je vous recommande fortement ce musée. Et n'oubliez pas de l'aider financièrement, il a du mal.

## DSO (Days Sales Outstanding): SaaS Formula, Benchmarks, and How to Cut It

DevFeed: [DSO (Days Sales Outstanding): SaaS Formula, Benchmarks, and How to Cut It](<https://devfeed.tech/articles/dso-days-sales-outstanding-saas-formula-benchmarks-and-how-to-cut-it-9818.md>)

Original publisher: [Read original article](<https://dodopayments.com/blogs/dso-days-sales-outstanding-saas/>)

Author: Ayush Agarwal

Published: 2026-06-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dodo Payments Blog](<https://devfeed.tech/sources/dodo-payments-blog.md>)

Topics: [Software as a service](<https://devfeed.tech/topics/saas.md>)

Tags: [accounts-receivable](<https://devfeed.tech/tags/accounts-receivable.md>), [b2b](<https://devfeed.tech/tags/b2b.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [billing](<https://devfeed.tech/tags/billing.md>), [collections](<https://devfeed.tech/tags/collections.md>), [guide](<https://devfeed.tech/tags/guide.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [metric](<https://devfeed.tech/tags/metric.md>), [operational](<https://devfeed.tech/tags/operational.md>), [reduce](<https://devfeed.tech/tags/reduce.md>), [revenue](<https://devfeed.tech/tags/revenue.md>), [saas](<https://devfeed.tech/tags/saas.md>), [saas-finance](<https://devfeed.tech/tags/saas-finance.md>)

### AI overview

A guide for SaaS founders explains how to calculate Days Sales Outstanding (DSO), interpret benchmarks across billing models, and reduce collection times. It also covers DSO's effects on working capital, growth, and bad-debt risk.

### Source excerpt

DSO formula explained for SaaS founders. How to calculate days sales outstanding, what good looks like by billing model, and tactical ways to reduce it.

## SaaS Product Bundling: Collections, Cross-Sells, and AOV Lift

DevFeed: [SaaS Product Bundling: Collections, Cross-Sells, and AOV Lift](<https://devfeed.tech/articles/saas-product-bundling-collections-cross-sells-and-aov-lift-10332.md>)

Original publisher: [Read original article](<https://dodopayments.com/blogs/saas-product-bundling-collections/>)

Author: Ayush Agarwal

Published: 2026-05-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Dodo Payments Blog](<https://devfeed.tech/sources/dodo-payments-blog.md>)

Topics: [Software as a service](<https://devfeed.tech/topics/saas.md>), [Software](<https://devfeed.tech/topics/software.md>)

Tags: [billing](<https://devfeed.tech/tags/billing.md>), [checkout](<https://devfeed.tech/tags/checkout.md>), [collections](<https://devfeed.tech/tags/collections.md>), [conversion](<https://devfeed.tech/tags/conversion.md>), [customer](<https://devfeed.tech/tags/customer.md>), [guide](<https://devfeed.tech/tags/guide.md>), [pitfalls](<https://devfeed.tech/tags/pitfalls.md>), [pricing](<https://devfeed.tech/tags/pricing.md>), [saas](<https://devfeed.tech/tags/saas.md>)

### AI overview

This guide explains how SaaS product collections, cross-sells, and tiered plan selection can increase average order value. It covers collection structure, bundling math, checkout patterns, cannibalization risks, and conversion pitfalls.

### Source excerpt

How SaaS product collections drive AOV lift through unified plan selection, cross-sells, and clean upgrade paths. The bundling math, checkout patterns, and pitfalls.

## Hidden Treasures of Eclipse Collections 2025 Edition

DevFeed: [Hidden Treasures of Eclipse Collections 2025 Edition](<https://devfeed.tech/articles/hidden-treasures-of-eclipse-collections-2025-edition-23019.md>)

Original publisher: [Read original article](<https://www.javaadvent.com/2025/12/hidden-treasures-of-eclipse-collections-2025-edition.html>)

Author: Nikhil Nanivadekar

Published: 2025-12-13T03:03:52Z

Content type: tutorial

Language: en

Sources: [Java Advent Calendar](<https://devfeed.tech/sources/java-advent-calendar.md>)

Topics: [Java](<https://devfeed.tech/topics/java.md>), [Framework](<https://devfeed.tech/topics/framework.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [2025](<https://devfeed.tech/tags/2025.md>), [blog](<https://devfeed.tech/tags/blog.md>), [collections](<https://devfeed.tech/tags/collections.md>), [java](<https://devfeed.tech/tags/java.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

A tutorial demonstrating four lesser-known features of the open source Eclipse Collections framework for Java, including collection-to-map transformation, occurrence counting, grouping and summing, and aggregation.

### Source excerpt

Eclipse Collections is an open source Java Collections framework. In this blog I am going to demonstrate four lesser known features of the framework. I have published similar blogs in Java Advent Calendars of 2018, 2019, 2020, 2021, 2022, 2023, and 2024. Please refer to the resources at the end of the blog for more [...] The post Hidden Treasures of Eclipse Collections 2025 Edition appeared first on JVM Advent.

## Intuitive Proofs for Linked-List Loop Detection and Majority-Element Algorithms

DevFeed: [Intuitive Proofs for Linked-List Loop Detection and Majority-Element Algorithms](<https://devfeed.tech/articles/relatively-non-obvious-tricks-in-solving-simple-algorithmic-problems-38655.md>)

Original publisher: [Read original article](<https://krossovochkin.com/posts/2024_12_21_relatively_non_obvious_tricks_in_solving_simple_algorithmic_problems/>)

Published: 2024-12-21T00:00:00Z

Content type: tutorial

Language: en

Sources: [Vasya Drobushkov](<https://devfeed.tech/sources/vasya-drobushkov.md>)

Topics: [Algorithms, Complexity](<https://devfeed.tech/topics/algorithms-complexity.md>), [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [LeetCode](<https://devfeed.tech/topics/leetcode.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [algorithms](<https://devfeed.tech/tags/algorithms.md>), [array](<https://devfeed.tech/tags/array.md>), [code](<https://devfeed.tech/tags/code.md>), [collections](<https://devfeed.tech/tags/collections.md>), [counter](<https://devfeed.tech/tags/counter.md>), [examples](<https://devfeed.tech/tags/examples.md>), [memory](<https://devfeed.tech/tags/memory.md>), [pointers](<https://devfeed.tech/tags/pointers.md>), [solutions](<https://devfeed.tech/tags/solutions.md>), [time](<https://devfeed.tech/tags/time.md>)

### AI overview

This tutorial explains why concise solutions to seemingly easy algorithmic problems work. It uses linked-list loop detection with slow and fast pointers and majority-element detection with a counter, emphasizing intuitive proofs over implementation alone.

### Source excerpt

Blowing the dust off LeetCode once again, I found myself, as in the past, struggling with coding relatively simple algorithms. Just like with anything else, if you don't practice for years, you lose some of the hands-on experience. On the positive side, I noticed that for some problems, my new submissions were much better and more concise compared to my old ones. That's an awesome feeling--a tangible measure of growth. While tackling certain easy problems, I realized that "easy" usually just means "doesn't require much code." However, the idea behind the optimal solution might still not be very intuitive. Sure, one can use brute force or additional collections, but in most cases, this leads to either a "time limit exceeded" or an "out of memory" error.

## Kotlin var with Read-Only Collections vs. val with Mutable Collections

DevFeed: [Kotlin var with Read-Only Collections vs. val with Mutable Collections](<https://devfeed.tech/articles/mutable-objects-or-properties-39391.md>)

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

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

Content type: tutorial

Language: en

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

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Collections](<https://devfeed.tech/topics/collections.md>)

Tags: [atomic](<https://devfeed.tech/tags/atomic.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [collections](<https://devfeed.tech/tags/collections.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [memory](<https://devfeed.tech/tags/memory.md>), [stateflow](<https://devfeed.tech/tags/stateflow.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This article compares Kotlin var properties holding read-only collections with val properties holding mutable collections. It explains trade-offs involving copying costs, observability, defensive copies, and thread safety, concluding that the preferable choice depends on how the state is accessed and modified.

### Source excerpt

Time to answer the question: var/readonly vs val/mutable. Which one should you use?

## Generics

DevFeed: [Generics](<https://devfeed.tech/articles/generics-25057.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-generics/>)

Author: author@typealias.com (Dave Leeds)

Published: 2024-03-26T00: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: [generics](<https://devfeed.tech/topics/generics.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>)

Tags: [classes](<https://devfeed.tech/tags/classes.md>), [collections](<https://devfeed.tech/tags/collections.md>), [enum-class](<https://devfeed.tech/tags/enum-class.md>), [function](<https://devfeed.tech/tags/function.md>), [generics](<https://devfeed.tech/tags/generics.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-generic-function](<https://devfeed.tech/tags/kotlin-generic-function.md>), [kotlin-generics](<https://devfeed.tech/tags/kotlin-generics.md>), [kotlin-parameterized-types](<https://devfeed.tech/tags/kotlin-parameterized-types.md>), [kotlin-type-argument](<https://devfeed.tech/tags/kotlin-type-argument.md>), [kotlin-type-erasure](<https://devfeed.tech/tags/kotlin-type-erasure.md>), [kotlin-type-parameter](<https://devfeed.tech/tags/kotlin-type-parameter.md>), [kotlin-type-parameter-constraint](<https://devfeed.tech/tags/kotlin-type-parameter-constraint.md>), [kotlin-type-safety](<https://devfeed.tech/tags/kotlin-type-safety.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [list](<https://devfeed.tech/tags/list.md>), [map](<https://devfeed.tech/tags/map.md>), [pair](<https://devfeed.tech/tags/pair.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

A tutorial introducing Kotlin generics through collection types such as List, Pair, and Map, using a beverage-menu example with classes and an enum class.

### Source excerpt

All the way back in Chapter 8, when we introduced collections, we saw our first generic type: List<String> ... then we saw more generics in Chapter 9 when we looked at the Pair and Map classes. In order to stay focused on learning about collection types, we glossed over the details about these classes. Well, we've put off learning about them for long enough! It's finally time for us to gain a full understanding of generics, so buckle up!

## Ansible Set Operations Do Not Preserve List Order

DevFeed: [Ansible Set Operations Do Not Preserve List Order](<https://devfeed.tech/articles/ansible-set-operations-do-not-preserve-list-order-10941.md>)

Original publisher: [Read original article](<https://blog.ipspace.net/2024/02/ansible-set-operations/>)

Published: 2024-02-26T06:08:00Z

Content type: tutorial

Language: en

Sources: [ipSpace.net blog](<https://devfeed.tech/sources/ipspace-net-blog.md>)

Topics: [Ansible](<https://devfeed.tech/topics/ansible.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [Python](<https://devfeed.tech/topics/python.md>), [Deployment](<https://devfeed.tech/topics/deployment.md>)

Tags: [ansible](<https://devfeed.tech/tags/ansible.md>), [collections](<https://devfeed.tech/tags/collections.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [python](<https://devfeed.tech/tags/python.md>)

### AI overview

This article explains why an Ansible intersect filter can produce module lists in a non-deterministic order. The filter converts its arguments to Python sets, whose elements are unordered, so configuration modules such as DHCP and OSPF may be applied in the wrong order. It presents a when condition as a workaround.

### Source excerpt

Here's another Ansible quirk, this time caused by Python set behavior. When I created the initial device configuration deployment playbook in netlab, I wanted to: Be able to specify a list of modules to provision.1 Provision just the modules used in the topology and specified in the list of modules. This allows you to use netlab initial to deploy all configuration modules used in a lab topology or netlab initial -m ospf to deploy just OSPF while surviving netlab initial -m foo (which would do nothing). Read more ...

## Effective Kotlin Item 60: Use appropriate collection types

DevFeed: [Effective Kotlin Item 60: Use appropriate collection types](<https://devfeed.tech/articles/effective-kotlin-item-60-use-appropriate-collection-types-39273.md>)

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

Published: 2023-12-04T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Collections](<https://devfeed.tech/topics/collections.md>), [Data structures](<https://devfeed.tech/topics/data-structures.md>), [optimize](<https://devfeed.tech/topics/optimize.md>)

Tags: [collections](<https://devfeed.tech/tags/collections.md>), [data-structure](<https://devfeed.tech/tags/data-structure.md>), [efficiency](<https://devfeed.tech/tags/efficiency.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [thread](<https://devfeed.tech/tags/thread.md>), [time-complexity](<https://devfeed.tech/tags/time-complexity.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This Kotlin article explains the contracts and implementation considerations of lists, sets, and maps. It focuses on how underlying data structures, mutability, thread safety, and array-based list growth affect collection performance and operation time complexity.

### Source excerpt

Using non-standard collection types to improve performance in Kotlin.

## Effective Kotlin: Best Practices Second Edition Released

DevFeed: [Effective Kotlin: Best Practices Second Edition Released](<https://devfeed.tech/articles/the-second-edition-of-effective-kotlin-best-practices-is-finally-ready-39267.md>)

Original publisher: [Read original article](<https://kt.academy/article/effective-kotlin-second-release>)

Published: 2023-09-07T00:00:00Z

Content type: release

Language: en

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

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Development](<https://devfeed.tech/topics/development.md>)

Tags: [best-practices](<https://devfeed.tech/tags/best-practices.md>), [caching](<https://devfeed.tech/tags/caching.md>), [collections](<https://devfeed.tech/tags/collections.md>), [dependency-injection](<https://devfeed.tech/tags/dependency-injection.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [release](<https://devfeed.tech/tags/release.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

The second edition of Effective Kotlin: Best Practices has been released. The article describes included and removed items covering Kotlin development practices such as dependency injection, object declarations, caching, collection types, grouping, explicit types, null handling, and property delegation.

### Source excerpt

Learn about the new release of the famous book about the best practices for Kotlin development.

## Effective Kotlin Item 2: Eliminate critical sections

DevFeed: [Effective Kotlin Item 2: Eliminate critical sections](<https://devfeed.tech/articles/effective-kotlin-item-2-eliminate-critical-sections-39292.md>)

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

Published: 2023-08-28T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [Concurrency](<https://devfeed.tech/topics/concurrency.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Concurrent Programming](<https://devfeed.tech/topics/concurrent-programming.md>), [Operating system](<https://devfeed.tech/topics/operating-system.md>)

Tags: [bugs](<https://devfeed.tech/tags/bugs.md>), [collections](<https://devfeed.tech/tags/collections.md>), [cpu](<https://devfeed.tech/tags/cpu.md>), [critical](<https://devfeed.tech/tags/critical.md>), [execution](<https://devfeed.tech/tags/execution.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [state](<https://devfeed.tech/tags/state.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This tutorial explains why concurrent modifications to shared mutable state can produce lost updates and incorrect object states. It introduces threads, time slicing, and synchronization concerns in Kotlin/JVM, using an incrementing-variable example and discussing bugs involving collections.

### Source excerpt

Learn why do we need to synchronize access to mutable state, and how to secure it.

## How to Turn a List of Flat Elements into a Hierarchy in Java, SQL, or jOOQ

DevFeed: [How to Turn a List of Flat Elements into a Hierarchy in Java, SQL, or jOOQ](<https://devfeed.tech/articles/how-to-turn-a-list-of-flat-elements-into-a-hierarchy-in-java-sql-or-jooq-28945.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-turn-a-list-of-flat-elements-into-a-hierarchy-in-java-sql-or-jooq/>)

Author: lukaseder

Published: 2023-03-24T15:45:28Z

Content type: tutorial

Language: en

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

Topics: [Java](<https://devfeed.tech/topics/java.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Jackson](<https://devfeed.tech/topics/jackson.md>), [JSON](<https://devfeed.tech/topics/json.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [collections](<https://devfeed.tech/tags/collections.md>), [collector](<https://devfeed.tech/tags/collector.md>), [collectors](<https://devfeed.tech/tags/collectors.md>), [hierarchical-sql](<https://devfeed.tech/tags/hierarchical-sql.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [jackson](<https://devfeed.tech/tags/jackson.md>), [java](<https://devfeed.tech/tags/java.md>), [jooq-development](<https://devfeed.tech/tags/jooq-development.md>), [json](<https://devfeed.tech/tags/json.md>), [nested-collections](<https://devfeed.tech/tags/nested-collections.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [recursive-sql](<https://devfeed.tech/tags/recursive-sql.md>), [sql](<https://devfeed.tech/tags/sql.md>)

### AI overview

A tutorial on converting flat parent-child data into hierarchical structures using SQL, Java, or jOOQ. It compares a recursive PostgreSQL query with jOOQ 3.19 and a reusable pure-Java Collector, and discusses JSON serialization with Jackson and type inference considerations.

### Source excerpt

Occasionally, you want to write a SQL query and fetch a hierarchy of data, whose flat representation may look like this: The result might be: |id |parent_id|label | |---|---------|-------------------| |1 | |C: | |2 |1 |eclipse | |3 |2 |configuration | |4 |2 |dropins | |5 |2 |features | |7 |2 |plugins | |8 |2 ... Continue reading How to Turn a List of Flat Elements into a Hierarchy in Java, SQL, or jOOQ ->

## The Many Different Ways to Fetch Data in jOOQ

DevFeed: [The Many Different Ways to Fetch Data in jOOQ](<https://devfeed.tech/articles/the-many-different-ways-to-fetch-data-in-jooq-28962.md>)

Original publisher: [Read original article](<https://blog.jooq.org/the-many-different-ways-to-fetch-data-in-jooq/>)

Author: lukaseder

Published: 2022-05-19T07:29:09Z

Content type: tutorial

Language: en

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

Topics: [jooq](<https://devfeed.tech/topics/jooq.md>), [Java](<https://devfeed.tech/topics/java.md>), [SQL](<https://devfeed.tech/topics/sql.md>)

Tags: [collections](<https://devfeed.tech/tags/collections.md>), [collector](<https://devfeed.tech/tags/collector.md>), [convenience](<https://devfeed.tech/tags/convenience.md>), [fetching](<https://devfeed.tech/tags/fetching.md>), [java](<https://devfeed.tech/tags/java.md>), [jdbc](<https://devfeed.tech/tags/jdbc.md>), [joo-f6a0c60d3d07](<https://devfeed.tech/tags/joo-f6a0c60d3d07.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [optional](<https://devfeed.tech/tags/optional.md>), [r2dbc](<https://devfeed.tech/tags/r2dbc.md>), [reactive-streams](<https://devfeed.tech/tags/reactive-streams.md>), [sql](<https://devfeed.tech/tags/sql.md>), [stream-api](<https://devfeed.tech/tags/stream-api.md>), [streams](<https://devfeed.tech/tags/streams.md>)

### AI overview

This tutorial explains several ways to fetch data with jOOQ, including eager result-set fetching, external and internal iteration, single-record retrieval, optional results, and resource-managed fetching for large data sets.

### Source excerpt

The jOOQ API is all about convenience, and as such, an important operation (the most important one?) like fetch() must come with convenience, too. The default way to fetch data is this: It fetches the entire result set into memory and closes the underlying JDBC resources eagerly. But what other options do we have? Iterable ... Continue reading The Many Different Ways to Fetch Data in jOOQ ->

## How to Typesafely Map a Nested SQL Collection into a Nested Java Map with jOOQ

DevFeed: [How to Typesafely Map a Nested SQL Collection into a Nested Java Map with jOOQ](<https://devfeed.tech/articles/how-to-typesafely-map-a-nested-sql-collection-into-a-nested-java-map-with-jooq-28946.md>)

Original publisher: [Read original article](<https://blog.jooq.org/how-to-typesafely-map-a-nested-sql-collection-into-a-nested-java-map-with-jooq/>)

Author: lukaseder

Published: 2022-05-09T10:06:51Z

Content type: tutorial

Language: en

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

Topics: [Java](<https://devfeed.tech/topics/java.md>), [SQL](<https://devfeed.tech/topics/sql.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [data](<https://devfeed.tech/topics/data.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>)

Tags: [collections](<https://devfeed.tech/tags/collections.md>), [data](<https://devfeed.tech/tags/data.md>), [data-structures](<https://devfeed.tech/tags/data-structures.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [java](<https://devfeed.tech/tags/java.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [jooq-in-use](<https://devfeed.tech/tags/jooq-in-use.md>), [map](<https://devfeed.tech/tags/map.md>), [mapping](<https://devfeed.tech/tags/mapping.md>), [multiset](<https://devfeed.tech/tags/multiset.md>), [nested-collections](<https://devfeed.tech/tags/nested-collections.md>), [nested-maps](<https://devfeed.tech/tags/nested-maps.md>), [nested-records](<https://devfeed.tech/tags/nested-records.md>), [sql](<https://devfeed.tech/tags/sql.md>), [stack-overflow](<https://devfeed.tech/tags/stack-overflow.md>), [typesafety](<https://devfeed.tech/tags/typesafety.md>)

### AI overview

This tutorial shows how to use jOOQ 3.15's ad-hoc conversion API and nested collection features to map a nested SQL collection into a type-safe nested Java Map. It uses the Sakila database example and explains how collectors preserve insertion order.

### Source excerpt

A really cool, recent question on Stack Overflow was about how to map a nested collection into a Java Map with jOOQ. In the past, I've blogged about the powerful MULTISET operator many times, which allows for nesting collections in jOOQ. This time, instead of nesting data into a List<UserType>, why not nest it in ... Continue reading How to Typesafely Map a Nested SQL Collection into a Nested Java Map with jOOQ ->

## Collections: Maps

DevFeed: [Collections: Maps](<https://devfeed.tech/articles/collections-maps-25060.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-maps/>)

Author: author@typealias.com (Dave Leeds)

Published: 2022-05-04T00: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>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [associate](<https://devfeed.tech/tags/associate.md>), [association](<https://devfeed.tech/tags/association.md>), [build](<https://devfeed.tech/tags/build.md>), [collections](<https://devfeed.tech/tags/collections.md>), [groupby](<https://devfeed.tech/tags/groupby.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [map](<https://devfeed.tech/tags/map.md>), [maps](<https://devfeed.tech/tags/maps.md>), [pair](<https://devfeed.tech/tags/pair.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

A tutorial chapter introduces maps as a Kotlin collection for storing associations between values. It explains the concept using a hardware-and-tools example and begins showing how to create associations with a class constructor.

### Source excerpt

In the last chapter, we saw how collections, such as lists and sets, can be used to do things that couldn't be done easily with separate, individual variables. In this chapter, we're going to look at another kind of collection--a map, which can hold many associations between values. Let's check it out! The Right Tool for the Job "You gotta use the right tool for the job." That's what Mr. Patchwell taught his young son, Jack, who was just starting to learn how to become a handyman like his old man.

## Collections: Lists and Sets

DevFeed: [Collections: Lists and Sets](<https://devfeed.tech/articles/collections-lists-and-sets-25049.md>)

Original publisher: [Read original article](<https://typealias.com/start/kotlin-collections/>)

Author: author@typealias.com (Dave Leeds)

Published: 2022-04-18T00: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>), [Code](<https://devfeed.tech/topics/code.md>), [Learning](<https://devfeed.tech/topics/learning.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [collection-operations](<https://devfeed.tech/tags/collection-operations.md>), [collections](<https://devfeed.tech/tags/collections.md>), [filter](<https://devfeed.tech/tags/filter.md>), [foreach](<https://devfeed.tech/tags/foreach.md>), [introduction](<https://devfeed.tech/tags/introduction.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [learn-to-program](<https://devfeed.tech/tags/learn-to-program.md>), [learning](<https://devfeed.tech/tags/learning.md>), [list](<https://devfeed.tech/tags/list.md>), [map](<https://devfeed.tech/tags/map.md>), [programming](<https://devfeed.tech/tags/programming.md>), [set](<https://devfeed.tech/tags/set.md>)

### AI overview

A Kotlin tutorial introduces collections by explaining how to group values and begins demonstrating lists and sets through a book-list example.

### Source excerpt

So far, we've only worked with variables as individual values. Writing Kotlin becomes so much more interesting once we start putting values together in such a way that we can work with them as a collection. To learn about collections, let's visit Libby, a bright young lady who's always got a book nearby! Let's put things together! Libby is a voracious reader. She's always on the lookout for a great novel, so whenever someone tells her about a good book, she jots down the title on a list that she keeps on a sheet of paper.

## Save and share your GraphQL operations in Apollo Explorer!

DevFeed: [Save and share your GraphQL operations in Apollo Explorer!](<https://devfeed.tech/articles/save-and-share-your-graphql-operations-in-apollo-explorer-23501.md>)

Original publisher: [Read original article](<https://www.apollographql.com/blog/save-and-share-your-graphql-operations-in-apollo-explorer>)

Author: Parul Schroff

Published: 2022-03-22T08:06:18Z

Content type: tutorial

Language: en

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

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>)

Tags: [announcement](<https://devfeed.tech/tags/announcement.md>), [apollo](<https://devfeed.tech/tags/apollo.md>), [collections](<https://devfeed.tech/tags/collections.md>), [free](<https://devfeed.tech/tags/free.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [team](<https://devfeed.tech/tags/team.md>)

### AI overview

Apollo Studio introduces Operation Collections, a free feature that lets users save, organize, and share GraphQL operations in Apollo Explorer. Collections can be personal or shared and can be organized for different use cases, client apps, and personas.

### Source excerpt

Last year on popular request, we brought tabs to Explorer. And today, we are taking it up another notch! You can now save your operations in Explorer and share them with your team using Operation Collections! What is an Operation Collection? Operation Collections are a new, free feature in Apollo Studio that help you save and organize operations in folders that align to different use cases, client apps, personas and more.

## Effective Kotlin Item 56: Consider using groupingBy instead of groupBy

DevFeed: [Effective Kotlin Item 56: Consider using groupingBy instead of groupBy](<https://devfeed.tech/articles/effective-kotlin-item-56-consider-using-groupingby-instead-of-groupby-39280.md>)

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

Published: 2021-10-11T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [groupby](<https://devfeed.tech/topics/groupby.md>), [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Optimization](<https://devfeed.tech/topics/optimization.md>), [performance-optimization](<https://devfeed.tech/topics/performance-optimization.md>), [Collections](<https://devfeed.tech/topics/collections.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [collections](<https://devfeed.tech/tags/collections.md>), [groupby](<https://devfeed.tech/tags/groupby.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [optimization](<https://devfeed.tech/tags/optimization.md>), [performance](<https://devfeed.tech/tags/performance.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This tutorial explains how Kotlin's groupBy and groupingBy functions organize elements from an iterable by key. It describes groupBy as the simpler option that creates collections for each key, while groupingBy can reduce work and memory use in performance-critical code by processing groups through operations such as counting and aggregation.

### Source excerpt

What Grouping is, and how groupingBy instead of groupBy can be a performance optimization.

## Effective Kotlin Item 54: Prefer Sequences for big collections with more than one processing step

DevFeed: [Effective Kotlin Item 54: Prefer Sequences for big collections with more than one processing step](<https://devfeed.tech/articles/effective-kotlin-item-54-prefer-sequences-for-big-collections-with-more-than-one-processing-step-39290.md>)

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

Published: 2021-09-20T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [Sequences](<https://devfeed.tech/topics/sequences.md>), [Collections](<https://devfeed.tech/topics/collections.md>), [.NET](<https://devfeed.tech/topics/net.md>)

Tags: [collections](<https://devfeed.tech/tags/collections.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lazy](<https://devfeed.tech/tags/lazy.md>), [order-of-operations](<https://devfeed.tech/tags/order-of-operations.md>), [sequences](<https://devfeed.tech/tags/sequences.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

This article explains the difference between Kotlin collection and sequence processing. Sequences are lazy: intermediate operations build a processing chain, and calculations occur during terminal operations. The article discusses their element-by-element ordering, reduced processing work, support for infinite sequences, and avoidance of intermediate collections.

### Source excerpt

What the difference between list and sequence processing is, and when each should be preferred.

## Using the Kotlin standard library in Java

DevFeed: [Using the Kotlin standard library in Java](<https://devfeed.tech/articles/using-the-kotlin-standard-library-in-java-25888.md>)

Original publisher: [Read original article](<https://medium.com/google-developer-experts/using-the-kotlin-standard-library-in-java-ea0766deac10?source=rss-1331e67af4e1------2>)

Author: Danny Preussler

Published: 2021-06-14T19:01:08Z

Content type: tutorial

Language: en

Sources: [Stories by Danny Preussler on Medium](<https://devfeed.tech/sources/stories-by-danny-preussler-on-medium.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Java](<https://devfeed.tech/topics/java.md>), [Library](<https://devfeed.tech/topics/library.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [collections](<https://devfeed.tech/tags/collections.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [java](<https://devfeed.tech/tags/java.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-beginners](<https://devfeed.tech/tags/kotlin-beginners.md>), [kotlin-standard-library](<https://devfeed.tech/tags/kotlin-standard-library.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>)

### AI overview

This tutorial explains how Java code can use Kotlin standard-library functions through static imports. It covers list creation, Kotlin free functions compiled into classes, and extension functions exposed to Java with the receiver as the first argument.

### Source excerpt

Using the Kotlin standard library from Javagiphy.com If you work with Kotlin on a daily basis you probably love the language and don't want to go back to Java. Though, many of us work on a codebase that isn't purely Kotlin. Our Android codebase at SoundCloud still has a fair amount of code written in Java. This percentage gets smaller over time but there is no urgent need for mass migration of the remains right now. Therefore, every once in a while, I find myself, changing Java files. In those cases, I miss some of the Kotlin functions I'm used to; I can easily think of string manipulation or handling collections as examples. Of course, Java has powerful utility libraries such as Googles Guava or Apache Commons, libraries many of which we used to work with in the world before Kotlin. But when writing Kotlin code all day, remembering those "older" APIs is sometimes hard. It is a complete context switch. It would be much easier to use what we use in Kotlin. And you should! Let me show you! Let's assume we want to create a list of items. In Kotlin, we would write: val items = listOf( items1, item2, item3 ) In Java, I would write it as: List<Item> items = Arrays.asList(item1, item2, items3); Usage is pretty much the same but you still need to remember the name of the function. Wouldn't it be easier to just use: List<Item> items = listOf(item1, item2, items3); And yes you can! All you need to do is to static importthat function! This works aslistOf, like many of our daily Kotlin utility functions, are simply static functions you can use from Java. And even better, as your project already uses Kotlin, you already got those dependencies included anyway, no additional library needed. A closer look If you would click on the details of listOf from Kotlin, you would end up in a file called Collections.kt and the definition looks like this: public fun <T> listOf(vararg elements: T): List<T> It is a free function, not bound to any class. But from a Java perspective this looks so

## Collection like objects in python

DevFeed: [Collection like objects in python](<https://devfeed.tech/articles/collection-like-objects-in-python-27328.md>)

Original publisher: [Read original article](<https://blog.pchudzik.com/202004/python-and-collection-like-objects/>)

Published: 2020-04-15T00:00:00Z

Content type: tutorial

Language: en

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

Topics: [Python](<https://devfeed.tech/topics/python.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Protocol (disambiguation)](<https://devfeed.tech/topics/protocol.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [behavior](<https://devfeed.tech/tags/behavior.md>), [class](<https://devfeed.tech/tags/class.md>), [collections](<https://devfeed.tech/tags/collections.md>), [dsl](<https://devfeed.tech/tags/dsl.md>), [functional](<https://devfeed.tech/tags/functional.md>), [list](<https://devfeed.tech/tags/list.md>), [programming-language](<https://devfeed.tech/tags/programming-language.md>), [protocol](<https://devfeed.tech/tags/protocol.md>), [python](<https://devfeed.tech/tags/python.md>), [set](<https://devfeed.tech/tags/set.md>), [slices](<https://devfeed.tech/tags/slices.md>)

### AI overview

A tutorial on implementing Python collection-like objects using the collections protocol. It discusses slices and methods such as __getitem__, __setitem__, __delitem__, __iter__, __contains__, and __missing__, including how they support collection behavior and domain-specific language extensions.

### Source excerpt

Collections are an important part of every programming language. In python, there is a couple of built-in collections like list, set, dictionary but I'm not going to dig into them now. In this post, I'll explore what it takes to implement collection like objects on your own using collections protocol. Read more

## When to Use Sequences

DevFeed: [When to Use Sequences](<https://devfeed.tech/articles/when-to-use-sequences-25045.md>)

Original publisher: [Read original article](<https://typealias.com/guides/when-to-use-sequences/>)

Author: author@typealias.com (Dave Leeds)

Published: 2019-09-16T00: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>), [Streams](<https://devfeed.tech/topics/streams.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [benchmark](<https://devfeed.tech/tags/benchmark.md>), [benchmarks](<https://devfeed.tech/tags/benchmarks.md>), [collections](<https://devfeed.tech/tags/collections.md>), [guide](<https://devfeed.tech/tags/guide.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [performance](<https://devfeed.tech/tags/performance.md>), [programming](<https://devfeed.tech/tags/programming.md>), [sequences](<https://devfeed.tech/tags/sequences.md>), [series](<https://devfeed.tech/tags/series.md>), [stateful](<https://devfeed.tech/tags/stateful.md>), [stateless](<https://devfeed.tech/tags/stateless.md>), [streams](<https://devfeed.tech/tags/streams.md>)

### AI overview

A tutorial comparing Kotlin sequences with normal collections and Java streams. It explains performance trade-offs, including how operation-chain length and intermediate collections can affect efficiency, while emphasizing that benchmarks with realistic data are needed for specific code.

### Source excerpt

One of the most common questions I get about Kotlin's sequences is this: "When should I use sequences, and when should I use normal collections?" That's the question we're going to answer in this third and final article in this series! We're going to look at the trade-offs of each, including the main things that affect their performance. Then, we'll look at how Kotlin's sequences stack up against Java streams, a similar concept.

## Inside Sequences: Create Your Own Sequence Operations

DevFeed: [Inside Sequences: Create Your Own Sequence Operations](<https://devfeed.tech/articles/inside-sequences-create-your-own-sequence-operations-25038.md>)

Original publisher: [Read original article](<https://typealias.com/guides/inside-kotlin-sequences/>)

Author: author@typealias.com (Dave Leeds)

Published: 2019-07-23T05: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>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [collection-operations](<https://devfeed.tech/tags/collection-operations.md>), [collections](<https://devfeed.tech/tags/collections.md>), [data](<https://devfeed.tech/tags/data.md>), [guide](<https://devfeed.tech/tags/guide.md>), [intermediate](<https://devfeed.tech/tags/intermediate.md>), [iterable](<https://devfeed.tech/tags/iterable.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [programming](<https://devfeed.tech/tags/programming.md>), [sequences](<https://devfeed.tech/tags/sequences.md>), [terminal](<https://devfeed.tech/tags/terminal.md>)

### AI overview

A tutorial that examines how Kotlin sequences process collection elements and explains their relationship to iterables and iterators. It also demonstrates how to create a custom sequence class and use it in an operation chain.

### Source excerpt

Sequences are a fantastic way to process collections of data in a way that can perform better than the standard collection operations, as we saw in the previous article, Kotlin Sequences: An Illustrated Guide. Today, we're going even deeper! We're going to look under the hood - inside Kotlin sequences - in order to understand how they work like never before! In fact, by the end of this article, we'll even create our very own Sequence class and plug it into an operation chain!

[Next page](<https://devfeed.tech/tags/collections.md?cursor=WyIyMDE5LTA3LTIzVDA1OjAwOjAwKzAwOjAwIiwgImJmMmM2Mjg3LTdkNjUtNDRjMS1iZjk4LTg2YWMxNzE3ZDNmZSJd>)