•••

Everyone around me loves JetBrains’ software. I, on the other hand, am typically puzzled when confronted with it. Today’s example is Teamcity Kotlin DSL.

This is Kotlin at the base. The language that has two kinds of string literals: one with escape sequences, and one without with undocumented and insane escape sequences. Test yourself: if to obtain a % you need to write %% (and it’s not documented anywhere), what do you need to write to get a $?1.

But besides being Kotlin, it is also ingenious. For example, a project — a concept central to working in Teamcity — is quite logically defined with the Project class. The class has a subProject function that adds a subproject, also quite logically, I must admit. Yet it also has a subProjects function that sets the list of subproject — the exhaustive list, of course. Naturally, if you accidentally type subProjects where subProject is supposed to go, it will overwrite all the previously specified subprojects! Of course, this is easily missed during code review and usually detected only after the patch is merged and the configuration compiled and applied, causing the whole lot of you subprojects to disappear into thin air…

I just don’t think my own brain is really compatible with JetBrains.

/posts/2024/jetbrains/featured_hu7574865294308526318.jpeg
by shedevrum.ai

  1. ${'$'}, of course, why would you think of anything else?!2 ↩︎

  2. I shared these findings in our workgroup chat, of course. A couple of hours later, a colleague from another office wrote: “Used your message to start a conversation with the Kotlin guys who share the office with me. Thanks! By the way, none of them got it right”. ↩︎