Best Practices When Versioning a Release

Ever wondered how to version a release of your software? Ever looked around at the software you’re using and asked what their approach is, or whether you should use it? Have you ever been confused as to which approach to take? I get it, software, like any complex human endeavor, isn’t easy; and release versioning is no different. What’s more, ...

Read More »

Defending Public-By-Default in Kotlin

Some people have spoken against Kotlin’s decision to make classes, methods, etc. public by default (when no visibility modifier is used), and I would just like to pitch in on why I think JetBrains made the right decision on this one. Those who are against it bring up the principle of hiding everything that you can get away with in ...

Read More »

Teach Them The Language First

I wanted to write this article for some time now, but I wasn’t sure if it’s such a spread phenomenon or maybe just my experience. This tweet made me decide to write it. I think these days, frameworks and platforms have grown and have abstracted our work so much that it is very easy to spend 10 years in a ...

Read More »

JasperReports: The Tricky Parts

If you have been programming in Java long enough, chances are you needed to generate reports for business users. In my case, I’ve seen several projects use JasperReports® Library to generate reports in PDF and other file formats. Recently, I’ve had the privilege of observing Mike and his team use the said reporting library and the challenges they faced. JasperReports ...

Read More »

CI/CD for SpringBoot applications using Travis-CI

In this article we are going to learn how we can use Travis CI for Continuous Integration and Continuous Deployment (CI/CD) of a SpringBoot application. We will learn how to run maven build goals, perform test coverage validation using JaCoCo plugin, Code Quality checks using SonarCloud, build Dockerimage and push it to DockerHub and finally deploy it to Heroku. The source code for this article is at https://github.com/sivaprasadreddy/freelancer-kit Last week I ...

Read More »

Adding Terms to Javadoc Search with Java 9

There is a relatively old web page called “Proposed Javadoc Tags” that appears to have originally been written in conjunction with Javadoc 1.2 that lists “tags that Sun may implement in Javadoc someday.” The tags in this list are @category, @example, @tutorial, @index, @exclude, @todo, @internal, @obsolete, and @threadsafety. One of these tags, @index, has moved from “Proposed Tags” to ...

Read More »

Sample Logback Configuration for Spring Boot Profile Based Logging

java-interview-questions-answers

We would want different logging configurations for different profiles in Spring Boot, like in local running we would just want console logging and for production, we would want file logging with support for rolling the log files daily. I came up with a sample logback configuration which I use in all my applications. Create a file named logback-spring.xml in src/main/resources ...

Read More »

Use Matchers for Preconditions and Postconditions

Sorry, this is late. Excuses, excuses. I feel like I’ve seen this somewhere else once before in my life, but it the idea doesn’t seem to have spread much. That’s probably due to the lack of traction for pre- and postconditions in general. So, we’ll start with those. Preconditions and Postconditions Preconditions and postconditions are a little old-fashioned, having been ...

Read More »

Faster Sorting of Arrays of Primitives Coming to Java?

It appears that sorting arrays of primitives in Java may experience a performance improvement in the not-so-far future. Vladimir Yaroslavskiy has posted a message to the core-libs-dev mailing list titled “The new optimized version of Dual-Pivot Quicksort” in which Yaroslavskiy writes of an “optimized and faster version of Dual-Pivot Quicksort” that he has “been working on … for the last ...

Read More »