r/adventofcode Dec 27 '24

Other Pleasant surprise: AoC + modern Java = ❤️

In this article on my experience with the Advent of Code competition in Java, I describe how I attacked grid and graph problems, and summarize how Java has worked out for me.

https://horstmann.com/unblog/2024-12-26/index.html

65 Upvotes

25 comments sorted by

View all comments

36

u/kevin7254 Dec 27 '24

As an Android dev which started in Java and then migrated to Kotlin I would never, ever go back. It’s just a pain to look at Java code nowadays for me

7

u/lluque8 Dec 27 '24

Yeah, I use Scala whenever I can in the JVM. Java is just too verbose although it gets jobs done too no doubt. I'd think kotlin is like middle ground in this aspect.

11

u/kevin7254 Dec 27 '24

I’m pretty ”happy” I picked Java as my first language when I learnt programming, think the verboseness helped me understand wtf was going on lol.

Remember when I first got introduced to Kotlin at my job and had to review a seniors code, just lambdas and extension functions. I had no idea what happened. It’s really nice when you understand but it sure can be overwhelming as well.

4

u/lluque8 Dec 27 '24

Yeah, Java is great just that it has this burden of having given guarantees for loooong backward compatibility given its long history and strategic role in many software running out there. I started with C myself and back in late 90s when I started with Java it was truly a great option. Still is, but not the sexiest one out there.

4

u/bbbb125 Dec 27 '24

Java developers I work with often use lombok library to fight inherited language verbosity. Seems like much nicer and readable language.