Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NX:Java Convention Style- Comments

 
Maria Lepschy
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,
It is necessary to have a header comment(before the package)?
/*
* header comment
*
*/
package �...
import ...
/**
* Class description
*/
class..
Please write some examples, I have no idea what I can write as header comment.
Regards,
Maria
 
Min Huang
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers,
It is necessary to have a header comment(before the package)?
/*
* header comment
*
*/
package �...
import ...
/**
* Class description
*/
class..
Please write some examples, I have no idea what I can write as header comment.
Regards,
Maria

On the Java Coding Conventions page, it is specified that you have a header (? whatever its called?) comment that looks like this:

Basically just your class name with the java extension, the version number of the class, and the last date it was modified.
Below that you should have copyright information, but I think that can be ignored in this exam.
I don't know why its required, as it doesn't present very useful information, but it's better safe than sorry to follow the coding conventions.
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Min
Originally posted by Min Huang:

Basically just your class name with the java extension, the version number of the class, and the last date it was modified.
Below that you should have copyright information, but I think that can be ignored in this exam.
I don't know why its required, as it doesn't present very useful information, but it's better safe than sorry to follow the coding conventions.

I think writing the header comment is good. Also I think it is better way of including copyright information for each class though its same for all classes. The reason is each and every person will do his own work and it will be different in some way or other atleast in some parts of project and its our very own hard worked code. So I think copyright information looks good on top of each class
 
Min Huang
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, now that you bring it up, I never read the fine print, but who owns the code I write for this exam?
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Min Huang:
who owns the code I write for this exam?

Obviously 100% the individual who submitted.
[ April 14, 2004: Message edited by: Satish Avadhanam ]
 
Maria Lepschy
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I think Sun owns the code.

It is ok to have something like this text?
///////////////////////////////////////////////////////////////////////////
//Copyrights Sun Certified Developer for Java 2 Exam, created in Germany, 2004
//
//The copyrights in this work are vested for the exam to Sun Certified Developer for Java 2
//and the information contained herein is confidential. The work, either in
//whole or in part, must not be reproduced or disclosed to others or
//used for purposes other than that for which it is supplied, without
//Sun's prior written permission. All rights reserved.
///////////////////////////////////////////////////////////////////////////
Regards,
Maria
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Maria, here's what I want to write:

/* XXX.java 1.0 date
* Copyright (c) 2004 - 2008 Satish Avadhanam
*
* This software is the confidential and proprietary information
* of firstName lastName. You shall not disclose such confidential
* information and shall use it only in accordance with the
* written permission from author.
*/
 
Min Huang
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that in Sun's NDA I am not allowed to disclose any information about the exam to any other individuals for 5 years after I take the test, but it makes no mention of the ownership of the code.
What copyright statement, if any at all, should be placed in my java files then?
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Min, I am thinking of using something like this:

/*
* @ XXX.java version 1.0 Date
*
* Copyright (c) 2004 - 2008 Satish Avadhanam
*
* This software is the confidential and proprietary information of
* Satish Avadhanam. You shall not disclose such confidential information
* and shall use it only in accordance with the written permission from
* author.
*/
 
Maria Lepschy
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Satish,
It's looks very good, I think.
Thank you, I would also write in this way.
Regards,
Maria
 
Baruch Sadogursky
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, guys, you are seriously concerned about the copyright issue, as I see
It seems so meaningless to me
What do you afraid of? That Sun will steal your priceless code? I doubt they need it. And if they will, how you will know? And if you will found out, what you gonna do? Sue them? You, small and lonely SCJD (I bet you'll pass), against the mighty law machine? The one, which kicked BG's ass? Come on, don't you have more serious issues to solve in the assignment?
P.S. The post above is totally copylefted by me
P.S.S. It doesn't intend to insult. I am respectful for everybody�s work, I just don't think the magic word will make it more protected. Sorry if I made someone angry
 
Satish Avadhanam
Ranch Hand
Posts: 697
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Baruch Sadogursky:
Wow, guys, you are seriously concerned about the copyright issue, as I see
It seems so meaningless to me

Me too

Come on, don't you have more serious issues to solve in the assignment?

No

P.S. The post above is totally copylefted by me
P.S.S. It doesn't intend to insult. I am respectful for everybody�s work, I just don't think the magic word will make it more protected. Sorry if I made someone angry

Just Kidding....take it easy
 
Baruch Sadogursky
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satish, if you don't mind about the copyright issues, send me your assignment, I want to check, that you really don't have more serious issues to take care of
 
Min Huang
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what if 5 years down the line, after my NDA expires, i want to show people my SCJD code to show them how cool i am? hmmm? if Sun owns the code, i wouldn't be able to do that!
 
Baruch Sadogursky
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "won't be able to show it"? Sun will sue you if you'll show the code you wrote to someone? Come on, you taking the whole thing way too far. My SCJD project is my, pretty worthless (as a product) code! Once I will pass - I'll do with it whatever I want, if I'll find what to do with it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic