4 Comments
Mar 10Liked by Eric Roby

first_name and last_name are bad variable naming. First name in one language may have a different meaning in another language, e.g. in French the family name is written first (usually in all capital letters). So a better variable naming would be: given_name and family_name, to make clear what is what.

Good naming of variables and function are important for readable source code. To help me find the right name I often use synonym dictionaries to get ideas for better naming. My favorite online synonym dictionary is WordHippo.

Another aspect of naming is using opposite words for related start-stop functions: Open / Close, Start / Stop, Begin / End, Acquire / Release, Enter / Exit

Expand full comment

in Spanish given_name can be: the first name or the first name + the middle name or even the full name. And family_name can be the first last name or every last name (yes we usually have more than one last name). So... my point is that it all depends on the coding language... If your language is English, both cases are correct! There is no confusion at all!

Expand full comment
Mar 7Liked by Eric Roby

This is a great write-up Eric! Naming is an important code-quality metric that should deserve more attention.

In my ideal world, I always name variables based on what they hold. So for example of I’m always selecting Wednesdays, I’d do this:

wednesday = week[2]

Expand full comment

This is really superb Eric thanks for sharing

Expand full comment