I wish more #Kotlin assertion libraries had assertion functions as expressions so that they could be chained. For example:

result.expectSuccess() equalTo 123 httpResponse.expectStatus(OK).body.equalTo("{some json}")


This is your regular reminder that pull requests is a waste when working with people you know and trust (e.g. same company). Here is a more detailed reasoning by @d_stepanovic https://vimeo.com/842233600 (thanks to @quii for the link) #pullrequest #programming #softwareengineering #coding


You might have noticed that most meetings and conferences follow the same pattern of one person talking and everyone else listening. (Ok, maybe enterprise “agile” made standups and retros more widespread.) But is it the only way for a group of people to collaborate or share information? Not at all! Welcome Liberating Structures 👉 https://www.liberatingstructures.com/ls-me


Random #IntelliJ tip. There is “Show Gradle Daemons” action which shows daemons with pid, status, etc. and lets you stop them. It’s not in any menu, but you can invoke it via “Find Action” (cmd+shift+A or ctrl+shift+A). As with most tips it’s probably a UX failure… I mean an opportunity for improvement 🙈


Here is another basic function I wish was in #Kotlin stdlib

inline fun <T : Any, R> T?.ifNotNull(f: (T) -> R): R? = this?.let(f)

This is really just ?.let but I think ifNotNull follows the Kotlin way by being more explicit.


Not many people consider this but CONSTANTS DON’T NEED TO BE UPPERCASE. They’re not the most important thing in the code and don’t need the emphasis (e.g. unlike mutable global variables). The convention dates back to the early days of C and the need to distinguish symbolic constants defined as macros from variables 👉 https://accu.org/journals/overload/22/121/wakely_1923 It’s never too late to stop the cargo cult! Can we have it in #Kotlin 2.0 please? 😅


One of the basic functions I wish was in #Kotlin stdlib (originally by Duncan McGregor)

fun <T> T.printed(): T = apply { println(this) }

So you can do foo.update().printed() without extracting a variable and using a separate line for println().


Rick Beato has a great YouTube channel. In particular, “What Makes This Song Great?” videos, e.g. Metallica - “Master of Puppets” Breakdown. I’m wondering if there is something similar for #software analysing/appreciating/criticising well-known projects. Should John Carmack or Dave Farley do it? 😅


Does the “Small advice” in this talk mean that explicitly specifying return type for public functions will noticeably improve compiler/IDE speed? If yes, it sounds like an inspection 🤔 #Kotlin #IntelliJ

There is “Public API declaration with implicit return type” inspection in “Kotlin->Other problems” disabled in the default profile. If it’s really going to make difference and is recommended in general, should it be enabled then?


I’m pretty sure I read a few years ago that #Mastodon (social network) was named after Mastodon (a metal band). However, most articles I can find now are saying Mastodon (social network) was named after the animal. Does anyone know more of the backstory? https://www.youtube.com/watch?v=s6WGNd8QR-


Videos from JVM Language Summit 2023 https://www.youtube.com/playlist?list=PLX8CzqL3ArzW90jKUCf4H6xCKpStxsOzp I enjoyed “The Challenges of Introducing Virtual Threads to the Java Platform” 🙂


It might be the “old man yells at cloud” problem but many tools which are supposed to empower developers are achieving the opposite. More levels of indirection, more configs, slow pipelines, etc. instead of faster feedback loops (on faster modern hardware). There is a joke that k8s is a conspiracy by big tech to slow down the rest of the industry 😳


Here is the simplest way to implement any interface in #Kotlin 🙈 Aka mocking library in four lines of code. (I didn’t come up with it though so can’t take the credit.)

class MyList<T> : List<T> by strictMock() inline fun <reified T> strictMock(): T = java.lang.reflect.Proxy.newProxyInstance( T::class.java.classLoader, arrayOf(T::class.java) ) { _, _, _ -> throw NotImplementedError() } as T


If you’re interested in #Kotlin, KotlinConf on May 23-24 next year will be a good excuse to visit Copenhagen. It’s the same venue as in 2019 which was quite nice. And don’t forget the best way to get the ticket is by submitting a talk https://sessionize.com/kotlinconf-2024 🙈 (As always, you don’t really need to be an expert in the field to do a good talk!)


Super slow search for #Kotlin data class components in IntelliJ is a massive contributor for me not enjoying Kotlin as much as I could. It feels that problems like this one are too fundamental to not be fixed on day one 😐 Unreliable/slow search defeats the whole point of IDEs.