Sonar has a soft spot for Java. Along with being one of the first languages for which we developed rules, many Sonar team members are passionate about making Java the best it can be. We spoke with three different Sonar employees, Jonathan Villa developer relations, Alexandre Gigleux product manager, and Marharyta Nedzelska developer, to find out what inspires their love of Java.
There are millions of devices and thousands of applications using Java. It’s a very learning-friendly and fun language as well. So why not Java?
Check out Jonathan's full interview:
Java is being used by a huge number of companies all over the world. Wherever you go, you will most likely find Java running in the background. Java has been in the top five programming languages for many years so it shows there is a high demand in the market. Java is running millions of applications on multiple devices including desktop, mobile, and embedded systems.
Aside from always being able to find a job as a Java developer, Java has a vast ecosystem of open-source libraries and frameworks. It’s so cool to just rely on open-source libraries to help you do your work. Finally, Java has a huge community that is always willing to help.
Check out Alexandre's full interview:
Why not Java? It’s one of the most popular programming languages in the world. A lot of websites and applications are written in Java. You use tools written in Java every day from websites to services. Even on your mobile devices, you can find a lot of Java under the hood. And isn't it just interesting to find out how it works under the hood?
Check out Marharyta's full interview:
Java is mainly used in the backend but I would say it’s hard to find a use case where Java doesn’t fit. Comparing Java to other languages, like Go, it’s been said that Java lacks in performance. But nowadays, that’s not entirely true and Java has a very high level of performance. Even more so if we consider using native artifacts.
In the past, Java took a long time to start but that’s almost solved as well making Java a great choice for about any use case.
I would say forget front-end development and focus on using Java on the backend. Java would be the foundation of my business. No matter what you use to develop the front side, Java is there to support you on the backend.
I think the most widely used use case for Java is server-side development. It shines when you need the benefit from multithreads and where you need to implement high loads. Java is the best when you don’t care about fast startups but care a lot about performance. However, with the ability to compile into the native (using GraalVM, for example), Java can achieve fast startup and can be used in the cloud functions.
Java is a great general-purpose language but there are several situations where I wouldn’t use it. Things like scripting, cloud functions, and data science are best suited for other languages. Not that you couldn’t use Java but with data science, there are already a lot of libraries and infrastructure available for Python.
Java has been around for over 25 years so there are a lot of tools and IDEs as well as a lot of extensions for those IDEs. So the developer now has a lot of help during the coding process. Same for testing, there is not one framework for testing but lots of them and they are always evolving.
One of the strongest aspects of Java is its ecosystem. Compared to other languages, Java is old but not outdated. There is stability and maturity in the process so you won’t find things always coming and going.
Java is very mature and stable. You don’t need to learn a new framework every three months. At one point there were a lot of different frameworks on the market but now it is more mature and more stable. We estimate that the Spring framework is trusted by 80% of the market. This allows developers to focus on their projects instead of constantly learning new frameworks.
The same can be said about Java IDE’s and libraries. Java has lots of mature proven tools that let the developers focus on the business logic and delivering value to the user.
With Java being one of the most popular languages we have a lot of proven infrastructure available to the developers. Take IDEs for example, I started with NetBeans and then used Eclipse and now it's IntelliJ. Back then they were more like just editors with some features. Nowadays IDEs are not just editors, they are extremely advanced tools, helping you to create a collaborative environment, write cleaner code, and find bugs before they even reach production.
One particular thing that I love in the Java ecosystem is the ahead-of-time compilation approach used by several frameworks. With ahead-of-time compilation, frameworks can create applications that are very fast and take less memory plus they can be compiled into a native artifact you can run on any Linux machine without having the JVM installed.
I was pretty excited when Java 8 introduced Java Stream. This really allowed developers to write more concise and specific code for processing data. Even though it really isn’t new now, it really improved the readability and maintainability. It was easy for developers not involved in the project to come in and easily understand what the code was trying to do.
I am excited about the move away from Java 8. There are so many new and exciting features that happened after Java 8 and we could not use them because the world was stuck on Java 8. Currently, the situation has changed, and we can finally have Records, Pattern matching, and many other cool features in our codebase.
Clean Code means coding better. It means taking security and performance very seriously. Not taking a Clean Code approach is costing companies a lot of money. In the US alone, poor quality code costs businesses more than 2 trillion dollars. That’s a big motivator to take a Clean Code approach.
I know there are people who think using this approach is a hard thing to do. When you first analyze a project you may have thousands of issues. It can be overwhelming. But, by focusing only on the new code, and clean as you code, it’s very easy to implement and manage. After five years, you will only have around 30% of your old code still around.
It not only benefits the company, but it helps the developer improve their coding skills and grow as a professional.
Clean Code means code you can be proud of many years after it has been released. It means code that is built to last, code you write for your future you. It should be easy to read, understand, and change.
Clean Code means the perfect state of code. Now, you can never really achieve 100% perfect code but Clean Code is the process of trying to achieve perfect code. Every time you touch some code, you fix some issues and bugs. It’s all about the process of trying to achieve this ideal state.
We asked the interviewees a personal question about their relationship with Java for the final question.
I would say I have two professional lives. One before joining the Java community and another totally different life after joining the community.
The community makes Java what it is after 25 years. It’s not something that other languages can say or will be able to say. The Java community gives you lots of opportunities to learn, grow, and meet amazing people. People in the community are super kind and open to sharing knowledge for free.
Companies are benefitting from this community as well. Many community members create and maintain open-source projects on their own time that are used by many businesses.
I definitely encourage people to join and get involved in the Java community.
As a developer, I wanted to improve myself and my code. I wanted to make sure I was writing code that was clean. So I was looking for tools in the market that could help me accomplish this. When I came across Sonar, I thought to myself, hey, I can really help these guys implement rules that would be expected by Java developers.
So now as a PM, I gather the pains and the mistakes of Java developers so I can provide them a product that will help them write Clean Code.
I remember being interviewed at a conference and being asked what was next for me. Back then I had a pretty solid experience with Java, Kotlin, and Scala. So I was asked, what's next? Maybe C++? I said actually I am going to be writing static analysis and rules for Java and several of these other languages. I wanted something new in my journey and Static Analysis is the next level for me. I knew I could accomplish this here at Sonar.
A big thank you to Jonathan, Alexandre, and Marharyta, three of Sonar’s very own Java experts.
At Sonar we deliver solutions that add value to developers and help them create Clean Code for Java. Follow us to learn more, or download our free and open-source plugin SonarLint from your favorite IDE marketplace to try it yourself.
Learn more about Clean Code and Java here.
Java Champion, leader at BarcelonaJUG, and cofounder of JBCNConf and DevBcn conferences. Has worked as a developer for 30 years using several languages. Speaker at several conferences, he loves community....it changed his professional life
I began learning Java during my time at university when it was still in its early stages (v1.2). Since then, Java has become my primary programming language, and I have been coding with it continuously. Over the years, I have worked extensively in the banking industry, where I gained a deep understanding of the importance of writing clean code and the consequences of poor code quality. It was during this time that I had the opportunity to meet the team at Sonar and decided to join them in their mission to help millions of Java developers improve their code. At Sonar, I have held various roles and currently serve as a Product Manager, focusing on the Java Ecosystem, as well as Code Security, Speed, and Cloud Native domains.
Marharyta is passionate about programming, learning new things, and sharing her knowledge with others. She is a big Kotlin fan and Kotlin GDE. Knows both conference sides: speaking and organizing. She organized a KUG in her native city, Kyiv, because she believes in knowledge sharing and collective intelligence. For her everyday job, she's building Static Code Analysis tools for Java, Kotlin, Scala, and other languages, helping other developers all over the world make their code better.