For a while, I delved deep into creating online programming courses, motivated by the idea of generating passive income. However, this notion turned out to be somewhat naive. Without effective marketing, courses don't just sell themselves. If I wanted to seriously continue, I'd need to change my approach significantly, like providing regular free content. But I lack both the desire and the time for that.
It happens from time to time that I want to generate an Id which is shorter than the typical UUID. This can be the case with legacy systems that don't allow me to pass a long id at all. Especially in older data formats there are sometimes restrictions on the length of references. A UUID is usually so long that it can hardly be seen with the naked eye. For this reason alone it is worth to have an alternative for some use cases. How this could look like, I will show you in this post.
I often think about how I can make the initial setup for an online course as simple as possible. Ideally, you as a participant can start programming right away. Of course, that doesn't always work out. In the future, I plan therefore to use the same approach as in my everyday work. I assume the use of Docker and work with profiles in a pre-configured Docker-Compose environment. In this blog entry I show how this works. For my next Hibernate course, I need at least a PostgreSQL database and the PGAdmin interface. For this one will just need to run a shell script later and immediately get the appropriate local working environment.
In this blog entry I show how a full-text search with Hibernate Search could look like using a movie database as an example. I wanted to look into this topic for a while. Fortunately, in my current project I had the opportunity to set up an implementation from scratch. To experiment, I wrote myself a small demo application to start with. And to top it off, I've now also built myself a small website to go with it. My goal was to enable search with minimal infrastructure customization in Kubernetes.
I wrote a demo application to show how easy it is to use "Server Sent Events". If you have been active in web development for a while, you still know the principle of long polling for javascript applications. A client polls the server with regular Ajax requests, which the server leaves unanswered for a long time. Only when the server has something to say, it answers the request and the request is repeated. This is no longer necessary, because the original idea exists more elegantly in the official HTTP standard. It works so simply and well that it can be used as an alternative to websockets.
The following YouTube video is an intro from my last online course for AWS API Gateway. There I described in one chapter how to best configure CORS functionality. CORS stands for Cross Origin Resource Sharing and should be well known for most web developers. It is a very old security feature and in this post I try to answer the question what it actually secures against.
Every time I work with cron expressions I have a hard time reading them. For example, could be defined as "0 0 3 * * *". What could that possibly mean? And if I adjust it, how do I make sure that the correct value is actually set? To make my life easier I have therefore got into the habit of writing a unit test that outputs the first 3 results starting from a start date.
I learned many years ago to always use an index and offsets when paging larger amounts of data to the database. There are several reasons for this. On the one hand it is very efficient. But for another, it also ensures that you only read each record exactly once. Before I knew this, I had once produced a very strange behavior, which I want to show you as an example.
I am faced with the task of taming an increasingly growing number of asynchronous messages. As long as an application works without errors, that's not a problem, but when is that the case? It always happens occasionally that a message cannot be delivered. The basic procedure is to move it to a so-called "dead letter queue". There it lies dormant until a developer has the good grace to take a look. And this is the beginning of a big dilemma, because the solution is not always easy.
My current project employer has thankfully allowed me to show a small snippet of my current work. I have developed a monitoring application that I am very proud of. I had the opportunity to cover all areas and build backend, frontend and do the DevOps tasks for most of the initial version. I'm showing a screenshot and a short video here so you can get an idea.
In my day-to-day work, I constantly preach that you should never program something yourself if there is already a ready-made solution. Ironically, I broke my own rules with this blog. One of the reasons was that blogging didn't feel like programming. So I wanted to create a solution that would allow me to continue using the tools I was used to. And so the Serverless Blog was born.
I had to research an auditing solution for a new project. For this I took a closer look at Hibernate Envers. It turned out to be exactly what I was looking for, as it couldn't be easier to use. It also integrates seamlessly with Spring Data. I wrote a small demo project to try it out.
Before the newest switch expressions were added in Java I haven't used any "switch-case" statement for more then ten years. The reason is that at some point I learned better constructs that increase maintainability. This is especially true when using enumerations. I'll show you with some examples why "switch-case" is often times an "antipattern" for me, and which alternatives are much better.
At the beginning of my working life, I naively thought that everything you needed for development was already available. I assumed that it was only a matter of writing software for the respective business processes. However, I am regularly surprised to discover that the development process itself is so complicated that it is always worthwhile to develop special tools for one's own requirements.
I recently joined the Heise Academy with the online course AWS API Gateway REST. I picked up the idea for the topic from one of my last projects. Running a REST interface with 24 hour availability and high load is quite a challenge. If you can manage to run this part of the architecture "serverless" in AWS, it opens up a lot of interesting optimization possibilities and I show that with many practical examples.
All newly developed software systems I have seen in the last 5 years had a sufficiently good safety net of unit tests. This has always allowed me to bravely adjust the code without introducing major bugs. The goal of these tests should be to avoid accidentally breaking something. This usually works very well, but mostly only concerns bugs related to business requirements. I like to go one step further. I also like to develop tests that help me to avoid careless mistakes in programming. I'll show you what that might look like.
After I have already successfully provided a better looking ITerm at the Mac as well as a prettier Windows Linux Subsystem shell, I am still missing a good looking Powershell. In the meantime I also found a solution for this, namely "Oh my Posh". The irony is that this solution would have worked for all other systems as well.
Until a year ago, I was convinced that MacOS was the best development system. But I have changed my mind. Since my Mac has been having some performance issues lately, I've had to switch to Windows. And I am amazed to find that Windows 11 Professional has everything I need to develop. With the lower hardware costs, I can set up a much better development machine here. With the introduction of the Windows Linux subsystem, I no longer have trouble with Docker, and when it comes to the terminal, I also have much more flexibility.
The first rule of the book club is, no one talks about the book club. The second rule of the book club is ... Ok, just kidding. In this post, I want to share about a regular meeting where I talk about code improvements with my current team. Each week we work through chapter by chapter the book "Clean Code" by Robert C. Martin. We took this idea from a retrospective and it has turned into one of the most interesting and productive meetings. How did it come about?
One of my favorite things to do is to optimize code by bravely deleting parts. This works more often than you think, because many requirements are implemented much more complicated than necessary. I myself am not always innocent of this fact. There is one particular manifestation of this that should be avoided, namely the "generic solution". It is not so easily removable, because not only lots of strange dependencies are attached to it, but often also a big ego. What does generic mean? I'll give you three examples that I've already experienced.