Articles in the Development category

  1. Tunneling Elixir Cluster Network Traffic Over Wireguard

    Tue 07 November 2023


    The other day I was supporting a customer with an Elixir-based platform that would make use of Elixir libcluster, so messages on one host can be passed to other hosts. This can - for example - enable live updates for all users, even if they are not communicating with the same application server.


    Elixir's libcluster does support encrypted communication using TLS certificates however I was struggling with the help of an application developer to make it work.

    "severity":"warn","message":"[libcluster:example] unable to connect to :\"app@Host-B\"

    I'm absolutely open to the idea that we did something wrong and certificate-based encryption will work, but we were time-constrained and we decided to opt for another solution that seemed simpler and easier to maintain.

    Wireguard as the encrypted transport

    I deployed a Wireguard mesh network between all application servers using Ansible, which was straight forward. We just provisioned all hosts into the /etc/hosts file to keep things simple.

    In the table below, we show a simplified example of the setup.

    Hostname IP-address Wireguard Hostname Wireguard IP-address
    Host-A Host-A-wg
    Host-B Host-B-wg

    The Elixir applications would only know about the Host-A|B-wg hostnames and thus communicate over the encrypted VPN tunnel.

    The problem with wireguard and libcluster

    The key issue with libcluster is that when Host-A connects to Host-B, it uses the DNS hostname Host-B-wg hostname. But the actual hostname of Host-B is - you guess it: 'Host-B'. This means there is a mismatch and for reasons unknown to me, the libcluster connection will fail.

    So the target hostname as configured in libcluster must match the hostname of the actual host! Since libcluster seems to make usage of domain names mandatatory, using IP-addresses was not an option.

    If we would point Host-B to it's Wireguard IP-address (, the problem would be solved. However, in that case, Wireguard doesn't know about the external IP address and also tries to connect to the non-existing address. So the Wireguard tunnel would never be created.

    The solution

    The solution is not that elegant, but it works. We still point the Host-B domain name to the wireguard IP address of but we create an additional DNS record specifically for Wireguard, pointing to, so it can setup the VPN tunnel.

    This is what /etc/hosts looks like on Host-A: Host-A Host-B Host-B-wg

    And this is what /etc/hosts looks like on Host-B: Host-B Host-A Host-A-wg


    Although all choices are a tradeoff, for us, the Wireguard-based solution makes most sense. Especially now that we have an encrypted tunnel between all hosts and any future communication between hosts can thus be encrypted without any additional effort.

    Tagged as : Uncategorized
  2. Most Technical Debt Is Just Bullshit

    Fri 25 September 2020


    I made an offhand remark about technical debt to a friend and he interrupted me, saying: "technical debt is just bullshit". In his experience, people talking about technical debt were mostly trying to:

    • cover up bad code
    • cover up unfinished work



    Calling these issues 'technical debt' seems to be a tactic of distancing oneself from these problems. A nice way of avoiding responsibility. To sweep things under the rug.

    Intrigued, I decided to take a better look at the metaphor of techical debt, to better understand what is actually meant.

    Tip: this article on Medium by David Vandegrift also tackles this topic.

    A definition of technical debt

    Right off the bat, I realised that my own understanding of technical debt was wrong. Most people seem to understand technical debt as:

    "cut a corner now, to capture short-term business value (taking on debt), and clean up later (repaying the debt)".

    I think that's wrong.

    Ward Cunningham, who coined the metaphor of technical debt, wrote:

    You know, if you want to be able to go into debt that way by developing software that you don't completely understand, you are wise to make that software reflect your understanding as best as you can, so that when it does come time to refactor, it's clear what you were thinking when you wrote it, making it easier to refactor it into what your current thinking is now.

    In some sense, this reads to me as a form of prototyping. To try out and test design/architecture to see if it fits the problem space at hand. But it also incorporates the willingness to spend extra time in the future to change the code to better reflect the current understanding of the problem at hand.

    ... if we failed to make our program align with what we then understood to be the proper way to think about our financial objects, then we were gonna continually stumble over that disagreement and that would slow us down which was like paying interest on a loan.

    The misalignment of the design/architecture and the problem domain creates a bottleneck, slowing down future development.

    So I think it's clearly not about taking shortcuts for a short-term business gain.

    It is more a constant reinvestment in the future. It may temporary halt feature work, but it should result in more functionality and features in the long run. It doesn't seem short-term focussed at all to me. And you need to write 'clean' code and do your best because it is likely that you will have to rewrite parts of it.

    These two articles by Ron Jeffries already discuss this in great detail.

    A logical error

    Reading up on the topic, I noticed something very peculiar. Somehow along the way, everything that hinders software development has become 'technical debt'.

    Anything that creates a bottleneck, is suddenly put into the basket of technical debt. I started to get a strong sense that a lot of people are somehow making a logical fallacy.

    If you have technical debt, you'll experience friction when trying to ignore it and just plow ahead. The technical debt creates a bottleneck.

    But then people reason the wrong way around: I notice a bottleneck in my software development process, so we have 'technical debt'.

    However, because technical debt creates a bottleneck, it doesn't follow that every bottleneck is thus technical debt.

    I think it's this flawed reasoning that turns every perceived obstacle into technical debt2.

    Maybe I'm creating a straw man argument, but I think I have some examples that show that people are thinking the wrong way around.

    If we look at the wikipedia page about technical debt, there is a long list of possible causes of technical debt.

    To site some examples:

    • Insufficient up-front definition
    • Lack of clear requirements before the start of development
    • Lack of documentation
    • Lack of a test suite
    • Lack of collaboration / knowledge sharing
    • Lack of knowledge/skills resulting in bad or suboptimal code
    • Poor technical leadership
    • Last minute specification changes

    Notice that these issues are called 'technical debt' because they can have a similar outcome as technical debt. They can create a bottleneck.

    But why the hell would we call these issues technical debt?

    These issues are self-explanatory. Calling them technical debt not only seems inappropriate, it just obfuscates the cause of these problems and it doesn't provide any new insight. Even in conversations with laypeople.

    A mess is not a Technical Debt

    A blogpost by Uncle Bob with the same title3 also hits on this issue that a lot of issues are incorrectly labeled as 'technical debt'.

    Unfortunately there is another situation that is sometimes called “technical debt” but that is neither reasoned nor wise. A mess.


    A mess is not a technical debt. A mess is just a mess. Technical debt decisions are made based on real project constraints. They are risky, but they can be beneficial. The decision to make a mess is never rational, is always based on laziness and unprofessionalism, and has no chance of paying of in the future. A mess is always a loss.

    Cunningham's definition of technical debt shows that it's a very conscious and deliberate process. Creating a mess isn't. It's totally inappropriate to call that technical debt. It's just a mess.

    I think that nicely relates back to that earlier list from wikipedia. Just call things out for what they actually are.

    Is quibbling over 'technical debt' as a metaphor missing the point?

    In this blogpost, Martin Fowler addresses the blogpost by Uncle Bob and argues that technical debt as a metaphor is (still) very valuable when communicating with non-technical people.

    He even introduces a quadrant:

    Deliberate"We don't have time for design""We must ship now and deal with consequences (later)"
    inadvertent"What's Layering?""Now we know how we should have done it"

    This quadrant makes me extremely suspicious. Because in this quadrant, everything is technical debt. He just invents different flavours of technical debt. It's never not technical debt. It's technical debt all the way down.

    It seems to me that Martin Fowler twists the metaphor of technical debt into something that can never be falsified, like psychoanalysis.

    It's not 'bad code', a 'design flaw' or 'a mess', it's 'inadvertent & reckless technical debt'. What is really more descriptive of the problem?

    Maybe it's just my lack of understanding, but I fail to see why it is in any way helpful to call every kind of bottleneck 'technical debt'. I again fail to see how this conveys any meaning.

    In the end, what Fowler does is just pointing out that bottlenecks in software development can be due to the four stages of competence.

    Concious"We don't have time for design""We must ship now and deal with consequences (later)"
    Unconscious"What's Layering?""Now we know how we should have done it"

    I don't think we need new metaphors for things we (even laypeople) already understand.

    Does technical debt (even) exists?

    The HFT Guy goes as far as to argue that technical debt doesn't really exists, it isn't a 'real' concept.

    After decades of software engineering, I came to the professional conclusion that technical debt doesn’t exist.

    His argument boils down to the idea that what people call technical debt is actually mostly maintenance.

    So reincorporating a better understanding of the problem at hand into the code (design) is seen as an integral and natural part of software development, illustrated by the substitute metaphor of mining (alternating between digging and reinforcing). At least that's how I understand it.

    Substituting one metaphor with another, how useful is that really? But in this case it's at least less generic and more precise.

    Closing words

    Although Cunningham meant well, I think the metaphor of technical debt started to take on a life of its own. To a point where code that doesn't conform to some Platonic ideal is called technical debt4.

    Every mistake, every changing requirement, every tradeoff that becomes a bottleneck within the development process is labeled 'technical debt'. I don't think that this is constructive.

    I think my friend was right: the concept of technical debt has become bullshit. It doesn't convey any better insight or meaning. On the contrary, it seems to obfuscate the true cause of a bottleneck.

    At this point, when people talk about technical debt, I would be very sceptical and would want more details. Technical debt doesn't actually explain why we are where we are. It has become a hollow, hand-wavy 'explanation'.

    With all due respect to Cunningham, because the concept is so widely misunderstood and abused, it may be better to retire it.

    1. I discovered this image in this blogpost

    2. if you are not working on a new feature, you are working on technical debt. 

    3. I think that Uncle Bob's definition of technical debt in this article is not correct. He also defines it basically as cutting corners for short-term gain. 

    4. See again Martin Fowlers article about technical debt. 

    Tagged as : None

Page 1 / 1