Perils of duplicate finding 14 February 2024 Given an array of integers ([1, 2, 3, 1, 3, 1]), find the elements which are duplicated. No, we’re not interviewing. I’m trying to prevent a user from specifying a reserved value twice. Elsewhere in the file I already have duplicate detection for object tags. val dupes: Map<Int, […]
Intermediate collection avoidance 07 February 2024 Given a list of users, extract their names and join them into a comma-separated list. Kotlin’s extension functions on collections make this trivial. users.map { it.name }.joinToString() Writing this in IntelliJ IDEA produces a “weak warning” offering advice. Call chain on collection type may be simplified An intention action […]
This time we are talking to Jake Wharton and Saket Narayan about how Kotlin and Compose are used in CashApp and why “it is time for XML to die!” Source link
Slope-intercept library design 05 April 2022 The equation y=mx+b defines a line in slope-intercept form. The line will intercept the y-axis at the value b and for each change in x its slope (the amount the line goes up or down) will change by m. Slope-intercept gives me a way to think about the design […]