File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Cattle Drive and the fly likes Assignment 1.1 Nitpicking by JC Cook [b]SPACING[/b] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Assignment 1.1 Nitpicking by JC Cook [b]SPACING[/b]" Watch "Assignment 1.1 Nitpicking by JC Cook [b]SPACING[/b]" New topic
Author

Assignment 1.1 Nitpicking by JC Cook [b]SPACING[/b]

Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
First of all let me congratulate the "team of nitpickers" for responding so fast on my 1st attempt at assignment 1.1
I really triple checked my code for style before submitting it, I even printed it to see how it looked , still a totally unexpected nitpick popped up, Spacing for the following line of code:
j = j + 1; // the length of the name
I assume that it should have been
j = j + 1 ; // the length of the name
Based on 2.2 Spacing in the style guide the example:
int theTick = 5 ; // YES! Double click gets "TheTick"
I must say that I'm a bit confused by this nitpick.
Why not then complain about the spacing of this line of code:
int j = 0;
Please explain.
JdJ
ps. this is in no way meant as a criticism on the great work you or any other nitpicker is doing

[This message has been edited by Johannes de Jong (edited February 12, 2001).]
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
Posting this I learnt something new.
UBB code does not work in Topic header and one cant change it later.
Sorry all
[This message has been edited by Johannes de Jong (edited February 13, 2001).]
Daniel Olson
Ranch Hand

Joined: Jan 05, 2001
Posts: 81
I just turned in an assignment similar to this. I had
s = " " + s;
I guess it should have been
s = " " + s ;
By the way, wouldn't it be easier to write
j++ ;
rather than
j = j + 1 ;
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
Oops typo
j = j + 1; // the length of the name
Should have been :
j = j + i; // the length of the name
At least in my assigment it was correct
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
j = j + i; // the length of the name

The rule is spacing around all identifiers, including between the identifier 'i' and the punctuation.

int j = 0;

zero is not an identifier. Therefore the spacing rule does not apply here. Although an extra space may be added if desired, it is not required.

[This message has been edited by Marilyn deQueiroz (edited February 13, 2001).]


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
Gee I went back to my printout of the Style Guide
2.2 Spacing
Cleary states : All indentfiers are surrounded with whitespaces

Man what a start I'm making at the Cattle Drive
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Assignment 1.1 Nitpicking by JC Cook [b]SPACING[/b]