Journal wheany's Journal: My pet peeve(s)
One thing I hate is people using "optional" plurals in programs.
The reasoning must be in the lines of:
- I'm a lazy bastard and don't want to create two different strings and use something like 'if($num_items != 1) print("you have $num_items items") else print("you have 1 item")'.
- On the other hand, the user might have 0, 1 or several items.
- So if I only print "item", the string looks stupid when there are 0 or several items
- And if I only print "items", the string looks stupid when there is exactly 1 item
- I know, I'll print "item(s)" that way the string looks stupid every time!
Personally I recommend writing just the plural form. That way the string looks stupid only when there is exactly 1 item. It will look perfectly fine when there are 0, 0.5, 1.25, 100 or 7.12E20 items.
My pet peeve(s) More Login
My pet peeve(s)
Slashdot Top Deals