Home » Archives for Sebastian Daschner

Author Archives: Sebastian Daschner

Sebastian Daschner is a self-employed Java consultant and trainer. He is the author of the book 'Architecting Modern Java EE Applications'. Sebastian is a Java Champion, Oracle Developer Champion and JavaOne Rockstar.

Capitalize English Titles With Java, Quarkus & GraalVM

Over the years, I’ve been writing a lot in English, which isn’t my mother tongue, and for writing titles (headlines, article titles, etc.) I always have to think which words to capitalize. Thus, I’ve created a small tool, of course written in Java, that I use as command line tool, powered by Quarkus, Picocli, and GraalVM. What I want to ...

Read More »

Logging Performance Comparison

java-interview-questions-answers

In a previous blog post, I explained the pros and cons of using logging. In this post, we’ll explore and compare the performance of different logging solutions that approximate the role of an audit log. To recap, the premise is that in enterprise applications, logging should only be used mainly for the purposes of: Recording unexpected errors & unrecoverable situationsCompletion ...

Read More »

The Case Against Logging

The one thing that all enterprise applications have in common, regardless of their framework, language, or communication protocols is that they produce logs, logs that are allegedly human-readable lines of strings that aim to help us to debug, trace, or otherwise inspect what’s going on. The question is, how useful are these logs and do they help us solve problems ...

Read More »

Using Nginx as Browsersync proxy

For frontend development, Browsersync is a helpful tool that reduces the turnaround time to a minimum while coding. While serving local files and listening to changes it can also proxy your backend URL and forward requests, which, however, doesn’t work in all scenarios. If you have cases in which Browsersync’s proxying functionalities aren’t sufficient, you can use a small Nginx ...

Read More »

Calculations in Quarkus Qute using AtomicInteger

java-interview-questions-answers

Quarkus’ Qute Templating Engine is very handy for creating server-side rendered pages. Besides the regular loops and control structures, there’s also a possibility to set and update variables, at least with a small trick. In the following, we’ll see how to do some arithmetic calculations using Java’s AtomicInteger. Usually, you can invoke methods of objects that are passed to Qute, ...

Read More »

The Log4Shell vulnerability and how to fix it

Since Friday, the Java and general IT world has been in a bit of turmoil after a zero-day vulnerability in the widely-used logging framework Log4j has been disclosed. The vulnerability enables remote code execution (RCE) and affects, well, a lot of Java applications. What happens in a nutshell is that one can trigger a remote code execution by providing a string in ...

Read More »

Using JaCoCo to measure system test coverage

java-interview-questions-answers

Measuring test coverage of your production code can quickly become a heated topic, especially with regards to which percentage is the right number. In the video, I want to show you a different approach to usual code coverage, one that uses system tests with the application’s endpoints, in order to see how well our test scenarios cover all use cases. ...

Read More »

Configuring plain Java projects using MicroProfile Config

java-interview-questions-answers

If you’re in the Enterprise Java space, you’re probably aware that you can use MicroProfile Config to configure your applications. This also works with plain Java projects, without an enterprise runtime, by using a MicroProfile implementation such as Smallrye. In this video, I’m showing how to do this, and in which circumstances it might be helpful: The example uses a ...

Read More »

Running complex project setups with Testcontainers

In a lot of my #testing content, I’ve been showing how to run projects locally, for example by using Docker containers. In this video, I’m showing how to build up a complex project setup using Testcontainers, while keeping a flexible and efficient development workflow. My goal is to separate the life cycles of my system / acceptance tests from the ...

Read More »