Skip to main content

Posts

Showing posts from 2020

Clean Code from the Trenches - Writing Executable Specifications with JUnit 5, Mockito, and AssertJ

Executable Specifications are tests that can also serve as design specifications. They enable technical and business teams to get on the same page by enabling the use of a common language (in DDD-world this is also known as Ubiquitous Language). They function as documentations for the future maintainers of the code. In this article we will see an opinionated way of writing automated tests which could also function as Executable Specifications.
Let's start with an example. Suppose we are creating an accounting system for a business. The system will allow its users to record incomes and expenses into different accounts. Before users can start recording incomes and expenses, they should be able to add new accounts into the system. Suppose that the specification for the "Add New Account" use case looks like below - Scenario 1
Given account does not exist
When user adds a new account
Then added account has the given name
Then added account has the given initia…

A Beginner-friendly Introduction to Kubernetes for Developers: What is Kubernetes?

Just a few months ago, I had the chance to get my hands dirty with Kubernetes for the very first time. Up until that point, all I knew about it is that it is something that ensures containerized applications run smoothly in a cluster, nothing else. After finishing my "hello world" and trying out some examples, I have decided to write a series of blog posts in which I will try to summarize all my learning.

A fair warning - I am still a beginner in Kubernetes, so advanced Kubernetes practitioners might find my posts to be too basic. This is also what motivated me to write these posts in the first place. I wanted to write a beginner-friendly series of posts on Kubernetes for developers which could be used as a good first starting point. I have also decided to break down my articles into small chunks of posts so that they are easily digestible by a beginner.
What is Kubernetes? Containers have become the de-facto medium of packaging applications nowadays. More and more applicat…