Extending the DDM modules in Liferay with custom field types isn’t that easy. This blog post is the result of our attempts...
The ping pong problemKoen Wellens
Our digital ping-pong scoreboard as a great example of innovation and fun at ACA
At ACA IT-Solutions, we really care about innovation, our customers, teamwork and fun @ work. They are part of our core values. Heck, it’s in our DNA! So, is it a surprise that the first piece of working software coming from last year’s Ship-It Day is a digital ping-pong scoreboard? Not really!
Our office in Olen has a recreation corner where our colleagues can play video games and table tennis. Since the introduction of the sport into our office, all of us have been practicing a bit. Well… who am I kidding? Alright, we have been practicing A LOT. There have been multiple tournaments to find the best player. At least twice a day, you can hear the distant sounds of a ping-pong ball bouncing off the table.
Who’s keeping score?
A problem we suffered a lot was keeping the score. If you’re focused on winning your game, you might forget whether it was 5-3 or 3-5. Even worse, you might forget the score of the previous set(s). We needed to enter these numbers into a tournament system, which inevitably caused some discussions. Games were played again because of it. The best solution we had before the Ship-It Day was to write the scores on a whiteboard or have someone else join and keep score.
Being solution engineers, we are convinced we can build anything. So, we decided to tackle the ping-pong problem. Let’s look at what was required to build our digital ping-pong scoreboard!
We wanted to create something user-friendly. If a user can’t use your system because it’s too difficult, then what’s the point? We decided to make sure players only needed to perform minimal tasks to use the Scoreboard.
We attached flic push-buttons to the sides of the table. These push-buttons send a signal over Bluetooth, which is then picked up by a raspberry pi, sending an event to an application hosted on OpenShift. This Kubernetes platform allows us to scale our backend and frontend separately. We can even do rolling updates without downtime, so we never have to stop playing ping-pong. 😉
We used our own platform to reuse building blocks and create a simple application. This Java solution uses OSGi as a framework. We developed the frontend as an Angular application.
Ready? Set… Iterate!
The setup with the flic push-buttons, the bluetooth connection and the raspberry pi was, however, not our initial idea. We had used different buttons before. These would send a signal through a Domotica protocol to a SmartThings hub. This hub then sent an event to our application on OpenShift.
It soon became apparent that this setup caused too much delay. Players started complaining about it. So… what do agile software developers do then? That’s right: we use the user feedback and iterate. Improving our application and setup to further satisfy our ‘customers’.
The Digital Ping-Pong Scoreboard in action
So, how does our neat scoreboard do in action? According to the rules of our office ping-pong, the teams first have to play one game to win the serve. The team that wins the serve then pushes their flic push-button twice. This indicates the start of a set, as well as the team that starts serving. The set starts and the game is on!
After every serve, the team that wins the point pushes their button. The screen then immediately displays the updated score. Additionally, the system also indicates when the other side gets to serve (which is after every two points scored).
The system is aware of the table tennis rules, so it indicates when a set is over. We programmed it to always play best of 3, so after a set, the system tells the teams to switch sides and the next set begins.
There are some easter eggs, of course. We can’t make a project for fun @ work too serious! For instance, the system shows shameful images and quotes when a team loses 11 to 0. There are effects played when a match starts or when there is a set/match point. And a lot more… But to see those, you’ll just have to come over some day and find them for yourself. 😉
An extra problem we ran into was the position of our recreation corner, which is right next to some meeting rooms. Since we tend to get really involved in the games we play, we sometimes forget the people in those meetings can hear us, too.
Nothing we can’t fix, right? As a solution, we added a push-button in every meeting room. When someone pushes it, the system displays that some colleagues are asking for a time-out. We lay down our palets and come back when we can resume.
You know, for creative software engineers, we’re really lucky to work for ACA IT-Solutions. 😀 If you’d like to participate in the fun, why not check out our vacancies and join us in our creative software adventures?