The Developers assignment seems to be touchy about spacing and having your comments all line up, etc.. I have noticed that when I develop an application on my Eclipse IDE everything looks good and properly formatted on my screen, but sometimes on another IDE or simple editor the formatting looks messed up, for example the comments no longer appear in a straight line, or a line runs past the 80 column mark. I have Eclipse set up so that tab inserts real spaces, 4 of them.
My concern is that when I submit the assignment to be marked, the formatting that looks good on my PC will look bad on the marker's PC.
Is there a particular font type and size that I need to be using to generate my codes?
Honesty IS the best policy, but occasionally reality throws an exception...
One reason things could be getting out of line is if you aren't using a fixed-width font (Courier, Monospace, etc.)
Different fonts won't affect the actual characters in the source code file. Just make sure you are using a fixed-width font and it will all fall back into line [ November 23, 2006: Message edited by: Harry Pearson ]
Joined: Mar 02, 2006
I checked the various editors at home and at work and you were correct, a few of them were using variable width fonts. I've now set everything up with the new courier font, 10 pitch, and I can now move source code between any two editors and everything keeps its place as it should.
I have some tips 1.tabulate with space not with tab. 2.Use a mono font - in this case each character (the space also) will have the same size. 3.Test you format with more than one editor - the best one is vi (for linux) or the old ms-dos edit.exe. If here is looking ok than is ok. 4.Use the 80 character line limit - take care this is now working with all the fonts, you can test it by typing 80 characters and changing the font.
Regards M [ November 25, 2006: Message edited by: Mihai Radulescu ]