On Wed, Mar 14, 2012 at 10:27 AM, sebb <[email protected]> wrote: > On 14 March 2012 14:00, Gary Gregory <[email protected]> wrote: > > On Wed, Mar 14, 2012 at 9:33 AM, sebb <[email protected]> wrote: > > > >> I noticed that some of the CSV methods uses "int l" (ell). > >> This is unfortunately very similar to 1 (one) in many fonts. > >> > >> ExtendedBufferedReader.read(...) and UnicodeUnescapeReader.read(...) > >> both do this. > >> > >> Now that would perhaps be a good candidate for a CheckStyle report ?! > >> > > > > You cannot compile a variable name that starts with a number, so that's > not > > an issue (unless you do not know this.) > > > > IMO, the rule should be that you should not start a local var or param > name > > with a upper case letter. > > > > Unfortunately, highlighting upper-i vs lower-L might be interesting for > one > > letter names but the problem still exists for normal names. Did I write > > "normal" with a lower-L or an upper-i? This might get siLLy quick! > > I see I did not provide enough context. > The problem is not the variable declaration, but the variable usage. > > If one cannot easily distinguish l (ell) and 1 (one) then it makes it > very hard to follow the code, and easy for mistakes to creep in. > In the Eclipse editor (which uses Courier by default) the two have > identical glyphs (?) as far as I can tell. >
Right, that makes sense. I don't use Courier in Eclipse. Even in non-Courier upper-i and lower-L is a problem. A checkstyle would help then. Gary > > > Gary > > > > Gary > > > >> > >> P.S. the subject has 1 (one) then l (ell) then I (upper-case i) in > >> case you cannot tell. > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [email protected] > >> For additional commands, e-mail: [email protected] > >> > >> > > > > > > -- > > E-Mail: [email protected] | [email protected] > > JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0 > > Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK > > Blog: http://garygregory.wordpress.com > > Home: http://garygregory.com/ > > Tweet! http://twitter.com/GaryGregory > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- E-Mail: [email protected] | [email protected] JUnit in Action, 2nd Ed: <http://goog_1249600977>http://bit.ly/ECvg0 Spring Batch in Action: <http://s.apache.org/HOq>http://bit.ly/bqpbCK Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory
