DEV Community

Discussion on: Good code

Collapse
 
fpuffer profile image
Frank Puffer

In most cases this is true but there is at least one exception:

Not all code needs to be maintained. There is code whose purpose is fulfilled after being run once, like certain scripting, prototyping or data analysis stuff. Here the most cost effective code will probably not be good code.

Collapse
 
samuraiseoul profile image
Sophie The Lionhart

Yeah but in my experience, if you don't code like all code will need to be maintained, then you'll just be in pain later.

There have been more than a few times when I wrote a silly one off script, that then like 2 months later I needed again, but knew I would need to tweak it slightly, and had no idea what was happening because it go written poorly. Its not like writing it well takes THAT much longer either.