Clean Lambdas & Streams in Java 8
Victor Rentea is a Java Craftsman.Sr. Engineer & Technical Lead at IBM Romania. Independent Trainer & Coach.
I worked hard on backend systems over the last 10 years, solving technical challenges of a broad range of enterprise Java applications as a developer, lead and consultant. 4 years ago, after I had devoured Uncle Bob’s Clean Code book, I joined the ‘coding craftsmanship’ move.
Of course, soon after I started preaching about it as an independent trainer/coach. This Clean Code, TDD, Pair Programming stuff it’s just too fun too keep it for oneself. For hundreds of days I’ve spread the word to more than 1000 trainees in all kinds of settings (even faculty lectures), usually bundled together with other training modules that I’ve gradually developed, such as Spring, JavaEE, JPA, Design Patterns, and the like. You can find the entire curricula on my website.
My extensive experience as a trainer allowed me to refine a very entertaining presentation style, spiced with jokes, non-IT-world analogies, and examples that is able to make any developer profile understand even the most advanced design discussions.
Recently however, I realized how much I enjoy meeting smarter people, so I’ve started talking at international conferences such as Devoxx MA and VoxxedDays Belgrade and Bucharest, IMWorld Bucharest.
Are you using Lambdas & Streams in your core business logic? Then you might be having this strange feeling that it’s not Java anymore. That at times it’s cryptic, barely readable.. Come and see how to keep your code clean while making best use of Java8. Bring a laptop or Pair with someone.
Everybody’s using Java8 Lambdas and Streams nowadays. So then, why shouldn’t you use them as much as you can in your enterprise application code? It’s absurd to keep away from these powerful features, but at some point you may start having some weird feeling about them. And then you get to your first code review, and you start wondering… What happened with the Clean Code principles when you jumped on Lambdas? How should you use Lambdas in order to keep a clean maintainable codebase – the ultimate goal of any large enterprise application?
During this workshop, I’ll mix my key points/slides with two hands-on exercises: 1. The basics of Lambdas/Streams, then 2. A tougher problem distilled from a real-world scenario. Note: You can join us anytime later during the workshop, if you want to skip to the more advanced topics.
I’ll introduce the Lambda/Streams features roughly from simple to the more mind-stretching following an order inferred from a little study I’m running “Clean Lambdas”. This way, you’ll see that you could adopt these features gradually, to allow your developers to learn the functional thinking bit-by-bit. One particular interesting topic we’ll talk about is how/where to implement predicates, and I bet you won’t imagine all the possibilities.
At the end, we’ll wrap up trying to sketch how the Clean Code principles change when using Lambdas. More specifically, we’ll brainstorm some guidelines you should keep in mind when playing with the lightsaber (oups,I mean.. Lambdas) in your enterprise application code. This session will leave you with a lot of take-aways: hints, tips, warnings, useful even if you don’t have a lot of prior hands-on experience with Lamdas.
Prerequisites: minimum 3-6 months prior Java 8 experience / or a Spartan. Preparation: Personal laptop with Eclipse/IntelliJ on JDK8 installed. Organization: Workshop. I’ll give you the tasks one by one and gradually build the solution together. I would like the audience will Pair Program as much as possible, switching the writer every ~7 minutes. PS: This workshop is based on a training that I delivered a lot of times.