Det är något magiskt med att lösa en bugg klockan 3 på natten