DEV Community

Discussion on: Why Good Code Needs Comments

Collapse
 
sebbdk profile image
Sebastian Vargr

A bit, I’ve had to add unit tests to enforce not changing certain Functions return values before.

Not all environments are unit test viable, I could see my self adding warning comments if that was the case. :)

That being said, changing the return type of something Is generally very bad, so my hope is that it would be caught in code review first.

Thread Thread
 
mxldevs profile image
MxL Devs

Most of the tools I have rely on third party services/data formats, some of which are not designed with the end-user in mind (eg: proprietary formats, internal API's, etc) so I think the issues I'm running into are mostly because I'm doing things people shouldn't be doing lol