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

At some point it hits everyone. Your precious work of several hours is vanished because of a hardware failure. For that the industry came up with several solutions like the idea of version control systems. But recently I was dumb enough to not do any commit for several hours - just to leave the history clean. Big mistake… But did you think about automating that? How about committing every couple of minutes automatically? In this post I’ll explain this - on the first sight - weird workflow.

In my current project I focus on the development of a highly available, scalable system that can handle millions of players worldwide. In order to test and ensure that this is actually the case we need to do regular performance and integration tests. While - for a long time - I explicitly separated both, I choose a new direction in this project by writing the JMeter performance test in a way that it can be used as an integration test as well.

Another month, another git alias (But don’t think that this will become a regularity now ;-) ). I had the issue that I lost track of the branches that were already in master a couple of times on one of my projects and after a while I had a lot of unnecessary jobs in Jenkins because we use the Jenkins multibranch plugin. So I sat down and created a git alias that does the cleanup for you with a bit of user-friendly output.

Usually you have a lot of “intermediate” commits while developing on a feature branch like WIP, Review changes, Some cleanup, Fix jenkins. These commits are neither atomic nor does it help to read them in the history. They purely serve the purpose to persist the current work, trigger another build on your buildmachine or doing some fixes you discovered while testing. So before I rebase my changes to master I’d like to squash all commits that i’ve done to a single one. Usually I use interactive rebase for this purpose but since I need to actively tell every commit that I want to squash it I found it tedious. Also its easier, most of the time, to rebase onto master since you only apply conflicting changes to the end-result of your work without the intermediate steps you had to take. So I came up with my own git alias that solves this for me. Introducing: git squash <Commit/Branch> <Message>

A common problem when doing end-to-end tests is colliding ports on you buildmachine with parallel execution. With the technology stack of Docker, Jenkins and Gradle I’ll demonstrate one solution I use in my current project to start the backend with a random port and use it in the test execution afterwards.

When you work with git you can define aliases to make your experience even more productive and elegant. In this short post I’d like to present aliases that I use frequently and how they work. And I’ll start with my favorite: git recent-branches.

Code on screen

About Me

Picture of Marcus Held

Marcus Held

Since July I work as a principal software engineer for grandcentrix. Previously I worked for Innogames where my main responsibility was the development of a highly scalable backend with Java and Spring that was capable of handling millions of players worldwide. Furthermore, I took care of their Jenkins for continuous integration, their build pipeline with Gradle and all technical challenges that we face to get our game out into the world.

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 in Hamburg 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.

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.

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.

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.

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.

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.

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.