Skip to content

Recent Articles

9
Oct

While or For? A Comment On Code Entropy

I just saw Olve Maudal‘s talk from JavaZone 2011. The topic for the talk is Code Entropy and the Physics of Software. (Note: The talk is in Norwegian.) In the talk, Olve discusses how likely two semantically identical pieces of code are to be changed into each other. For example, say you have the following snippet:

if (!isValid()) {
    // Handle the invalid state
} else {
    // Handle the valid state
}

How likely is that to change into this one:

if (isValid()) {
    // Handle the valid state
} else {
    // Handle the invalid state
}

… and vice versa? Olve defines that the higher probability a piece of code has to change into a semantically identical piece of code, the higher its entropy is. In this post I will share a couple of thoughts about this. Read moreRead more

30
Sep

Type Guarantees, Part 1

In many typed languages the type system is a powerful system, which can be used for more things than you may be aware. In this series I want to showcase some simple examples.

Read moreRead more

25
Sep

Using ARP Poisoning to Create an Ad-Hoc Firewall – Part 1: The Strategy

Some time ago I wrote a small C++ wrapper library around libnet and libpcap to ease the development of various networking applications. After spending some time trying to come up with an idea, I figured I would try and create a very simple ad-hoc firewall by utilizing ARP poisoning (this will be explained shortly) on hosts I wanted to firewall. I know very little about firewalls, so I thought it would be a cool project. Furthermore, it is also a legitimate use of ARP poisoning which is certainly not something you come across every day. In this post I will explain the basic idea behind ARP poisoning and how I intend to use it to create an ad-hoc firewall.

Read moreRead more

19
Sep

Stepping Into The Real World, Part 1


“When I was a child, I spoke as a child, I understood as a child, I thought as a child. But when I became a man, I put away childish things.”

The above bible quote was made by Cereal Killer in the classic computer movie Hackers, and it illustrates how I feel about my current situation as a developer – I’m learning what it’s like to step into the real world. Read moreRead more

16
Sep

When Are Two Things The Same?

A classic philosophical puzzle goes something like this.

You have a boat. Then someone replaces a part of this boat with another, similar part. Your boat it still the same boat, right? It’s not like you have a new boat if you change a floor board. But then, one by one all the parts of the boat is replaced in this way. Is it then still the same? If not – when did it become a new boat? If it still is the same boat – what if someone used the parts removed from the boat to build a whole new(?) boat?

Read moreRead more

Switch to our mobile site