Linked by MOS6510 on Wed 17th Apr 2013 21:20 UTC
General Development "You often hear about how important it is to write 'readable code'. Developers have pretty strong opinions about what makes code more readable. The more senior the developer, the stronger the opinion. But, have you ever stopped to think about what really makes code readable?"
Thread beginning with comment 559025
To read all comments associated with this story, please click here.
Comment by TempleOS
by TempleOS on Thu 18th Apr 2013 10:35 UTC
TempleOS
Member since:
2013-04-03

I like Native American English. i.e. "Me get Fire" I think it's a no brainer to say "NumCoins" not "NumOfCoins". "Coins" is best. I'd use "i".

I'm always brief. I'd have to be in a strange mood to use "NumSomething". It's redundant. Actually, I use it when I make an enumeration -- The count of enumerated entries, I call "NUM".

//Partition Types
#define PT_NULL 0
#define PT_FAT32 1
#define PT_NTFS 2
#define PT_NATIVE 3
#define PT_NUM_PARTITION_TYPES 3


Yawn

Reply Score: 1

RE: Comment by TempleOS
by ilovebeer on Thu 18th Apr 2013 14:55 in reply to "Comment by TempleOS"
ilovebeer Member since:
2011-08-08

I like Native American English. i.e. "Me get Fire" I think it's a no brainer to say "NumCoins" not "NumOfCoins". "Coins" is best. I'd use "i".

+1 for common sense. If a person needs "NumOfCoins" over "NumCoins" or "Coins", labels are probably the least of his/her coding hurdles to overcome.

n sure some of you will wet your undies when I say this but instead of expecting code to be written so a 5 year old can understand it, perhaps more should be expected out of "coders" abilities to comprehend. I've never known a good coder to be tripped up (although annoyed maybe) by `poor` labeling.

Reply Parent Score: 2