|
C M S C 2 1 4 C o m p u t e r S c i e n c e I I S p r i n g 2 0 0 3 |
Hardcoding is when someone puts cout statements in their code to print out portions of the sample output(s). For example in project #0 if someone had modified the main.cpp main function to have a print statement such as:
cout << "23456789012345678901234567890 is greater than 999999999999999999999999" << endl; // or cout << " 123" << endl; cout << " + 90" << endl; cout << " = 213" << endl;somewhere in their main program, that would be "hardcoding" an output. Why would this be done? This is something that any CMSC 106 student could do - and thus obviously not what is expected of a CMSC 214 student. The main (and perhaps only) reason someone would do this is to "fool" the submit and grading programs to "believe" that that portion of the submitted program works - this is what "hardcoding" is - and it should not be done. If you have further questions regarding this or any other Academic Integrity matter you should speak with your instructor during any of their posted advising hours.
Another small "tip for success" is to develop (write) your code one piece at a time and thoroughly test each piece as you write it. Amazingly the TA's are seeing students in office hours who spent hours writing all of the code and then didn't start testing it until after they had most of their code written - even the best programmers out there generally aren't that brave!
You should start with the most essential functions (typically the ctor's and dtor and a print function) and write those and then test them:
int main() {
HugeInt h1( 1 ), h2( 123 );
cout << h1 << " " << h2 << endl;
return 0;
}
and then write the next function and test it:
int main() {
HugeInt h1( 987654321 );
cout << h1.size() << endl; // size is a private helping function which
return 0; // was *temporarily* made public to test
}
and then write the next one (say the ++) and test it and then move on
from there - testing as you go. This style of writing/testing will
generally save you hours of headaches later on.
The original primary input and output tested a substantial portion of the functions (not extensively, but tested most of them none-the-less) and it made it so that almost 100% of the project had to be completed before you could submit. This has been changed and for details you should read the following file (which is in the posting account):
http://www.dc.umd.edu/~bt14001/Projects/P0/_README_PRIMARY_Note: if your program runs correctly on the new primary.input.light file it should be able to submit and you will get at least 50%. In order to get 100% on Project #0 you only have to pass the original primary (primary.input) and submit a working makefile and write your code according to the style guide. Be aware that if you are hoping to get 100% you must make absolutely certain your program works on the primary.input file (as the submit program will no longer check the primary.input file - it will only check the primary.input.light file).
When you come to see someone in office hours for help on your project, you should always bring a current printout of your code and if possible a printout of the compiler error messages (if there are any) and if it compiles a printout of the programs output (and the input used to generate that output). If you want to get the output of the compilers error messages you will need to redirect error output as follows:
% make >& my.comp.errorsand then the text file "my.comp.errors" will contain your compiler errors (note: if you changed your Unix shell the above may not work).
Having the requested information above will assist the instructional staff in being better able to assist you and others who are waiting to be assisted. Please also understand that the office hour room is a shared resource with other classes and we ask that you be respectful of the room and others using the room.
Another VERY IMPORTANT thing to do prior to going to office hours is attempt to "debug" your code as much as possible when you have a problem and that way when you see the TA you can point to the line (or lines) of code causing the problem (it should typically only be one line) and explain to them what the problem is and hopefully they will be able to figure out the problem (and a solution) and explain it to you so that you can determine how to fix it. When "debugging" code you can either attempt to use a debugger (see the tutorials in the posting account) or just use good old fashion debug cout (or cerr) statements:
cout << "GOT THIS FAR" << endl; // very important to use endl;
someFunctionCall();
cout << "DIDN'T GET THIS FAR" << endl;
and if you see the first line get printed but not the second one, then
the problem may lie somewhere in the function call. It is a straight
forward concept, however a number of students have come to office hours
without doing any debugging on their own (either with a debugger or
with cout's).
Do not modify the Node.h file - the one exception is that you are
allowed to add functions - nothing else - do not add any #include
statements or using statements to the Node.h header file - this may
lead to problems with compiling the HugeInt.cpp file.
Unfortunately we can not do this and you will have to start over
from the beginning. The system staff does keep backups in the case
of catastrophic loss, however it is not possible for us to obtain
individual recovery of recently created/deleted files.
The submit program is now up and running. Be certain to make a backup
copy of your files before attempting to submit and then test your
files prior to submitting. Note that the submit program may reject your
submission if it doesn't meet the MRC (minimum running criteria) - if
this occurs you should read the messages the submission program gives
you and then attempt to submit again (after fixing any possible problems
that may have come up). If you continue to encounter difficulty
submitting the project you should attempt to see someone during any of
the posted advising hours. Note: do not "hardcode" the output
of a program in order to make it successfully submit.
More "Tutorials" have been posted. Some online via the main class
webpage and others in the class posting accounts in the directory named
Tutorials and Tutorials/Misc - there is information on the make utility
and the tar command as well as a file about namespace issues. Files
posted in the class accounts may not always be available via the web
and unfortunately we are not able to provide them in any other means.
Please re-read the course syllabus regarding email policies.
Although it may not have been explicitly stated, DO NOT EMAIL
PROJECT QUESTIONS AS THEY WILL GO UNANSWERED - if you have a question you must
see someone in person during the posted advising hours - even if it is the
weekend or 2am in the morning - in which case you will need to remain
patient, work on other parts of the project, study other material, work on
other classes, or take a break. The course syllabus states that the email
addresses of the instructional staff [this includes the TAs] are provided for
emergency situations only.
So far at least 4 people have sent email about the project, most with "what if"
or "can I" type questions:
Note: all students should strive to submit projects well PRIOR to the 11pm due
time and if you are unable to, then fortunately you have up to 48 hours to fix
whatever problems may have kept you from submitting ontime. Due to the fact
that students are given ample opportunity to meet with the instructional staff
prior to a project being due, no question regarding a project is considered
an emergency situation. An emergency situation would be if the class
computer accounts were encountering problems - if something like that does
occur you should check the class webpage (click on the announcements link and
the FAQ page for the respective project) and if the problem is not mentioned
there, then and only then should you notify the instructional staff.
Additionally, email is perhaps one of the worst
mediums/means for holding a conversation and many people think that
it is an instant medium. When adequately answering a question a
conversation is generally needed. So the next concern might be to
say, but how about a clarifying question or a yes/no type of
question - this is where the instant medium becomes an issue - 1) we
do not have the resources to satisfy the instant wants of everyone
and 2) it is not best
to do so - rather than "fire off" (send off) an email everytime a little
question pops up (like can I do this, what if this, how do I fix this, ...)
students should learn to think about their problem/question first and see if
they themselves can either 1) answer the question or 2) look up an answer
to the question (without violating the honor code). This is perhaps the
most important of items - attempting to think about the problem (do I
absolutely have to have a mutable data member?, Is there any other
way I could do this that works per the project specifications?, It appears
that I am having difficulty with the std:: portion of the
code - when do I need std:: and when do I not?, ...).
Hmm, so what about this violating the honor code issue. If you are
having difficulty with some part of the project it is recommended above to
attempt to look up an answer to the problem - using a textbook or
other such resource clearly does not violate the honor code - note however
if you copy code from somewhere (say you find code in a textbook) or use
a novel idea you found somewhere, it is always best to cite your source.
What about going to a friend and asking them to assist - this is where
the gray area begins and very quickly turns into a potential
violation. You are permitted to study together with other students
and if you are having difficulty understanding how a makefile works, how
namespaces work, how general sorting algorithms work, how to determine
the runtime of an algorithm ... you can discuss these items with fellow
classmates and seek assitance from others (as mentioned above you can also
look up these items in a book
or in tutorials and attempt to figure them out - 1) by reading and 2) by
practicing - create a short program to test a sorting algorithm, to test
some namespace issues, to demonstrate a concept in it's most basic form).
Where the gray area begins to "cross over" and become a clear
violation is when you start talking about how to implement the namespace
stuff with respect to the project or how to write the + operator for
the project or ...
And it should be very clear that if in the process of seeking
assistance you show your code to another student or look at the code of
another student's project this has more than "crossed over the line" and
is beyond the gray area and constitutes a violation of the
Honor Code.
A FAQ is a list of Frequently Asked Questions
and in particular the FAQ's for projects in this class will have
questions listed in reverse chronological order (meaning the most
recent question will appear at the top of the FAQ list and the
first question asked/answered will appear at the bottom of the
list).
Note that the FAQ's that are posted are usually ones that the
instructional staff have created in anticipation of potential
questions and ones that have been encountered frequently by the
instructional staff while assisting students in office hours.
Per the policies outlined on the syllabus you should see one of
the instructional staff during office hours regarding all questions
on projects - this includes project #0. Note that any email
inquiries concerning projects may go unanswered.
Also you should always read the corresponding FAQ prior to asking a
question on a project and you should generally ask no questions the
first day that a project is posted - rather you should thoroughly
read over the project description and think about it for a while.
Project #0 is due by 11pm on Thursday, February 6th, 2003. Note:
any project may be turned in late up to 2 days as specified on the
class syllabus. For details regarding the late policy and any
penalties associated with submitting late projects please see the
class syllabus.
|
See the class syllabus for policies concerning email Last Modified: Sun Feb 9 17:38:45 EST 2003 |
|
|
|
|
|