DEV Community

Discussion on: How To Optimize for Change

Collapse
 
miso profile image
Michael

Thank you for this post!
Especially "Catch Errors early"! It would be perfect with unit and integration tests!
But I don't like your oversimplified example of the "doStuff" method.
It looks a trend in using more immutable values or even objects. I don't know if it's a problem of understanding the mechanism behind reference and value types.
But the biggest problem here is the naming, yes it's an example, but it's a bad one.
Semantic naming is everything! And that's a problem for a lot of developers!
If the name of the "doStuff" method would be "editStepDescription" or anything like that, every developer would see, oh my input is getting changed.