Newer Posts Older Posts

Iterative Waterfall



Although agile processes are becoming commonplace in many organisations, many developers and projects are still stuck in some form of waterfall and classical project management, especially in large organisations. (Like me.) But within the constraints of classical project management, some agile practices can be applied. In the case of this post, I will look at iterations.

Iterations are not something new that agile processes brought to the development scene. But they make it a core mechanic of the process. The core idea is to reduce the feedback loop. One thing that the water wall fails to do well.

read more

Revised EventEmitter



I wrote a C++ incarnation of node.js' EventEmitter. But as things are, when you communicate a subject, often you find new insight and flaws in the topic. One of the reasons why rubber ducking is a useful tool, while designing software.

My insight was that the listeners are stored is optimized in the wrong way. I used the standard way when you have handle to things, the handle is the key into a map that holds things. This makes sense when most of the time the outside world calls functions with this handle. But in the case of the EventEmitter, the handle to the listener is only relevant when you want to remove it. But what is done most of the time is emitting events. So it just plainly makes sense to order the map by the event.

read more

EventEmitter in C++



Note: While writing this article I noticed in flaw how the listeners are stored. You can read everything about the Revised EventEmitter.

When it comes to C++ callback / event handling I have for a long time relied on sigc++. But since the release and mainstream adoption of C++11, I have more and more relied on lambda function for event handling. I have mostly just used the pattern where a std::function is stored for each event and you can set them through a on_event function, like so:

class Widget
    void on_something(std::function<void (int)>cb) 
        something_cb = cb;            

    void do_something()
        if (something_cb)

    std::function<void (int)> something_cb;

widget.on_something([&] (int info) {
    // react to event

This takes some queues form node.js and has a high degree of readability. The pattern only has one severe drawbacks. First you can only register one handler at any time.

read more

Overhaul of Page Generation



When migrating from jekyl to gulp.js I was basically following jekyls lead, purely to ease the migration pains.

Some point later Daniel Naab adapted my aproach. Although he build ontop of my ideas, he played the ball out of the park. What really stuck me as ingenious is the integration of The combination of travis-ci and, means that novice users can author the website without knowing what git and a text editor is. The result is something close to a high end CMS with static generated HTML pages.

read more

The ACME Protocol



... is the best thing since sliced bread the invention of SSL/TLS.

The Electronic Frontier Foundation (EFF), Mozilla, Akamai, Cisco and IdenTrus have partnered to create a free Certificate Authority (CA), Let's Encrypt. But the real twist is that they have removed humans form the certificate signing and revocation process. Finally the cherry on the cake is that Bruce Schneier thinks it's an "absolutely fantastic idea".

Enough of appeal to authority, first let us look at what is broken with existing certificate signing process. The way to get a valid SSL certificate is to create a signing request and have that signing request turned into a certificate by the CA. This certificate is then signed against the CA's certificate.

The SSL signing process is quite solid from a technical and cryptographic standpoint, but commonly fails on the human front. The problem is how does the CA know you are who you claim to be and that you that you actually own the domains the certificate is for?

read more

Star Citizen Adverts



One aspect of Star Citizen's marketing is genius, the ship adverts.

When you are marketing a game it is really difficult. What do you tell the potential players? More graphics, more spaceships awesome fun? Pulling this off is really hard, without coming over as a cheesy use care sales pitch. The best so far are the cinematic trailers, but these are often lauded for their lack of actual game footage.

read more

Spritz Saber



Cryptography is the cornerstone for a safe and free internet. This comes in form of useful technologies, such as TLS, S/MIME, PGP and encryption standards such as AES. But it is important to have a simple fallback to remind powers that be that banning encryption is a futile task.

This used to be ensured by the nimble Cipher Saber, that use RC4. The primary feature of Cipher Saber and RC4 was, that you could basically memorize the algorithm. This meant that any attempt at banning encryption is easily circumvented, since all you need to reproduce the program is a text editor and a compiler. Unfortunately RC4 is considered to be at the brink of being broken and without any replacement this basic premise is lost.

But luckily this Monday (27. Oct. 2014) the Spritz stream cipher was published. It is a stream cipher that is loosely based on RC4 and is almost a perfect drop in replacement for RC4.

read more

Pivotal Tracker



If you ever think "I should sit down and make a plan", you need to use Pivotal Tracker. It is not an agile management and planing tool, it is common project management sense distilled.

Enough of the big praising words, I really think that Pivotal Tracker is the most sensible tool you can use to plan and track your project's progress. It praises itself with being agile and you will find terms such as "stories", "velocity", "backlog" and "iteration", but in it's essence it just works, no matter what you think about agile.

Not quite kanban.

The interface is structured loosely on the kanban board concept. Although you can arrange the columns as you like, it comes with the above view. The stories "flow" right to left and rise to the top. This means that the most pressing item is on the top left, below the completed items.

read more

Procedural Terrain Material (Unreal Engine 4)



You can read or watch many tutorials on how to texture a terrain using layer blends. Although that is a valid way to texture a terrain, I think that most of the work you put into texturing the terrain is redundant.

Take the classical grass, rock and sand terrain material. The flats always get the grass, the rock goes on the slopes and the sand goes on the beach. This would be something similar to this:

Grass on flats, rock on slopes and sand on beaches.

But if this rule holds up in your scene, why not encode it in the terrain shader?

read more

Template vs. Inheritance



I was asked the following question:

Bjarne said "It's usually a mistake to express parametrization of a class and its associated functions with a type using inheritance. It's best done using templates..." but why?? what's wrong with using inheritance??

Oddly enough I never thought about the issue and used templates and inheritance purely on an intuitive level. But now I am forced formulate the difference, where each is applicable and where each falls down.

To show the difference I will use two examples that are clearly at home in their respective implementations.

The first is the well trodden shapes example:

The classical example if inheritance: shapes

The other is are multidimensional vector as implemented in glm:

The classical example if templates: vectors

What makes the use cases so different?

read more

Newer Posts Older Posts