#software design #functional programming

Software design with lambda expressions

Lambda expressions are powerful and allow us to write concise, elegant, declarative code. A lot of people has already adopted them, mainly leveraging the power of streams in iterations, but lambda’s toolkit is far richer than that. This is why I decided to write this blog post and explore some aspects of how lambda expressions can prove useful in software design. We will do this exploration via a real world case study in order to demonstrate how we can apply these principles in our everyday work. ...

#software design #encapsulation

How getters and setters harm encapsulation

Taking a step back and looking at something that you’ve been doing for years with a fresh perspective can lead to profound insights. I had an insight exactly like this a few months ago, when I decided to look at getters and setters from a different point of view. During my first steps as a software engineer, I learned about Plain Old Objects (POJOs for Java software engineers, like myself) and ever since it made sense in my head, I always took getters and setters for granted. ...

#unit-testing #software design

Test behavior

Over the years, I have identified a number of issues with the way most companies treat their tests. I have come to believe that the most important one is that test code is treated as a second class citizen. Developers usually opt for the cheap, quick-and-dirty solutions when it comes to writing (or maintaining) tests, not realizing their importance. However, test code has to be designed, reviewed and refactored, exactly like production code. ...

#rest #software design

Designing a RESTful shopping cart

Designing APIs for inter microservice communication is one of the most difficult aspects of modern software engineering and the reasons range in a very broad spectrum. First of all, microservices is a relatively new trend and virtually everyone in the software engineering community talks about them nowadays. However, I believe that we still don’t know what exactly they are (let alone how they will develop in the future) and therefore, we can’t always design them in an efficient way. ...