Lists are by far among most common data structures, used in Java programming. In a computer science, list is a finite sequence of elements, where each element has it position (index), which allows to access it. The common list implementation in Java is an array based list — the collection, which stores entities in a backed array. While vanilla Java permits to work with immutable lists (since Java 9), it is much better experience to use third-party libraries, that are built using functional programming concepts to handle operations with immutable data structures.
Eclipse Collections library have an extensive support for…
Vavr library is an excellent tool to make your Java code really functional. One of issues, that was not solved by Java itself is an error handling — the language relies on exceptions, although it is not purely functional pattern. As a counterpart, Vavr brings such types as
Either, that implement functional concepts. In this post, I would like to share with you the
Either class, that offers a predictable return type for methods, that possibly can result into errors. This type makes your codebase more lightweight, that if you will invent your own return types. From the…
Almost any more or less complex application has to deliver notifications. As usual, it is done via traditional emails, especially in cases of password reset messages or transactional notifications etc. There is a number of cloud solutions that abstract mail flow via consumable REST API. For example, Postmark. I used Postmark for some time, but stopped with a question of scalability. As I have several apps, that need to send emails to users, I decided to create a unified service that will do this dirty job.
Multi-factor authentication became a common practice for many cases, especially for enterprise ones, or those that deal with sensitive data (like fintech apps). Moreover, MFA is enforced (especially in the EU) by law in a growing number of industries, and if you are working on the app, that by some requirement, has to enable two-factor auth in some way, don’t hesitate to check this post.
In this article I will show how to write a two-factor authentication for reactive API, built with Spring Webflux. …
I pay my bills by telling computers what to do