Home » Archives for Peter Verhas

Author Archives: Peter Verhas

Docs as Code is not enough

Docs as Code It is the first step to the right direction The approach to treating your documentation the same way as program code is a step in the right direction, but it is far from state-of-the-art. The practice is detailed on many websites that advocate the use of docs-as-code (DAC). For example the Write the Docs community has a ...

Read More »

Lambda and final variables

Introduction Lambda expressions can use the variables in the scope of the lambda expression, but only if they are final or effectively final. What is the reason for that? Why is that? It is an interesting question because the answer is not apparent and opinionated. There is only one ultimate answer, though: because that is what the Java Language Specification ...

Read More »

Why and how do to do technical interviews?

It is a personal blog. The views and opinions expressed in this article are those of the author. They do not represent people, institutions, or organizations that the author may or may not be associated with in a professional or a personal capacity. All information is provided on an as-is basis. Technology companies are growing and need new personnel. In ...

Read More »

Creating a JUnit 5 ExecutionCondition

Introduction JUnit 5 has a lot of underutilized features. Developers have learned how to use JUnit 4, and they utilize the same feature set when using JUnit5. The sexy DisplayName annotation is used more and more, but the majority of the new features developers skip. In this article, I describe a particular situation I was facing and how I solved ...

Read More »

Automate Technical Documentation using Jamal

Introduction Writing good technical documentation is an art. An art is the expression or application of human creative skill and imagination, … to be appreciated primarily for their beauty or emotional power. But every art, like sculpting, has a craft part. You need chisels, hammers to form the sculpture out of the blob of marble. You need to learn the ...

Read More »

Unit testing private methods

Introduction In this article, I will contemplate the testing of private methods in unit tests. After that, I will propose a way or pattern to do it, if you must. Finally, I will show how you can generate this pattern automatically. And yes, I will also write a takeaway section to know what you have read. Test or not to ...

Read More »

Start a Java app without installing it

This article describes how you can use JShell to download and execute a Java application. It will eliminate the need for the installation of the application. Do not install, just run! The first obstacle that you have to overcome to make people use your app is the installation.You want people to use the app, try it out.To do that, they ...

Read More »

All you wanted to know about Throwable

This article is a tutorial about exceptions. But not the usual one. There are many of those that tell you what exceptions are for, how you can throw one, catch one, the difference between checked and runtime exceptions, and so on. There is no need for another. It would also be boring for you. If not, then go and read ...

Read More »

JDK14 instance of EA issue

Tagir Valeev recently had a tweet about the preview feature of the soon coming JDK14 release of Java:             #Java14 pattern matching brings name shadowing to the next level of craziness. Here I add or remove the `final` modifier for the `FLAG` field, which is accessed only in unreachable `if` branch. This actually changes the ...

Read More »