When I started at my company I was full of energy and wanted to improve the whole codebase. After years of getting blocked by new projects with deadlines month short of the actual time required and missing a lot or all important bits (texts, images. you name it, it's missing) I kind of have up.

I do refractoring now and then but it's not as extensive.

My biggest sin was a nested for-loop that I came across (50+ times nested, previous dev really loved c+p).
I looked at it and started to write the recursive function but stopped half way through, fixed that one error I'm the loop somewhere around 30 levels down, committed and made myself a coffee.

I hate myself to this day for giving up.
Shit I'll just factor that loop tomorrow

  • 1
    Let us know how it goes!
  • 1
    Some fights can't be won. Some cultures can't be changed. I'm there too.

    Wish it could be better but changing something which is not good but is functioning is nearly impossible.
  • 2
    @eoin I kind of won that fight. New code gets implemented with best practise and psr. Old code gets reworked bit by bit.

    Never stop fighting for a better code base.

    Today I made that nested hell recursive. Instead of 300 loc it's now a neat 30.

    It was a long fight (nearly 3 years now) but the team is now on board and the boss is cool with investing more time to get a future oriented code base
Add Comment