Home » Java » Page 5

Java

Project Reactor expand method

java-interview-questions-answers

One of my colleagues at work recently introduced me to the expand operator of the Project Reactor types and in this post I want to cover a few ways in which I have used it. Unrolling a Paginated Result Consider a Spring Data based repository on a model called City: 1 2 3 4 5 import org.springframework.data.jpa.repository.JpaRepository; import samples.geo.domain.City;   ...

Read More »

The Remainder Operator Works on Doubles in Java

I’ve been teaching at OSU for nearly two years, and it always astounds me how much I learn from my students. For instance, in the past, I’ve had students write strange pieces of code that I didn’t understand. At this point, even after 300+ blog posts, several YouTube videos, and even collecting code snippets from over 100 languages, you’d think ...

Read More »

Composing custom annotations with Spring

spring-interview-questions-answers

Java Annotations were introduced with Java 5 back in 2004 as a way to add meta data into Java source code. Today many major frameworks like Spring or Hibernate heavily rely on annotations. In this post we will have a look at a very useful Spring feature which allows us to create our own annotations based on one or more ...

Read More »

Testing Maven Release Plugin Auto-Increment Version Number

Abstract The Maven release plugin is a very powerful tool and I rely on it heavily for coordinating software releases. Typically, software release version numbers follow a simple 1.0.0.0-SNAPSHOT format. But recently I had need to add a qualifier to the version number – something like 1.0-beta-SNAPSHOT or 1.0.0-fix-bug-description-SNAPSHOT. After my 1st attempt to add the qualifier, the Maven release ...

Read More »

PMML revisited

Hi folks! The beginning of this year brings with it the initiative to re-design the Drools PMML module.In this post I will describe how we are going to approach it, what’s the current status, ideas for future development, etc. etc so… stay tuned! Background PMML is a standard whose aim is to “provide a way for analytic applications to describe ...

Read More »

Fat vs. Skinny Design

It seems that type/class hierarchies in OOP may be designed in two extreme ways: either with full encapsulation of data in mind; or with just a few interfaces making raw data visible, and letting classes deal with it, parse it, and turn it into smaller data elements. You may be surprised, but I’m suggesting the second option is more elegant. ...

Read More »

Distributed tracing for dummies

java-interview-questions-answers

Tracing provides visibility into a system allowing the developers and operations to observe the application during runtime. Tracing becomes extremely valuable when the systems are growing and interacting with more microservices. In such environments the traces are awesome in localizing the failures and bottlenecks causing poor performance. In this post we are setting you up for understanding the tracing in ...

Read More »