Builders and Manipulators

Here is a simple principle for naming methods in OOP, which I'm trying to follow in my code: it's a verb if it manipulates, it's a noun if it builds. That's it. Nothing in between. Methods like saveFile() or getTitle() don't fit and must be renamed and refactored. Moreover, methods that "manipulate" must always return void, for example print() or save(). Let me explain.

[image error]The Night Of (2016) by Richard Price et al.

First, I have to say that this idea is very simil...

 •  0 comments  •  flag
Share on Twitter
Published on August 21, 2018 17:00
No comments have been added yet.