Welcome to Dead Code Rising

Dive into a wide range of advice, tips, and in-depth tutorials on software development

How to generate a stream of random numbers in Java

From time to time you end up with the need of generating some random numbers. In Java, the Random class has been the go-to solution for this type of work. Random serves several helpful methods for creating random ints, doubles and longs. However, if you wanted a sequence of random…


Java 9: Cleaning up your default methods using private interface methods

Java 8 brought huge changes — one of them being the default interface methods. These methods changed interfaces as we knew them — we could now define default implementations in the interface itself. If you use these default methods heavily in your applications, you'll quickly figure out one thing — it doesn't really…


ES6: Working with Sets in JavaScript

In this post we're continuing to look at features introduced in ES6. Amongst all the cool things happening in ES6, we find a few new data structures — one of them being the Set. So what is actually a Set? A Set is a data structure that store unique values of…


Java 9 - Making the Stream API even better

One of the first things I check out when looking at a new language is if it got a good collection API. I find that a good way of working with collections usually result in cleaner code that is easier to understand and reason about. That's why I was glad…




Being asynchronous in JavaScript using Promises

This post is long overdue. Promises are something I've enjoyed working with the last couple of months. Not only is it a simple way of working asynchronously, but with the increasing amount of frameworks embracing it, it becomes easy to benefit from in your projects. So what is a Promise?…


ES6: 3 new ways of defining object properties in JavaScript

Repetitive boilerplate code is something that haunts most developers to some degree. It’s like an itch that can’t be scratched. It drags you away from the flow, it messes up your code, and it blurs away the important parts. What I love about ES6 is that it takes…