<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18828">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; PADDING-LEFT: 5px; PADDING-RIGHT: 0px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="FONT: 10pt arial; BACKGROUND: #e4e4e4; font-color: black"><B>From:</B>
<A title=joe@eireneh.com href="mailto:joe@eireneh.com">Joe Walker</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=jsword-devel@crosswire.org
href="mailto:jsword-devel@crosswire.org">J-Sword Developers Mailing List</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, October 27, 2009 5:44
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [jsword-devel] coding
conventions</DIV>
<DIV><BR></DIV><BR>
<DIV class=gmail_quote>On Tue, Oct 27, 2009 at 1:09 PM, DM Smith <SPAN
dir=ltr><<A
href="mailto:dmsmith@crosswire.org">dmsmith@crosswire.org</A>></SPAN>
wrote:<BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV class=im><BR>On Oct 27, 2009, at 8:32 AM, Manfred Bergmann
wrote:<BR><BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>Hi have a question about conventions.<BR><BR>Java coding
guideline is to have the brackets not in a new line.<BR>I've seen both in
JSword but is it to have new line?<BR></BLOCKQUOTE><BR></DIV>The JSword
guideline is to have every { and } on a new line. This pre-existed my
involvement.<BR></BLOCKQUOTE>
<DIV><BR>It's my fault.<BR>My original thought was that { and } on new lines
was more readable and that the more compact version only made sense when we
were restricted to 80x24. I'm now of the opinion that the above might be true,
however uniformity is more important, so I'd now do that the more standard
way.</DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV><FONT size=2
face=Arial></FONT></DIV>
<DIV class=gmail_quote>
<DIV>
<DIV><FONT size=2 face=Arial>I also found the { } in new lines better
readable in the past.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Now however my sight about this has changed.
Brackets in new line pull too much the attention and distract too much from
the code which actually is the more inportant
thing.</FONT><BR> </DIV></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV class=im>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>Why are the instance variables declarations at the
bottom?<BR></BLOCKQUOTE><BR></DIV>This is another JSword style that was
before I came to the project.<BR>The reasoning is that instance variables
are typically private and as such are not something that should be "up
front", but rather buried as an implementation detail.<BR>Class constants
should be at the top.<BR><BR>The general pattern is that constructors should
be first, then public methods and classes, protected and package protected
methods and classes and finally private methods and classes.<BR></BLOCKQUOTE>
<DIV><BR>This is my fault too, and as DM, does, I think I'd defend the
practice for the same reasons.</DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>I see.</FONT></DIV>
<DIV><FONT size=2 face=Arial>This is a little against the top-down narative
pattern.</FONT></DIV>
<DIV><FONT size=2 face=Arial>But anyway.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Thanks fro your explanations.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Manfred</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT><FONT size=2 face=Arial></FONT><FONT
size=2 face=Arial></FONT><FONT size=2
face=Arial></FONT><BR> </DIV></DIV></BLOCKQUOTE></BODY></HTML>