Tech

Running API in loop using Postman Runner

Postman is a popular API development tool that allows developers to design, test, and document APIs with ease. It provides a user-friendly interface that enables developers to make requests to APIs, examine responses, and debug issues. With Postman, developers can easily create requests, add headers, and manage complex authentication protocols. Postman also provides powerful testing…

ruby

Drawbacks of Active Record

Active Record is a pattern used in software engineering that represents the database in an object-oriented manner. In other words, it’s a way to use objects to interact with a database instead of writing SQL queries directly. In Ruby on Rails, Active Record is the default ORM (Object-Relational Mapping) that allows developers to define database…

Tech

TIL – Native modifier in Java

While going through multithreading in java you must have came across this function “Thread.yield This function is special for me because the definition of the function is So let’s go in detail about the native modifier In Java, the native modifier is used to indicate that a method is implemented in a platform-specific manner, typically…

ruby

Ruby on Rails object lifecycle and callbacks

In ROR, the lifecycle of an object is attached to the database of the application. Objects are created in memory first then later stored in the database. An object have following lifecycle Creation Validation Save Update Deletion These lifecycle have callbacks attached to each of them by which we can inject our custom logic. Creation…

Tech

How to make a class Immutable in java

Making a class immutable means that its state cannot be changed once it’s created. In other words, all the fields of the class are set at the time of instantiation and cannot be modified afterward. This can be achieved by using the following techniques: Declaring all fields as final: This ensures that the fields cannot…

Tech

Why reflection in java is a problem?

Reflection in Java is a mechanism that allows a program to examine and manipulate the structure and behavior of objects at runtime. With reflection, a program can inspect and modify fields, methods, and constructors of a class, as well as access information about the class itself, such as its name, superclass, and interfaces. Reflection is…

Micronaut

Benefits of using Micronaut

Micronaut is a modern, JVM-based, full-stack microservices framework designed for building modular, easily testable microservice applications. It is developed by Graeme Rocher, who also know for his contribution to Grails framework. Micronaut tries to solve the drawbacks of java frameworks like spring and also provide built in support for existing development ecosystem, which includes support…

Tech

How to support multiple language in openhtmltopdf

Open HTML to PDF is a pure-Java library for rendering a reasonable subset of well-formed XML/XHTML (and even some HTML5) using CSS 2.1 (and later standards) for layout and formatting, outputting to PDF or images. https://github.com/danfickle/openhtmltopdf By default this library supports (serif, sans-serif, monospace). The fonts only support a basic Western European character set and…