Saturday, December 21, 2013

On Giving Intention Revealing Names

As I see and reviewing more code (Written by an amateur programmer to very senior developer) I noticed why they cannot come up with good names even though they are willing to do so and be able to spend little time and effort too.

They are two things:

1. They are not well-versed with the domain terms and vocabulary. They spend very little time on understanding it. They very soon bring the technical jargon in to their mind and starts thinking in implementing with it. In the initial phase of the project where the business requirements are discussed, they spend very less time in those discussions and starts thinking about tools and technologies can be used.

They eventually jump into the development and use the names of whatever at the time they know. Latter even if they become aware of the full business domain terms they don't really dare to touch the code and change the names. Then they forget it or ignore it and come under schedule pressure to add more code.

2. In some countries (e.g. India), English is taught as second or third language. Even somebody study in full English-medium still it is seldom used in day-to-day conversation and communication. They study it just for passing the exams. The problem is again with the strong vocabulary hence it becomes very hard to come up with good names very fast or immediately while they are programming.

They don't spend time in thinking for good, short, straight-forward, condensed names and they use whatever words they know and abbreviate the names by prefixing and suffixing with numbers, or omitting vowel (e.g. for customer to cstmr).  They make lot of spelling mistakes also.

No comments:

Post a Comment