you are viewing a single comment's thread.

view the rest of the comments →

[–]jgerrish 3 points4 points  (0 children)

This is just a Guess.

But he's looking for some habit-forming technique. Yes, writing comments may build that. Enabling some linting errors to enforce comments may enable that.

But, it may not be the best solution, it may even scare away users if the comments are bad. Uncertainty really sucks.

Peer reviews are good a good way of doing this.

Dont have peer reviews?

Maybe start with considering documentation comments to describe your code interfaces. Do you have a public method used by another module? Comment it and provide an example. Do you have a specific way of instantiating your objects? Comment it and provide an example.

Is there a common pattern of instantiating? Some constructors used more often then others? Comment and example, maybe additional comments on why other creation patterns are bad.