Sensei picture

Asynchronous Programming: Java's CompletableFuture

Asynchronous programming enhances performance and responsiveness by allowing long-running tasks to execute independently of the main thread. In Java, CompletableFuture and Spring Boot's @Async annotation provide powerful tools for managing non-blocking, concurrent tasks efficiently.

Read article

Strongly Typed IDs in Spring Boot

In a recent Spring-based project, I encountered subtle logical inconsistencies caused by using the wrong ID type—specifically, passing a userId where a loanId was expected. Since both were of the same type (Long), the compiler didn’t catch the error, leading to data confusion and incorrect entity retrieval at runtime.

Read article

Going Back To Computer Science Fundamentals

In programming, using double or float data types for division operations is crucial to maintain precision and prevent errors. When integer types are used, division results are truncated, leading to inaccurate outcomes and potential infinite loops.

Read article