Quote:
Ok, so maybe not quite a newb, but you haven't even finished college yet. I'm not trying to put you down, but you still have a lot to learn.
Not that some of that isn't true, but seeing as how it doesn't look like you know the guy, I'm not sure why you would make such a statement. For example, I'm 14, and therefore obviously not in college, but for all you know I'm more skilled than most CS graduates.
Quote:
That is respectable, but using well-named symbols is not sufficient except in trivial code. Again, how can code with well-named symbols possibly describe its purpose, its architecture, its limitations, and its assumptions?
It can't. And that's when you should comment. Like I said before, having to comment what a piece of code does (as apposed to why it does it) is usually a sign of
Code Smell.
Quote:
//if the string line can't equal the file being read in the file isn't a proper format or doesn't exist
try
{
lineRead = ToRead.readLine ();
}
catch (Exception e)
{
System.err.println ("The first command line argument is incorrect please try a new argument");
System.exit (0);
}
Not to burst your bubble or anything, but this comment could definitely be better. Infact, it's explaining what the code does, which is a big no-no.
Quote:
//encoding lineRead so that it can be printed out
linePrint = encode (lineRead, shift);
ToPrint.println (linePrint);
This is an unnecessary comment. It's already obvious that the following line 'encodes' 'lineRead.' However, renaming 'shift' to something more meaningful is probably a good idea.
[Edited by - bytecoder on August 18, 2004 6:11:24 PM]