← Back to team overview

dhis2-devs team mailing list archive

Re: Netbeans code style

 

Hi Saptarshi

2010/1/10 Saptarshi Purkayastha <sunbiz@xxxxxxxxx>

> Thanks so much Bob... Effort much appreciated
>
> I never did it because I didnt quite believe in the code style... Don't
> believe in more LOC, and too much whitespace ;-)
>

Agreed to a certain extent.  Mind you I am a true believer in braces being
aligned - rather than the the more common Java one up-one down style.  I
suspect that style is a result of MOP (Money Oriented Programming) where the
style is mostly suited for print media - lots of Java books in the early
days driving the style rather than readability within an electronic editing
environment :-)

But mostly I just want to be able to as easily as possible write code that
looks like the existing code.  In the end that's the art.  Believing in,
disbelieving or changing the code style is important but different.

BTW I'm very much enjoying netbeans 6.8.  The maven integration is really
seamless.  Two drawbacks I have found in terms of DHIS are (i) lack of
bazaar support and (ii) lack of per-project editor style settings.  Both are
irritants which I can just about live with.

Cheers
Bob


> ---
> Regards,
> Saptarshi PURKAYASTHA
> Director R & D, HISP India
> Health Information Systems Programme
>
> My Tech Blog:  http://sunnytalkstech.blogspot.com
> You Live by CHOICE, Not by CHANCE
>
>
> 2010/1/10 Bob Jolliffe <bobjolliffe@xxxxxxxxx>
>
>> Greetings
>>
>> I have been using netbeans (6.8) pretty consistently for the last two
>> months now and I am pretty much sold.  I find it generally more intuitive
>> than eclipse (which I admit might be a reflection of my warped mind but so
>> be it).  But whereas I am generally as happy as a pig in faeces with
>> netbeans, I am also painfully aware of the importance of consistent code
>> style in a project like ours.  And I also think that its the editor's job to
>> do code style - not the author's.
>>
>> Anyway, eclipse users can, and I hope do, make use of the code-style
>> config at
>> http://dhis2.org/sites/default/files/resources/dhis-code-style-eclipse.xml.
>> Problem is the default settings in netbeans are quite a long way from
>> these.  So all the code I write jars horribly with the existing code base.
>> When others do this I call this unfair and ignorant behaviour.  So for what
>> its worth I've finally taken the plunge and been tweaking my netbeans editor
>> settings to try and mirror the dhis-style-eclipse as much as possible,  It's
>> not perfect but seems to be very close.  I've attached it here for anyone
>> out there using netbeans to test.  Saptarshi?  Thats a veiled reference to
>> at least you :-).
>>
>> Then I'll put it up on the dhis2.org site as a netbeans developer
>> resource.
>>
>> Cheers
>> Bob
>>
>> PS. Instructions:
>> Go to Tools->Options
>> Export your existing editor settings to be safe.
>> Import the attached file.
>> Netbeans seems not as smart as eclipse regarding per-project formatting
>> profiles so backing up settings is probably important.
>>
>> PPS.
>> Please don't use this mail to start a netbeans vs eclipse war :-)
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs<https://launchpad.net/%7Edhis2-devs>
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

References