Word order for names

by Fran Sevillano   Last Updated August 13, 2019 10:05 AM - source

I'm working with a team of non-native English speakers and I'm struggling to come up with a rule that explains why a method should be called getFilePath and not getPathFile.

Examples of this bad naming come up on a daily basis and except for just pointing out the better name, I cannot figure out a good way to explain why words should be in a specific order, except for "It how it's written in English". Especially for variable names like this one since none of its components are adjectives.

I realize this is very basic and probably second nature to everyone here, but I think that's why I'm struggling to figure out how to explain it to people who doesn't understand it.

How would you explain it?



Answers 1


I cannot figure out a good way to explain why words should be in a specific order, except for "It how it's written in English"

That's because it is the only reason for writing it this way.

There is a naive view that there is a consensus that all programming should be done in american English. But this isn't really the case, let the developers choose names that they understand. Add intellisense comments for alternate languages

Ewan
Ewan
August 13, 2019 09:46 AM

Related Questions


Using "On" at the start of a method name

Updated November 13, 2018 16:05 PM

Human names in programming examples

Updated April 20, 2015 22:02 PM


Should I avoid using spaces in my filenames?

Updated August 18, 2017 20:05 PM