Overview This article lists down (but not limited to), some common unit testing patterns and how to tackle them in Java. It assumes the use of Mockito java test framework for the demonstration purpose. Full code could be found in github. To bring the patterns to life, I have created five simple classes with minimal […]
May 26, 2025 | Java, Unit Testing | No comments
Overview Often there are situations where a change in one of the DB configuration parameters is required. Some of the common scenarios (but not limited to) are: The requirement to adjust these parameters calls for an understanding of the items below: This article addresses each item from the above list. Change Configuration Parameters This official […]
October 27, 2024 | SAP HANA | No comments
Check Linux distribution: Tail all logs in a directory with subfolders: Create a user/password: Add user to sudoers list: Check if the user exist/created: List all sudoers: Switch users: Change password for a user: Find directory: Find file in current directory Find the count of search results Print disk usage of a given folder: Pretty […]
October 11, 2024 | Linux | No comments
Overview This article defines the key components and the setup required to publish an avro schema based serialized message to the Kafka topic. Summary of what this article will cover: Why AVRO Before we get into why AVRO is required, we need to understand why serializing the data at first place. Serialization is a translation […]
October 9, 2024 | Kafka | No comments
Overview Why is codecache critical for understanding the Java application performance. Before we jump into topic, let’s first understand how codecache is related to the code written in a .java file As shown in the figure above, the code written in java file is compiled into bytecode ie. .class file The bytecode is understood by […]
October 9, 2024 | Java | No comments
Overview As a Java Programmer we are sometimes so engrossed in writing the code and getting the feature/story delivered that we often ignore the performance impact of the code written. This generally results in the applications crashing during the stress test or more often in the production environment. The impact of application crashing in the […]
October 9, 2024 | Java | No comments
Bitwise OR (|) if either of the bits is 1, it gives 1, else it shows 0 Bitwise AND (&) if both bits are 1, it gives 1, else it shows 0. Bitwise XOR(^) if corresponding bits are different, it gives 1, else it shows 0. Bitwise Complement(~) with all bits inverted, which means it […]
September 27, 2024 | Data Structure | No comments