Immutability increases Code Simplicity

Immutability has many advantages, as many functional programming proponents will argue. Just to mention a few, immutable classes are side effect free and are easily testable. I am not going to go into the details of listing all the advantages of immutability in this short article. I will focus mainly on the effects on code simplicity and code comprehension. Recently, I revisited one of my older projects and by examining the code, I found that a class could be immutable, or its objects could be value objects using Domain Driven Development (DDD) terminology....

January 21, 2024 · 7 min · Dimitris Dranidis

Test coverage reports are not only for reporting coverage percentages

What is a test coverage report? A test coverage report provides information about the extent to which a software application has been tested. It measures the code coverage achieved by a set of test cases, indicating which parts of the code have been executed during testing and which parts remain untested. Test coverage is often expressed as a percentage and can refer to various aspects of the code, such as statements, branches, functions, etc....

January 9, 2024 · 4 min · Dimitris Dranidis

Define your Fluent Interface (DSL) to improve the readability of your tests

Although everybody agrees that automated testing is essential for achieving high software quality, writing tests cases is not always easy. Especially, setting up the test scenarios that involve the initialization of many objects can be difficult. I recently started using the concepts of fluent interfaces and DSL languages for writing my tests in such cases. Using this approach, tests become easier to write and more importantly much easier to read understand....

December 20, 2023 · 5 min · Dimitris Dranidis

Load testing Socket.IO servers using msgpack-parser with Gatling

In this post I will show how we can connect with Gatling to a Socket.IO server which uses a custom parser using the MessagePack serialization format. This is the second post about Socket.IO testing with Gatling. In the first post: Load testing Socket IO with Gatling I showed an example of connecting to a Socket.IO server using the default parser which uses text messages. What is MessagePack? MessagePack is a binary serialization format....

November 18, 2023 · 7 min · Dimitris Dranidis

Load testing Socket IO with Gatling

This article will hopefully save you some of the trouble I had, when I tried to use Gatling for Socket.IO sockets. Gatling has support for web sockets but one has to do a lot of research and workarounds in order to make it work with Socket.IO sockets. What are Gatling and Socket.IO? Gatling is a powerful load-testing solution for applications, APIs, and microservices (https://gatling.io/). Socket.IO is a library that enables low-latency, bidirectional and event-based communication between a client and a server (https://socket....

November 12, 2023 · 8 min · Dimitris Dranidis

Creating my personal page with Hugo

Today I decided to FINALLY create my personal page (the page you are reading right now) with a static page creation tool. I picked Hugo after some research. I liked the facts that it is fast, written in Go (I like Go!), it offers full customization and you don’t need to install anything apart from the application itself which is available in all platforms. In the rest of the post, I want to share with you some of the instructions I have followed while creating the site....

November 12, 2023 · 5 min · Dimitris Dranidis

Database is not memory - ORM - JPA

Note This is a really old article I have written in blogger.com. It appears as it has been posted. Probably many things are different not at the time of editing (Nov 2024) This post discusses experiences gathered and realizations made while trying to implement Object-Relational Mapping (ORM) for a Java application using EclipseLink JPA (Java Persistence API). The application is a Java implementation of the Payroll case study found in the “Agile Software Development” book by R....

October 24, 2009 · 6 min · Dimitris Dranidis