This page gives my homework advice and hints. You'll probably also want to check out the main course website.
You'll be submitting your homework to me via email at wking
(at) drexel (dot) edu
. I've got
pygrader
reading my email, looking for messages with the
[phys305:submit]
tag in the subject, so make sure you
include that when you mail in your submissions. The remainder of the
subject should be the assignment title. For example:
Subject: [phys305:submit] assignment 1
You should get an automatic response acknowledging your submission. If you're concerned about the authenticity of the messages sent by pygrader, the OpenPGP key used by the robot is here.
Homework is due before class starts each Friday, so we will be able to discuss solutions in class.
In order to practice good coding hygiene, you should package your submissions in gzipped tarballs with the following auxiliary files:
README
Makefile
COPYING
This is an common format for distributing software, and it will make people who need to compile and use your code (e.g. me) more comfortable. The benefit of such a format is that I can unpack, build, and run your package using something along the lines of
$ tar -xzf whatsit-1.0.tar.gz $ cd whatsit-1.0 $ make run
without having to dig to deeply into the gory details of your submission. Of course, I may dig in anyway, but at least I'll have a standardized starting point.
I've put together an example homework submission (with extensive comments) which you can use as a template.
To create a tarball containing everything in
the whatsit
directory, use the following invocation (see
the tar
manual for details).
$ tar -czf whatsit-1.0.tar.gz whatsit/
All graphs and plots must have a title and properly labeled axes.
One tool that makes software development much easier
is version
control, even
if you're
the only one using your code. Version control lets you keep track
of your history, so it is easy for you to decide if the version
your foo
project that you found on your laptop is more
recent than the version you just discovered on the department server.
If you've made well-commented commits, it will also tell you what you
were thinking when you wrote a particular line of code or fixed a
particular bug.
Using a version control system is really easy with distributed version control systems like Git and Mercurial. For example, using Git can be as simple as:
$ cd (project-directory) $ git init $ (add some files) $ git add . $ git commit -m 'Initial commit' $ (edit files) $ git commit -am 'Add contact information to README'
For a more detailed introduction to Git, take a look at the Git Book.
When you have a coding problem, you are probably lucky enough that someone else has already come across that same problem and solved it. You can try and find those people using a general search engine, but you can also use stackoverflow, which is an excellent repository of questions, which usually have high quality answers like this one.