Archives: code

Ray Tracing with Akka – Part 1

About this series Most of the time, when you learn a new concept or a new programming language from a(n) (e-)book, you get the basics. But these are really far from the production-ready code with the new toolstack. The only good way to learn programming (like most of the other things in life) is to practice. […]

The Best Scala Code Formatters and Linting Tools

Have you ever faced the problem: your PR on github is not merged because you didn’t follow the project style-guide? Or your IDE is reformatting the whole file when you just want to modify one line? We had some of theses problems with our own code-base here at Wanari (most of the time when we […]

XML Drawables for Android Developers

It’s good to know what you can do in xml to draw something on the UI. I recently noticed that I and some colleagues tend to overcomplicate simple tasks, because we don’t really know the built-in possibilities. Sometimes the design requires a not too complex, but not so simple (e.g. a shape) drawing on the […]

How are Scala Implicits more explicit than Java Generics?

This blogpost will show you how implicits can solve problems arising from/because of type erasure, proving that Scala implicits sometimes are more explicit than Java generics   All of these code snippets can be copy-pasted to the REPL. Some of the require-s will fail, those are just to demonstrate the expected work without the need […]

How to Write a Custom Protocol for Gatling?

I like to try out new tools and new things, so I decided to loadtest my newly written “simple chat” application to see how AkkaStreams handles load. Starting with load testing, there are some tools out there. The top three are JMeter, Gatling and Tsug. Tsug is written in erlang, and my half year long […]

Speed: Recommendation for Keeping and Manipulating Objects

It is often the case at Wanari that we need to convert objects of one kind to become objects of another kind. This happens because we use different models in the different levels of an application. The question obviously came up: how should we do this? Does it matter what kind of a collection we […]

A Quick Guide to Implement a Cross-Browser AngularJS Pull-to-refresh Directive

What made me do this? As a newbie in frontend development, I have to admit, a few months ago I couldn’t even imagine myself writing my own UI component. In those good days, I just carelessly included other, ready-to-use components and never thought about why and how they really work. Sometimes these plugins caused me […]

Deploying a Play! app to Azure via Jenkins

Here at Wanari, we use Play Framework for many of our projects and maintain products on our own servers. Not too long ago, a client of ours requested to move such product to Azure Cloud. After a bit of research we found 3 options: We create a Virtual Machine on which we arrange the environment we use on […]

Monday Morning with a Content-Security-Policy HTTP Response Header

The story Mondays are always a unique mixture of a new beginning and unexpected surprises in every office. Sometimes you find a solution for a long-standing problem, but you never know what awaits you in your mailbox after a long, unclouded weekend. The Monday morning, on which my story begins, is a good example for […]