# Louis CAD doing software

Louis CAD dev blog

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

## Optimized Chessboard Pattern VectorDrawable in Kotlin

DevFeed: [Optimized Chessboard Pattern VectorDrawable in Kotlin](<https://devfeed.tech/articles/optimized-chessboard-pattern-vectordrawable-in-kotlin-26304.md>)

Original publisher: [Read original article](<https://blog.louiscad.com/optimized-chessboard-pattern-vectordrawable-in-kotlin>)

Author: Louis CAD

Published: 2022-07-15T14:16:49Z

Content type: tutorial

Language: en

Sources: [Louis CAD doing software](<https://devfeed.tech/sources/louis-cad-doing-software.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Android](<https://devfeed.tech/topics/android.md>), [SVG](<https://devfeed.tech/topics/svg.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [design](<https://devfeed.tech/tags/design.md>), [graphic-design](<https://devfeed.tech/tags/graphic-design.md>), [graphics](<https://devfeed.tech/tags/graphics.md>), [icons](<https://devfeed.tech/tags/icons.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [scripting](<https://devfeed.tech/tags/scripting.md>), [svg](<https://devfeed.tech/tags/svg.md>)

### AI overview

A Kotlin developer describes creating a chessboard pattern in Android VectorDrawable format for distinguishing debug and minified Wear OS app variants. The resulting file was five times smaller than the initial version.

### Source excerpt

Trust me, I would have never been able to make such an efficient VectorDrawable with a designer tool like Sketch, Affinity Designer, or Adobe Illustrator. This is the story of how I came to draw a chessboard pattern in VectorDrawable format using Kot...

## Coroutines racing! Why, and how.

DevFeed: [Coroutines racing! Why, and how.](<https://devfeed.tech/articles/coroutines-racing-why-and-how-26302.md>)

Original publisher: [Read original article](<https://blog.louiscad.com/coroutines-racing-why-and-how>)

Author: Louis CAD

Published: 2021-11-08T07:52:48Z

Content type: tutorial

Language: en

Sources: [Louis CAD doing software](<https://devfeed.tech/sources/louis-cad-doing-software.md>)

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

Tags: [asynchronous](<https://devfeed.tech/tags/asynchronous.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [coroutines](<https://devfeed.tech/tags/coroutines.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>)

### AI overview

A Kotlin tutorial about racing multiple related coroutines so that the first operation to complete cancels the remaining contenders. It introduces use cases and discusses a straightforward approach and its shortcomings.

### Source excerpt

Over the years, I found myself needing the following: Run multiple related coroutines (i.e. asynchronous operations), and when one completes, cancel/stop the other ones. As usual, and especially since we're in Kotlin, I have been looking for the easi...

## How to return 2+ values with 0 allocation in Kotlin

DevFeed: [How to return 2+ values with 0 allocation in Kotlin](<https://devfeed.tech/articles/how-to-return-2-values-with-0-allocation-in-kotlin-26303.md>)

Original publisher: [Read original article](<https://blog.louiscad.com/how-to-return-2-values-with-0-allocation-in-kotlin>)

Author: Louis CAD

Published: 2021-09-20T11:29:26Z

Content type: tutorial

Language: en

Sources: [Louis CAD doing software](<https://devfeed.tech/sources/louis-cad-doing-software.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [Refactoring](<https://devfeed.tech/topics/refactoring.md>)

Tags: [compiler](<https://devfeed.tech/tags/compiler.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [programming](<https://devfeed.tech/tags/programming.md>), [programming-languages](<https://devfeed.tech/tags/programming-languages.md>), [refactoring](<https://devfeed.tech/tags/refactoring.md>), [val](<https://devfeed.tech/tags/val.md>)

### AI overview

A Kotlin technique for returning multiple values from a function without extra allocation or a separately named class. The approach combines inline functions or lambdas, read-only properties, and contracts, while noting the potential code-size tradeoff of inlining.

### Source excerpt

The problem Most programming languages, including Kotlin, only allow returning one value, and there's a reason for that: We don't want to depend solely on the order of the parameters, because it can easily break through refactoring, or even before th...