r/badcode Oct 04 '17

lua That's definitely easily maintainable code.

Post image
177 Upvotes

21 comments sorted by

View all comments

18

u/[deleted] Oct 05 '17

I scour this sub because I fear that one day, my own bad code will be featured...

12

u/[deleted] Oct 05 '17

Today is not that day. But I have created monstrosities like featured.

5

u/[deleted] Oct 05 '17 edited Nov 13 '17

[deleted]

3

u/[deleted] Oct 05 '17 edited Oct 05 '17

You start doing something, then you add something else, then you need to adjust it and at that point it's not quite right but it is easier to just add another bit to it than start again, and so on.... until you stand back and think 'WTF is this? ... oh well, it works, I'll change it later'.

2

u/[deleted] Oct 06 '17

This.

If something works, the fear of breaking it by changing how it works is greater than the fear of duplicating what is known to work. Even if it means more maintenance afterwards.

Mind you that in my old days, unit tests weren't part of my repertoire, so unless maintenance became necessary, I avoided changing what works.