Imposing Code Structure Guidelines using ArchUnit

Imposing Code Structure Guidelines using ArchUnit

While building the software, we all agree, as a team, to follow a set of guidelines which are typically considered as best practices. But during the development, developers might violate those guidelines unknowingly or ignorance. Typically, we rely upon code reviews or code quality checking tools like SonarQube, PMD, etc. to check for such violations. But some of the guidelines could be opinionated decisions which might not be able to automate using SonarQube, PMD etc.

SpringBoot Best Practices

SpringBoot Best Practices

I have been working with SpringBoot for many years, and over time, I have worked with many Spring Boot-based codebases. There are a few common mistakes that I observe in projects that use Spring Boot. So, I thought of writing down a few good practices that can be followed while using Spring Boot.

Clean Code: Don’t mix different levels of abstractions

We spend more time reading code than writing it. So if the code is more readable, it will obviously increase developer productivity.

Many people associate the readability of code with coding conventions like following standard naming conventions, closing files, DB resources, etc. When it comes to code reviews, most people focus on these trivial things only, like checking for naming convention violations or whether resources are properly released in a finally block.

Keep The Code Clean: WatchDog & SpotTheBug Approach

Before discussing the WatchDog & SpotTheBug Approach, let me give a brief context on the need for this.

Three months back, I was asked to write core infrastructure code for our new application, which uses all the latest and greatest technologies. I have written the infrastructure code and implemented two use cases to demonstrate which logic should go into which layer, and the code looks good (at least to me :-)). Then I moved on to my main project, and I was hearing that the project that I designed (from now onwards, I will refer to this as ProjectA) is going well.

10 things to become an outstanding Java developer

If you are a Java developer and passionate about technology, you can follow the tips below, which will make you an outstanding Java developer.

1. Have a strong foundation and understanding of OO Principles

For a Java developer, having a strong understanding of Object-Oriented Programming is a must. Without a strong foundation in OOPS, one can’t realize the beauty of an object-oriented programming language like Java. If you don’t have a good idea of what OOPS is, even though you are using an OOP language, you may still be coding in a procedural way. Just studying the definitions of OO principles won’t help much. You should know how to apply those OO principles when designing a solution in an OO way. So, one should have strong knowledge of object modeling, inheritance, polymorphism, and design patterns.