Home » Archives for Mohammad Meraj Zia

Author Archives: Mohammad Meraj Zia

Avatar photo
Senior Java Developer

Assert ‘Exception thrown’ Junit

1. Introduction In the Java programming language, an assertion is a statement that enables you to test your program’s presumptions. You predict that each boolean expression in an assertion will be true when the assertion is executed. If it is not true, the system will throw an error. Your assumptions about how your program will behave are confirmed by the ...

Read More »

Docker Compose Networking

In this article, we will learn about Docker Compose Networking. 1. Introduction Docker is a software platform that allows you to build, test, and deploy applications quickly. Docker packages software into standardized units called containers that have everything the software needs to run including libraries, system tools, code, and runtime. Using Docker, you can quickly deploy and scale applications into ...

Read More »

GitOps

1. Introduction Software development has changed a lot in the last few decades. We have moved from Waterfall to Agile to DevOps to CloudNative and GitOps. The waterfall model has some advantages but the main disadvantage is that it does not fit well with projects where the requirements are changing quite frequently. Agile does not solve all the problems but ...

Read More »

Bit Masking in Java

Bipartite Graph

1. Introduction Bit masking is visualizing a number or other data in binary representation. Some bits are set and others are unset where set means true or 1 and unset means false or 0. It allows us to store multiple values inside one numerical variable. You should think of every bit as a separate value instead of thinking of this number as a whole. 2. Bitmasking Bitmasking is an operation in which we only allow ...

Read More »

Python sleep() Function

set python

1. Introduction In this article, we will see a simple usage of the python sleep() function. Python is an easy-to-learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development ...

Read More »

Guice – Google

1. Introduction Guice is a framework that makes it easier for your application to use the dependency injection (DI) pattern. Dependency injection is a design pattern wherein classes declare their dependencies as arguments instead of creating those dependencies directly. For example, a class ‘A’ needs class ‘B’ to perform its job, so class ‘A’ does not need to worry about ...

Read More »

Docker Copy Files

1. Introduction In this example, we will find out how to use copy files inside Docker. Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications. By taking ...

Read More »

Convert CSV to Json using Java

1. Introduction A comma-separated values (CSV) file is a delimited text file that uses a comma to separate values. Each line of the file is a data record. Each record consists of one or more fields, separated by commas. The use of the comma as a field separator is the source of the name for this file format. A CSV ...

Read More »

Tree Map in Java

Bipartite Graph

1. Introduction A Tree Map is a red-black tree-based NavigableMap implementation. A NavigableMap is a SortedMap with some navigation methods – this returns the closest match for given search targets. The sorting is done according to the natural ordering of the keys present in the map. If a Comparator is provided at the creation time then it overrides the natural ...

Read More »

Java Logging with MDC

Bipartite Graph

In this article, we will show you how to use MDC logging in java using detailed examples and suggestions. 1. Introduction Most of the current real-world applications have more than one client. These clients talk to the servers simultaneously. In a typical scenario on the server we will have different threads dealing with these separate clients. One way to separate ...

Read More »