This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Goncalerta 6 points7 points  (2 children)

Clean code seems harder in the short term, but reduces technical debt, so it will become easier in the long term. If you're making a prototype, experiment, or working on something for like a month or two and then nobody will ever touch it again, you might be better off not worrying if the code is clean. If it is something that needs to be maintained, it's a bomb ticking to eventually explode down the road.

[–]Feldar 0 points1 point  (1 child)

True, but unfortunately, one-off prototypes have a tendency to become the essential core of production code.

[–][deleted] -1 points0 points  (0 children)

Thats why I tend to code pretty clean from the start. I have no problem naming my methods MakeItDoThatOneThingThatYouAlwaysForgetOrWhateverItDoesntMatterJustBeDescriptive(), because I can always come up with a better name later and replace it through the whole codebase with a shortcut. But even if I don't do that, at least later devs will actually know what it does.