Hacker News new | ask | show | jobs
by tpoacher 1618 days ago
btw! I forgot the best part!

How does technical debt fit into the whole PV=nRT framework.

The story goes like this. "We have n tasks. Unit tests are an extra task. We don't have time for n+1 tasks"

In reality, technical debt is not an additive, it's a modifier. It applies a modifier a to the current task, and a modifier b to all related tasks after it.

So it's more like having E[n] = 1 * a + (n-1) * b, where a > 1, and 0 < b < 1

E.g. if writing a unit test makes your task double, but your remaining tasks now take half the time, then you didn't really make n into n+1 with unit tests, you made n become 2 + (n-2)/2

So, for the above (admittedly unrealistic) modifiers, if you have 8 projects to do, and you're thinking should I do unit tests

In your mind you may be thinking, fukit, I can't afford to do 16 tasks instead of 8 (i.e. 8 tasks plus 8 unit tests)

But because geometric processes are so hard to reason with, it's hard to see the benefit, but the benefit is massive!

octave:16> f = @(n) 2 * n;

octave:17> g = @(n) 4 - 2 .^ (2-n);

octave:18> [ f(1:8); g(1:8) ]

ans = 2.0000 4.0000 6.0000 8.0000 10.0000 12.0000 14.0000 16.0000

    2.0000    3.0000    3.5000    3.7500    3.8750    3.9375    3.9688    3.9844
Not only is it not 16, but actually it will save you so much time, that you'll spend even less than the original 8 time units!

(assuming related tasks and compounding effect paid from technical debt)