Code-Held

Blog about Spring, Kotlin, Java, JVM, Clean Code, Continuous Integration and many more topics from my daily work
Code on screen dark

I use the declarative Jenkins pipeline in my current project, but after 2 years of development we hit a barrier I wasn’t aware of. Jenkins puts the whole declarative pipeline into a single method and at a certain size the JVM fails with java.lang.RuntimeException: Method code too large!. Digging deeper it turns out that no method is allowed to exceed 64k. So I needed to find a solution for this problem.

After reading through Designing Bulletproof Code by Otavio Santana I stumbled upon its example of using a builder pattern. While this was not the focus of the article itself I also realized that I saw the issue in the past a lot and I ran in it as well. The widely spread understanding of the builder pattern (as described in Effective Java by Joshua Bloch) does not differentiate between optional and mandatory parameters and that makes their usage not easier but harder.

Today I have an awesome Message. Since I also post about technologies I use on this page I decided to put the whole page open source on gitlab. Feel free to discover how I developed this blog and which technologies I use.

I built a new neat feature on my blog posts detail page that displays the configured image as a background image in the top of the rendered page. The trick to get the transparent fading effect via css is using a linear-gradient on top of the actual image.

Since I don’t want to install and manage a compatible version of Ruby for my Jekyll version and all dependencies of my website I decided to use Jekylls’ Docker image to develop this page. For my build pipeline in Gitlab CI I wanted to make use of these already existing definitions.

For every blog post I specify an image that is shown on the front page. I also use the jekyll-feed plugin to generate an rss feed. This plugin uses the front matter information to generate the necessary meta-data. So the image front matter data is used to fill the <media:thumbnail> tag in the feed. But the jekyll-assets plugin don’t need fully qualified paths to the assets but just its name. So I needed to find a solution for this.

Code on screen

About Me

Picture of Marcus Held

Marcus Held

For the last 8 years I'm working on the JVM with Java and Kotlin, and for the last 5 years with Spring and Hibernate. At grandcentrix I'm leading a team of 8 backend developers specialized in building IoT Cloud backends in Azure. My focus lies in improving code quality and performance in the system and infrastructure competence center as well as educating our employees. Before that I worked for Innogames where my main responsibility was the development of a highly scalable backend that was capable of handling millions of players worldwide.

At the age of 12, I had my first experience with programming. At 15 I started working professionally for companies and by 18, prior to finishing school, I founded my first company: Web as Art. I studied computer science at Hochschule Bonn-Rhein-Sieg and live near Cologne with my wife and two sons.

Boost Your Development With Proper API Design code.talks 2019

With 1600 attendees is code.talks the largest developer conference in Germany. Around 400 people listened to my talk where I discussed several aspect of robust software architecture design.

more_horiz
Rise of Cultures
Rise of Cultures close

What is it?

Rise of Cultures is a simulation game where you guide your civilization through the ages, meet other cultures, conquer continents and built up your cities.

What did I do?

I developed and maintained the backend, which we developed with Java, Spring and Hibernate. When I worked on the project we released it for the first time on the US market to test early retention KPIs.

more_horiz
Sunrise Village
Sunrise Village close

What is it?

Sunrise Village was a character driven simulation game in which the player built up a village and explored the world with his character. The game featured a rich exploration of the world and an extensive production simulation.

What did I do?

I developed and designed the server from the early days of production with Java, C#, Spring, Hibernate, RabbitMQ and .NET Core. One of the main features of the backend was a .NET Core application that used the same business logic as our client. The backend was capable to simulate multiple players moving on the same map.

more_horiz
Gates of Epica
Gates of Epica close

What is it?

Gates of Epica was an action RPG developed with the Unreal Engine 4 for iOS and Android. In the game the player fought for loot and glory in more then 600 hand-crafted missions and joined glorious multiplayer boss fights where many players fought a boss for days.

What did I do?

My responsibility was the development of the backend and game logic. We used Java with Spring Boot, postgreSQL and hibernate.

more_horiz
Legends of Honor
Legends of Honor close

What is it?

Legends of Honor is a massive multiplayer online strategy browser game. In the game you take control over a medieval kingdom and move through the world with your army in real time.

What did I do?

When the project was started I joined it right away as the first backend developer. In this role I had the technical responsibility to design the server architecture and lead a team of 10 backend developers until the launch of the project.

more_horiz
Shadow Kings
Shadow Kings close

What is it?

As a successor of Goodgame Empire it was planned to target a more casual audience with a similar gameplay. Shadow Kings got released on PC, iOS and Android.

What did I do?

I took over the project in the last months of its existence as the first backend developer. In this time it was my responsibility to lead a team of 6 backend developers and to fork off the server from its origins in Goodgame Empire.

more_horiz
Goodgame Empire
Goodgame Empire close

What is it?

Goodgame Empire is a massive multiplayer browsergame with more than 70 million registered players. As a player you build up your castle to rule over four different kingdoms.

What did I do?

I started working on Empire 2014 and was one of the main backend developers of one of the two feature teams we operated. In this project we operated a Java based server which handled thousands of concurrent users with a high amount of requests per minute.

Technologies

Tools