Language selector

My garden is well, how is yours?

Okay, so what does the Software Garden actually mean?

If you’re looking for the original explanation of what the ‘software garden’ is, then I guess you won’t find a better explanation than the one I read years ago in The Pragmatic Programmer by Andrew Hunt and David Thomas.

There are these books, films, paintings, etc. which revolutionise the way you think in certain aspects. Many people took many things from this influential book: some started boiling frogs, some talking to rubber ducks. I was raised close to the nature, therefore in my opinion the software we create and use is much more like a garden than some architecture or machinery. It lives in a way. It’s never done. The whole ecosystem constantly changes. You pray for the rain. The summer comes after the spring. New plants need space. We need to get rid of bugs to have something to eat. You can’t start with green field every week. And so on…

That’s why years ago I changed my headline from ‘Software Developer’ or ‘Software Engineer’ to ‘Software Gardener’. Sure, it confuses and intrigues some people who haven’t read The Pragmatic Programmer. It also allows me to spot a few other folks with the same description of their position, and we instantly recognise each other.

Therefore, this page is meant to be the internet representation of my ongoing journey in Software Gardening. It’s not industry-scale farm with plant monoculture, acres and acres big. It’s my little garden, with seeds I care about, with birds singing in the sky and for sure, with some bugs as well. Consider yourself invited.

NoSQL for years was associated with JSON. The thing is: if you’re a hardcore backend Java developer, JSON, YAML, and other data formats might not feel native to you. Also, if you were ears-deep into debugging a query from Java code, sending the same request for visualization in Kibana using KQL wasn’t trivial. Meet ES|QL: Elasticsearch’s new query language, being at first glance a mixture of SQL and… Bash ;-) Works the same in Java and Kibana (and other programming languages too!) Additionally, by leveraging Project Valhalla and vector operations, ES|QL can achieve performance improvements over previous solutions. If you’re eager to investigate the options of the ES|QL and how it makes your life easier (while also giving a feel of being a SQL DB), this talk is for you.

If I got a dollar every time I hear “we had to disable security and authentication in Elasticsearch because otherwise it was unusable”, I’d be a bit richer by now ;-)

Honestly, I don’t quite get where the confusion comes from. It’s 2024, yet some of us are still surprised by “what do you mean: certificate and password???”

Let me explain security in Elasticsearch in a few simple paragraphs.

Zmarkotniały programista patrzący na bezpieczny i elastyczny tunel

I’ll start by saying this isn’t just about Elasticsearch, but anything that communicates over HTTPS. It could be an HTTP server, a database, or any other system. To have HTTPS instead of HTTP, you need a certificate. Normally, when we secure communication with our HTTP server (to get the padlock in the address bar), we need to obtain a certificate. Such a certificate is issued by some organization and applies to a specific.server.com.

Streams were a very nice addition to Java 8, based on lambdas. They allow streamlined data processing without side effects, taking us gently towards functional style. With newer additions to Java, like records and pattern matching, they shine even more in data-driven flows. However, they don’t come without flaws. For starters, the only available extension point was collectors: if your needs for gathering data weren’t satisfied by the whole Collectors ZOO, you could always fall back to creating your own Collector. However, if map, filter or flatMap weren’t enough, you couldn’t add your own intermediate operation. Secondly, parallel streams were limited to ForkJoin pool, effectively rendering them unusable for scenarios involving any IO. Since Java 22, Stream Gatherers are our extension point for intermediate operations in streams. If you’d like to comprehend how they work, find nice use cases and hunt for more performance, this talk is for you.

Here you are: a Java developer with some experience, and everyone around seems to be talking about LLM, NLP, RAG and other AI related stuff. From one end you’re somewhat afraid of this, because JPA is nowhere among these acronyms, and they say AI might take your job next month. OTOH you’re also tired, because every news, every social platform is bombarding you with all flavours of AI so much that you’re scared to open your fridge (who knows, AI might be among groceries now?)

Integration tests are nice. We all know that and love using them, don’t we? It’s just using all those databases, message brokers and other things as real dependencies, only wrapped by Testcontainers, might result in a really heavy CI/CD pipeline and developers’ attitude to never run them locally, because they’re so slooooooooooow. What if I could show you a number of techniques, mindset changes and tricks to get your integration tests shortened from quarters to seconds? Would that be interesting for you, to benefit from the confidence integrations tests give you, before you’re able to brew a fresh coffee? It’s really not about re-inventing the wheel, but using it the smart way.

Java 22 is about to be released tomorrow. There are many super nice things in this release. I suspect making Project Panama’s native/foreign calls will make many people’s life easier, as well as ongoing changes to concurrency, string templates and finally being able to call something before super. However, there’s one thing I guess is going to be my (almost) hidden hero of Java 22. Folks, I introduce to you Gatherers.mapConcurrent!

Let’s talk about Java 21 and have a sneak-peek into Java 22, and things like: Java was supposed “to be slow”. However, Java turns out to evolve so fast, that next releases aren’t just version bumps, but might significantly change the rules of the game. That’s a good reason to check out what’s new in Java. To name a few changes:

  • Virtual Threads (and some traps),
  • Pattern Matching and Record Patterns,
  • Structured Concurrency,
  • String Templates,
  • Stream Gatherers,
  • changes around main() method,
  • what’s gone and what will be gone,
  • and other things. If you find them interesting, let’s dive deep together into new interesting stuff!

This talk has been given for Silesia JUG only, no recording.

In the past I wrote two posts about Java sripts and their portability using shebang.

As far as I can tell everything in these two installments is still valid, only now, in Java 21, thanks to JEP-445 things can be even simpler. In this post I’ll try to describe fist the changes introduced by this JEP, then go deeper on how they relate to the “scripts in Java”.

I’m going to cover how you can simplify your main method, get rid of the class surrounding it, and even show you when it won’t work.

As I wrote in my previous post I had issues running code using JEP 443 using tools like Maven, Gradle or IntelliJ IDEA. Thanks to the one and only Tagir Valeev the solution is quite simple.

Upgrade to JDK 21.0.1.

And that’s it ;-)

No need to touch anything else. If you fancy more explanation, please follow on this Twitter thread.

And we shall all remember that upgrading is a good thing, because we’re not going to stay on Java 8 forever, right? ;-)

Language selector