Tidy Kotlin

  This blog post is a catalog of Kotlin tidyings based on my experience of writing server-side Kotlin. The term “tidying” is inspired by the “Tidy First?” book and essentially means a small refactoring. Some of them are specific to Kotlin, while others are applicable to any programming language. I...

Sane Intellij Plugin Development With Live Plugin

  Pretty much all modern web browsers have developer tools console which lets you type some JavaScript code and run it in the browser. In theory, this allows you to do any kind of automation and extend browser functionality at runtime. In practice, it’s not suitable for the purpose, and,...

Limited WIP — test && commit || revert

  Limited work-in-progress doesn’t seem to be a very well-known idea in the software development world but there are few practices which we use without realising that they’re limited work-in-progress (WIP) techniques. One example is pomodoro which suggests to focus on a task for 25 minutes and then take a...

Limited WIP — Auto-revert

  (Updated 17th October 2024) As software developers, we seem to be mostly interested in technology and tools rather than the human side of the process such as software development workflows. For example, consider TDD — one of the few workflows that made it into the mainstream. These days pretty...

Limited WIP — Maximum change size

  There is a lot of focus on the technical side of software development: programming languages, libraries/frameworks, architecture, etc. But not that much focus on what humans are supposed to do while using the tools. There seems to be an implicit assumption that developers will do things in the most optimal...

Hello Http4k

  This is a quick intro into http4k — a Kotlin library for writing HTTP servers and clients. Unlike many other libraries and frameworks with (over)complicated core abstractions and workflows, http4k uses a few simple concepts which encourage good design and testability. The examples below are based on the “

Squasher

  Recently Peter Kofler wrote a blog post in which he looks at the Design of a Separable Transition-Diagram Compiler paper by Melvin E. Conway (which was published in 1963 and considered to be the first paper mentioning coroutines) and reimplements a basic coroutine in the modern...

Intellij Settings

  For the benefit of anyone interested and as a reference for myself, here are some of the IntelliJ and related macOS settings I normally use. This page will be occasionally updated on new IntelliJ releases and changes in my preferences. Last updated on 15th October 2024 for IntelliJ version

Type Variance Of An Assignment

  Type variance is one of the most difficult and confusing subjects when it comes to statically typed programming languages. It is often explained as somewhat convoluted rules about container classes and how they can be substituted based on type arguments. This blog is an attempt to explain type variance using...

Live Coding Kotlin/Native Snake

  Here is the video of me at KotlinConf writing from scratch snake game with ncruses UI using Kotlin/Native. You can find slides and source code in this git repo. It’s hard for me to know if it’s...

Call With Current Continuation

  “Call with current continuation” (abbreviated as call/cc) originates in Scheme. It’s not as widespread as yield/async/await and less intuitive than coroutines as threads implementation. On the other hand, it seems to be quite influential because Scheme was one of the first high-level languages to...

Async Await

  This post is about async/await coroutines implementation which is a bit more complicated than yield but fundamentally, just like other coroutine implementations, uses the idea of suspending functions and continuing execution some time later from the same point. So the current thread doesn’t really “await” for...

Yielding Generators

  The previous blogpost was about coroutines as threads which is probably the most intuitive coroutines implementation to use. However, there is another widespread and time-tested implementation based on generators using yield keyword and composable promises using async/await. This blog is about generators. They have been part...

Coroutines As Threads

  The main motivation for these blogposts is that, probably like many other developers, I heard about coroutines, continuations, yield/async/await and even used them to some extent, but I never got to really understand what they mean from computational point of view, how they work and how concepts like continuations relate...

From Groovy to Kotlin

  This is a write-up of my experience converting source code of Activity Tracker plugin for IntelliJ IDEs from Groovy to Kotlin. It is written for anyone familiar with Groovy or Kotlin and might be especially relevant if you are considering moving from Groovy to Kotlin. Hopefully, it...

ACCU 2016

  I recently attended ACCU conference in Bristol. Below you can find some of the tweet-size notes I made during the conference. If you haven’t been to ACCU conferences, the conference schedule might give you an idea of what it’s like. It has emphasis on C++ but other languages...

Hello

  I only wanted to publish quick notes from ACCU 2016 conference but ended up playing with Jekyll and started this yet-another-blog-about-programming. I hope it will be an enjoyable experience for everyone involved. Thank you for reading this.