Gradle is a popular build tool for Java that makes life easy for developers. It is a flexible tool and since it is powered by Groovy, developers are free to develop their own solutions.

In this blog post, I will walk you through how to automate the application version management using Gradle.

Let’s ask the obvious, Why?

There are many reasons for this, one simple reason would be if you are generating an artifact like .jar file and publishing it in an Artifactory like JFrog you want to maintain the version correctly.

Let’s dive in.

First I need to create…

Python is a powerful programming language with a vast range of applications. Python is great but for someone like me who is coming from a C/C++ background, Python syntax is bit off. (Yes yes I know, it is just indentation without semicolons (;) and curly braces ({})).

Long story short, I decided to give Python a go, and as you know code will be followed by unit tests and Python has a rich set of unit testing tools. The tool I decided to go with is unittest (read more here). It is an inbuilt module to Python.

It is pretty…

Previously I wrote an introductory article on how to deploy a NodeJS application in a Kubernetes cluster. It was a step by step guide on carrying out the said task in a local setup. It introduced concepts like Deployments, Services, ConfigMaps which are fundamentals of Kubernetes.

In Kubernetes even with a small application, there are quite a number of files and commands we need to use in order to get a deployment done. …

This blog will walk you through the steps of how to deploy a NodeJS application in MiniKube. We will be using a local docker image without relying on a Docker registry.

At this stage, I’m assuming you have a general idea of what Kubernetes is. If not is a great place to start.

Before starting the tutorial, make sure you have the following installed on your machine (Assuming Docker and Node are pre-installed)

— Minikube is a tool to learn and develop Kubernetes locally

— Kubectl is a command-line tool that allows you to control…

MonolithicsIn modern software development, this is something we try to avoid because they have proven to be hard to maintain, refactor, debug, … etc. Instead, the software industry had adopted, Microservice pattern for designing backends.

Even with a well-designed backend, it is common that the frontend of an application may suffer from Monolithic architecture. Frontends are ever-changing and many teams are working in the same codebase, resulting in a complex and hard to maintain frontend app.

To avoid this, the concept of Micro Frontends has been introduced. The article by ThoughtWorks is a very detailed explanation of this…

You might be wondering why do we need the HttpSession in the WebSocket connection?

For me, I was developing a test chat application and I stored the logged-in user information by the HttpSessionId. It is not the ideal setup but served the purpose. I wanted to have the user information when they chat using the WebSocket protocol. So I needed the current HttpSession in the WebSocket connection.

I found solutions from StackOverflow but wanted to try a different mechanism. So there it goes.

It important to understand that,

HTTP and WebSocket protocols are based on TCP protocol.

And, as given…

Force = Mass x Acceleration; is a fundamental equation in mechanics that cannot be proven to be correct. Rather, it’s correctness is derived by not being able to prove the falseness. It’s the nature of scientific theories and laws that they are falsifiable but not provable.

This is the same for the software we write, they cannot be proven to be correct (or hard ) and only can be proven to be incorrect. Tests are a way of proving the software is incorrect. Dijkstra has stated,

Testing shows the presence of bugs, not the absence.

Thus if tests show the…

Multer and Cls-hooked are two important modules in the NodeJS ecosystem. Multer,

Multer is a node.js middleware for handling multipart/form-data, which is primarily used for uploading files.

Cls-Hooked is an extension of CLS which used to preserve the context with async/await,

Continuation-local storage works like thread-local storage in threaded programming, but is based on chains of Node-style callbacks instead of threads.

Let’s consider a general use case of these modules in an Express application.

The following web app, exposes POST /upload endpoint to upload a file. We use Multer middleware to read the file named userfile in the request.

Theekshana Wijesinghe

Software Engineer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store