Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 15 Dec 2012 06:14:21 -0600 From: "Chris Uppal" Newsgroups: comp.lang.java.programmer References: <7f36342c-2331-4484-874b-4a0f8953f160@googlegroups.com> <50cbf02e$0$295$14726298@news.sunsite.dk> Subject: Re: multi-line Strings Date: Sat, 15 Dec 2012 12:06:22 -0000 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-RFC2646: Format=Flowed; Response Message-ID: Lines: 27 X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-jXzk6de2SxcF3rFI3mk0W4HOXw1BrvChU1xKrDzd1otSa503MAGqP83bVnfZs/YN0/Ljsdqg6wogF/T!VnzPLZY782Ycin+EoOaqSnk9RFnZEYr0DAXmTwd2ATosR07Ez0ZdjBbYYsxmDyAt53WHaKg30q99 X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2492 Xref: csiph.com comp.lang.java.programmer:20355 Arne Vajhøj wrote: > Does the same literal occur more than once where it must be the > same value? > > Would the code be more readable by using a descriptive name > instead of a literal. This is all sound and very sensible. But... I'm amused to note that these conditions also apply to identifiers used in the code too. Say I have a class name MyClass, and methods MyClass.myMethod(). It is obviously possible for the name "MyClass" to change, similarly for methods (in fact -- for me -- class and method name changes are the rule rather than the exception). So, in the spirit of this discussion, shouldn't I put the class and method names into a config file somewhere (or "meta-config") file, and only refer to the class and method via some sort of access to the config data. something = new (); something.(true); ;-) -- chris