Netbeans code style

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 :slight_smile:

dhis-code-style-nb.zip (2.79 KB)

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 :wink:

···

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@gmail.com

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 :slight_smile:


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Saptarshi

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 :wink:

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 :slight_smile:

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

···

2010/1/10 Saptarshi Purkayastha sunbiz@gmail.com


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@gmail.com

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 :slight_smile:


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Saptarshi,

How are you doing?
Please can you point me to the location of the new mobile web module (the one from our last discussion with Murod)?

Thanks

Cheers,
Ime

hei all,

Interested to hear more info. from you about this :slight_smile:

···

On Mon, Jan 11, 2010 at 5:51 AM, Ime Asangansi asangansi@yahoo.com wrote:

Hi Saptarshi,

How are you doing?

Please can you point me to the location of the new mobile web module (the one from our last discussion with Murod)?

Thanks

Cheers,

Ime


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Best regards,
Kim Anh Vo

+84.906612246
kavo@ifi.uio.no
Coordinator of HISP(hisp.info) in Vietnam

Master of Information Systems
at the University of Oslo

join facebook at www.facebook.com join LinkedIn at www.linkedin.com