I've been a developer for around 6 years now and in the last year have been working on a Vert.x project in Kotlin. I feel pretty familiar and comfortable in Kotlin, but my knowledge of everything outside the syntax (build systems, libraries, frameworks, and loads of other known and unknown unknowns) is severely lacking. (Said differently, I'd like to close a knowledge gap so that I can reasonably put Kotlin on a resume in the future.)
Where would you start to try and fill in the gaps? Would you recommend spending much time on Java itself, or perhaps that'll come with time?
Thanks! I'll comment with what I've been doing in the meantime.
I've started building a CLI tool I've built before in Python, just as a way to familiarize myself with starting the project, publishing it, finding and using libraries, etc. But I cannot help but feel like there are probably standards for where to put utility functions and such, and I'm just following an intuition I built in other languages.
(The program gives a user an opportunity to submit input (eg scan barcodes) while doing some work that generates files. This could then be used to organize and categorize the files based on the context given by the barcode scanner (and the timestamp of file creation). Such as organizing photos taken of products by their product id.)
09/26/2023, 12:55 PM
It's surprisingly effective to just create a project via the new project wizard, and ask any questions to an LLM once you need it (AI assistant plugin or ChatGPT plugin etc.).
I used this approach to learn Rust's build- and ecosystem and it worked quite well for me because I could always always ask questions about the suggestions it makes.
(Only if it's your learning style, don't use LLMs as a holy grail of knowledge please)
09/26/2023, 1:01 PM
I've had a lot of success with LLM help in areas where I have knowledge, but maybe not enough to do exactly what I want. Like SQL. I know enough to read what it gives me and decide if it's being smart or stupid.
In Kotlin, I asked it to get me the metadata of a file and what it gave me not only didn't work, but I have no way of knowing if this is the standard way of getting metadata that a Java/Kotlin dev would want.
In my case, for this kind of learning, I want to avoid LLMs. But I do use it from time to time.
09/26/2023, 1:14 PM
Hey, the GitHub project you shared is private (or the link is wrong)
Be very careful with LLMs, they're also really good at saying stuff that is just wrong. So far, I haven't had a single discussion with one which did not contain pure fake info at one point or another.
regarding async programming, the default option in Kotlin land would be the in-build coroutines. For one because it comes with structured concurrency. But if you like vert.x, by all means keep using it. https://kotlinlang.org/docs/coroutines-overview.html
Ktor would be the pure Kotlin suggestion for a web server (or client) but I spend my dayjob writting Kotlin backend services with spring.io .
Spring is the most popular webframework in Java land and most(?) Kotlin backend positions come from old Java teams that switched to Kotlin but still have some Java services left, or didn't switch libraries when slowly replacing their Java code with Kotlin code.
A popular dependency injection for pure Kotlin library would be https://insert-koin.io/
For mocking use https://mockk.io/ instead of Java's mockito.
09/26/2023, 10:08 PM
For the CLI I went with clikt, seems to do all the things I want so far. Thanks for mentioning the other frameworks, I'm going to look at them. I'm not really interested in working with what I know here, I'm looking to learn 🙂
10/02/2023, 6:06 PM
Hey Avi, good to have you here. For general knowledge about the ecosystem you could rewatch some of the past KotlinConf videos on YT. Alexey Soshin and Anton Arhipov have written a book that goes beyond Syntax ("Kotlin Design Patterns and Best Practices") and have a look at Http4K and Ktor if you`re doing RestAPIs.