Actually i am reading the Clean Code book of Robert C. Martin , and i find that the section on the namings is quite helpful , i will talk here about the part PICK ONE WORD FOR ABSTRACT CONCEPT
A - CHOOSE AN ABSTRACT CONCEPT
for example the fact to retrieve or to get something from a place A to a place B , we do not have a universal word for it
it is fine Bob will take the word retrieve where Mary will go for get , Fine the problem is in another part
B - STICK WITH THE WORD THAT YOU CHOOSE
here is the fight , we go through a big source code and we find that for a same thing we have differents words . how painful is for us to represent that code base in our mind.
i will finish with what the book says about this.
Likewise, itβs confusing to have a controller and a manager and a driver in the same code base. What is the essential difference between a DeviceManager and a Protocol-
Controller? Why are both not controllers or both not managers? Are they both Drivers really? The name leads you to expect two objects that have very different type as well as
having different classes.
It helps future readers to gain deep understanding and do not forget that the internal quality of our code is our identity as a developer
have a nice day
Top comments (0)