One of the signs of a good engineer is that they take their own productivity very seriously. Tools can help here, and luckily the tools we need to make better software are often made of software, so, if we are good at that, we can find ourselves in a virtuous spiral where we can deliver more per hour rather than less as a project progresses.
Kotlin turns out to be a fine language for ad-hoc tool building, as you will see today when we add events to our JUnit test visualisation.
In this episode
00:02:03 What else is happening?
00:03:13 Start at the point of use and prototype
00:04:40 Arranging static access to an object that we haven't created
00:07:00 The JUnit lifecycle seems to support our feature
00:08:45 Why is create class not available here IntelliJ?
00:10:40 Now we have the data, let's put it on the chart
00:12:52 Now we can explore
00:13:50 Usage reveals bugs in our tool
00:15:33 Fixing the bug reveals that the feature isn't right yet
00:18:07 More features allows more experiments
00:19:27 Now switch up to hard mode (parallel tests)
00:20:21 ThreadLocal to dig us out of a hole
00:21:52 Tidy before we wrap up
00:22:49 Wrap up
There is a playlist of TDD Gilded Rose episodes - • Test Driven Gilded Rose in Kotlin
and one for testing • Testing
The codebase is available on GitHub https://github.com/dmcg/gilded-rose-tdd
If you are going to be at KotlinConf 2025, or even just in Copenhagen in May, then you should sign up for the workshop that Nat Pryce and I are running. It’s called Refactoring to Functional Kotlin, and will give you hands-on experience of taking legacy code and safely migrating it to a functional style. Places are limited, so buy now at https://kotlinconf.com/workhops
If you like this video, you’ll probably like my book Java to Kotlin, A Refactoring Guidebook (http://java-to-kotlin.dev). It's about far more than just the syntax differences between the languages - it shows how to upgrade your thinking to a more functional style.
Смотрите видео Just-in-Time Tooling with Mermaid, Kotlin & JUnit онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Pairing with Duncan 03 Январь 2025, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 233 раз и оно понравилось 29 людям.