COMP15 C++ Styleguide
Follow the styleguide for your homeworks and projects.
We've gathered materials on some important concepts we'll use in COMP15. Some of these will be new, and some will be refreshers from COMP11 material, just in case we need them!
Exam Review Sheets
COMP15 Practice Problems and Handouts
Random Programming Resources
Below are a handful of resources to consider while writing your homework. There are many more useful tips and tricks for thinking computationally and writing good C++ code, so feel free to take a look around on the internet for good ideas. If you find a good (great?) resource, post it on piazza so your classmates can learn from it, too!
Writing Code for This Class
You will do your work for COMP15 with the Linux
computers at Halligan Hall. You can use the workstations
in the labs, and you can connect to the servers
over the Internet.
Software To Install
You do not need your own computer for COMP15. The computers in the labs in Halligan Hall have all the software you need for the course. If you plan to work from your own computer, you need a remote-connection program.
If you're logging into the Halligan machines using the Terminal (Mac) or puTTy (Windows),here's what you need to do:
- Open PuTTy to start a new session.
homework.cs.tufts.edu into "Host Name (or IP address)".
- Type a fun name for your new SSH settings into the box under "Saved Settings".
- Now hit "Save" over on the left.
- Frow now on, when you open PuTTY, simply click the name that you created for your settings and hit "Load", then "Open".
- Open up your terminal from Applications > Utilities > Terminal and type:
ssh -X firstname.lastname@example.org
- Download sublime: https://www.sublimetext.com/3
- Read the tutorial: https://github.com/jroth01/TuftsCS_SublimeSFTP. This demonstrates how to set-up sublime with the tufts server. Packed with good information on the SFTP part!
- If you follow the SFTP instructions with the link, then all of the work you do on your laptops will sync with the system immediately each time you press save.
Emacs Tab Setup
Is Emacs your editor of choice? We like it too, but the default tab settings aren't great --when you hit 'tab', it puts in an actual tab instead of 4 or 8 spaces. Spaces are much better. Here's how to fix it:
Save the file, and you're done! Be careful to only edit the text itself and not the spaces or tabs in the .emacs file.
- Go to your home directory:
- Open up the file .emacs:
- Look for a line that says "setq-default indent-tabs-mode t"
- Edit that line to say
setq-default indent-tabs-mode nil
- Look for a line that says "tab-width"
- Edit that line to say
tab-width 4 (or 8, whatever your preference is).
What to do about "Disk Quota Exceeded"
A common problem that comes up when working on the Halligan servers is getting the error "Disk Quota Exceeded" when attempting to create folders / other files. Here's a few tips:
Save the file, and you're done!
- Make sure you delete any "core dump" files (they're huge!)
- Change into your home directory:
- Open the file .cshrc:
- At the bottom of the file, add the line:
limit coredumpsize 0
How to recover old files (sometimes)
Something go wrong when saving your file? You might be able to recover it!
- There is a folder in your home directory called
.snapshot (it will appear in the list when you type the command
ls -al). cd into this folder and type
- There should be a folder called
every_four_hours.2017-xxx. cd into this folder, type
ls, and you should see a copy of your home directory.
- Check to see if this version of the file you were editing has the edits you lost. If so, copy it into the directory where you were hoping it existed in the first place.
Last updated February 17, 2018 17:37:08 EST