Hi Paul,
>
>    1. Avoid using inline conditionals  x ? y : z
>
whats wrong with inline conditional statements? .. regards ede

> Paul
>
> Sunburned Surveyor wrote:
>> I'm thinking about the preparation of a short document with code style
>> tips for Java FOSS programming.
>>
>> There is the concise way to code something, and then there is the way
>> to code something in a manner that will
>> makes it more understandable for the guy that has to come behind you.
>>
>> I think this is probably more important in FOSS programming than it is
>> in "normal" or proprietary programming.
>>
>> I'm not talking about where you put the curly braces or other stuff like 
>> that.
>>
>> I'm talking about things like using the "this" keyword when
>> appropriate, avoiding long method call chains in the argument list of
>> a method call, and avoiding complicated groups of statements with no
>> comments indicating the purpose or desired result.
>>
>> I realize not everyone will agree that code should be written for
>> clarity at the cost of some conciseness. However, if you have some
>> style suggestions that I could consider and include in the sheet I
>> would welcome them. (I'm not looking for stuff that is in the existing
>> Java style books. I have those. :] I'm looking for suggestions that
>> deal with the type of clarity that becomes critical in open source
>> programming, especially when a the next maintainer or contributor
>> might not be a programming professional.)
>>
>> The Sunburned Surveyor
>>
>> -------------------------------------------------------------------------
>> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
>> Studies have shown that voting for your favorite open source project,
>> along with a healthy diet, reduces your potential for chronic lameness
>> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net 
>> <mailto:Jump-pilot-devel@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>   
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> ------------------------------------------------------------------------
>
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>   


-- 
public class WhoDidIt{ // A comment. I love comments 
  private static Person sender;

  public static void main (String[] foo){

  sender = new Person();
  sender.setName(new String[]{"Edgar", "Soldin"});

  Address address = new Address();
  address.setStreet("Stadtweg 119");
  address.setZip(39116);
  address.setCity("Magdeburg");
  address.setCountry("Germany");

  sender.setAddress(address);

  sender.setMobilePhone(" +49(0)171-2782880 ");
  sender.setWebSiteUrl(" http://www.soldin.de ");
  sender.setEmail(" [EMAIL PROTECTED] ");
  sender.setPGPPublicKey(" http://www.soldin.de/edgar_soldin.asc ");
  sender.setGender(true);

  System.out.println(sender.toString());
  }
}


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to