Prior Exam Material
Sending Programming Questions via Email
Your instructors encourage you to send emails with questions about your programs. You may be surprised by our responsiveness and ability to help, and we do very much want to help. So, please send us your questions.
However, not all email questions are as easy to answer as others, and to make the process smoother for you, here is some guidelines (— credit to Dr. Dan Roche for the points!)
- Clearly indicate what class, assignment, reading, etc you are talking about. Probably a good idea to put the class and the assignment number in the subject of the email, along with a short description.
- Try to ask a clear question that probably has a definite answer. If your message says "I'm lost and don't know where to start", there's nothing I can do for you over email. In that case, you should schedule a time to talk in person.
- Explain (briefly) what you've already tried to solve your problem. That way we don't tell you something you already know!
- If you are asking about programming, include the short (maybe 10 lines) segment of code, and (if applicable) the exact error message you are seeing, in the plain-text body of the email. You should also attach the entire source code file(s) in case the error is not in the part of the code that you think it is and I need to look elsewhere.
- If you don't understand the response, or it's not helpful, email your instructor again so that they can try to explain it better. Keep in mind that the goal is to guide you to the solution, not just tell you how to do it.
- If you haven't received a response within 48 hours, email your instructor again to remind them of your query because your message has probably been buried in a large stack. (It is unlikely that this should happen!)
Installing Latex on your VM or using an online Latex editor
Install latex using
apt-get on your Ubuntu VM by issuing the
sudo apt-get install texlive-latex-*
This will take some time to complete, and it is a rather large
installation, so be patient. You can then compile your
tex file into
Alternatively, you could use an online Latex editor, such as sharelatex or overleaf. Both are simple, easy, and free to use. And generally, there is a wealth of information online as references for using Latex.
Code Management System
Connecting to Lab Computers
To run any of the ic221 scripts you must be logged into a Michelson Hall, CS lab
computer or to the
midn.cs.usna.edu server that is running Linux. It will
NOT work on your VM on your laptop. Fortunately, access to a lab machine is
rather easy from your laptop's VM using ssh, the secure remote shell.
To ssh into a CS server computer from your VM use the following command.
ssh -Y firstname.lastname@example.org
Where username is replaced with your USNA username. In that terminal, now connected to the remote machine, you can perform your submission and do other work, such as run emacs/vi where it pops up as a new window in your VM.
Updating your ic221 directory
To retrieve new course code, run the update script while connected to
This will put new files in your home directory under the ic221 folder. You will
complete all your work in this directory, and only files in this directory on a
midn=cs.usna.edu computer can be submitted for credit.
Submitting your ic221 labs
To submit your labs, you'll use the ic221 submit script by executing
the following program while connected to
The submit script will prompt you for what assignment you want to submit, so selct the right one. Then it will confirm submission.
You can submit multiple times before a deadline. It will not overwrite previous submissions, but only your last submission will be graded.
Checking Submission Success
You can check if your submission succeeded and which files you submitted using
the following script while connected to
The program will list all your submissions and times submitted