# Blog

## Introduction to CompletableFutures

2016-01-18

CompletableFuture is a new addition in Java 1.8. It’s a type of Future object allowing execution of code upon completion. To explain the idea, let’s first recap what a future object is.

## Fat Jars with Excluded Dependencies in Gradle

2014-06-30

In this post I will outline how to build a jar in Gradle that includes all project dependencies, a so-called “fat jar”. However, this implementation will allow you to selectively exclude certain dependencies from the packaged jar. The motivation for this came while using Apache Storm, where any dependencies must be bundled in the jar, but the Storm libraries themselves are provided by the runtime environment and thus must not be bundled.

2014-06-16

Resetting a user’s password can be a simple thing to do, providing you avoid certain pitfalls.

## Canvas Trees

2014-02-28

Very old canvas hack of mine.

## Danish Meatballs

2014-02-26

My super simple recipe for Danish meatballs, or “Frikadeller” as they’re called in Danish. Nothing special, but someone asked for it, so I’m leaving it here. According to my dad, who gave me the recipe, this batch makes about 12, though I have never counted. Normally in Denmark we’d serve this with a healthy portion of white potatoes and gravy, but you can have it however you like.

## Running Banished on Linux

2014-02-23

Yeah that’s right, it works! The only thing I was not able to make work immediately was sound, but I can live without that.

## Proxy Servlet for GWT in devmode

2014-01-28

One of the problems with using GWT is that when you run in devmode, GWT manages its own instance of a Jetty server (I think it’s a Jetty server anyway). Unless you want to use GWT’s own server implementation, and perhaps even run in on Google AppEngine, you’re going to run into the same origin policy. In order to get around this problem, you have to set up a proxy server of some sort.

## Planet Earth on the Desktop

2014-01-24

Ages ago I created a script to generate a visual representation of the earth from space. Since then it stopped working, but I’m happy to announce that I’ve updated the code and it now works again.

## Untitled

title: What makes a good programmer (co-worker)? published: false —

• The ability to provide information upfront information about a potential problem in a coherent, complete, yet concise manner.
• Owning up to mistakes.
• Admitting when you don’t know something. I once saw a question of Quora saying something like “What’s the best way to avoid a question when you don’t know the answer”, and the top answer was “Don’t avoid it, just admit you don’t know”. This seems to be a politician problem. In our society we think someone is stupid if they don’t know the answer. We can’t all know everything. Even people running for public office can’t be fully informed about all the issues of the day. Likewise developers can’t be expected to know everything about everything. If there is an unknown, we should explore that.

## Untitled

 title: Player Flow template: article.jade date: 2016-01-29 published: false

Outline flow of players through a game.

## Untitled

 title: Chat Etiquette template: article.jade date: 2016-01-01 published: false

# Don’t ask if someone is there

Consider the following conversion:

Bob: Hey Alice
Bob: Are you there?
Alice: Yes, what's up?
Bob: Got time for a quick call?
Alice: Sure, give me a minute. What do you want to talk about?
Bob: About &lt;topic&gt;.

Maybe it’s just me, but I get annoyed at conversations like this. First of all, why does Bob want to confirm Alice is there? Think about it, the only possible answer Bob could get is “yes”. If Alice is not at her keyboard, she can’t answer. If Alice is there however, Bob has now pulled her away from whatever she was doing, simply to confirm her position at her keyboard. Add to this the fact that Alice probably sees a notification on every single one of bob’s messages. Bob should have simply say:

Bob: Hey Alice, when you have some time I’d like to have a call about . Let me know when you’re free.

Simple, to the point. As soon as Alice sees this one message, she knows that Bob wants to talk and what he wants to talk about. Alice can now immediately schedule a few minutes in her mental calendar and also think about the topic before having the call with Bob.

# Write full sentences

This is so simple. I’ve had a small number of colleagues and friends who’ve done this, and I’ve tried many times to ask them not to do it. I’m sure you recognise the problem:

Bob: Hey Alice
Bob: how is it going?
Bob: I was thinking
Bob: we should have lunch together
Bob: this afternoon
Bob: then we can also talk about
Bob: &lt;topic&gt;
Bob: what do you think?

Every single one of those probably result in a notification, pissing off Alice to no end. It’s like Bob has enter-button-tourettes, he just can’t hold off pressing that button constantly. In fact Bob has a coherent point. All he has to do to fix the problem and be a nice chatter is to just press the space buttoner instead of the enter button. Same number of keystrokes.

Bob: Hey Alice how is it going? I was thinking we should have lunch together this afternoon then we can also talk about &lt;topic&gt; what do you think?

That’s better, Bob.

# No trailing question marks

Some people insist on putting the question mark on a separate line:

Bob: Hey did you do <thing>
Bob: ?

Why is this annoying? Think about the situation where Alice isn’t in a position to see the messages immediately. Perhaps she comes back from the bathroom or sees the messages on her phone. In situations like that usually only the last notification is shown. That notification is now simply an utterly useless “?”.

#--------#
| Bob: ? |
#--------#

Thanks Bob!

# Using another channel to remind someone

Some organizations use public channels to communicate about different topics. This is perfectly valid. As one of my colleagues described it, you should treat these channels like email threads. However I’ve had other colleages who’ll write to me in channel A, and when I don’t reply immediately and they see me talking in channel B, they’ll notify me in channel B to check channel A. I see the notification in channel A, and I’ll get to it when I’m done in channel B.

#-------------#
#-------------#
It’s just a mention, nothing else. It probably means there’s something in that channel which requires my attention, or maybe I did reply to an ongoing conversation. Fair enough, but it would be nice if that mention had a little more information. Even if it’s just Bob: @Alice thoughts on that?.