This assignment is mostly a warmup exercise giving you a chance to play with a few programming languages that you may not have any prior experience in. If you simply do the task in languages you already know, you’re missing the point entirely. It’s in your best interest to try at least two languages you are not too familiar with. That way you might discover awesomeness as yet unknown to you, awesomeness that will help you going forward!
You are hopefully familiar with the
cat command in Unix; if you’re not,
you may want to read up on it by logging into a Unix system of your choice
man cat into a shell prompt.
For this problem you will write a very simple clone of the
and you’ll write that clone three times.
Your version of
cat only has to read from standard input (until
end-of-file that is) and write to standard output what it just read from
standard input; you do not have to implement any other
Pick three from the following ten choices (we assume the versions on
our Lubuntu appliance as already documented on Piazza
cat clone as described above once in each of the three
languages you pick; aside from how the programs are started, all three
should be identical in terms of functionality.
(Test against the existing
cat in your Linux install; if in doubt use
I/O redirection so you don’t get confused by how terminals work; and
make sure your
cat can be used to correctly copy, for example, JPEG
README file, briefly describe why you picked your three
languages, how you reviewed/learned what you needed for this problem,
and how you feel about each language; conclude with a statement about
your most likely language choice for the remainder of the course, i.e.
for writing a compiler. (Keep in mind that you still need special
permission if you want to use anything but C, C++, Go, Java, or Python.)
Be sure to also include basic instructions on how to build your programs
in Linux in your
Use the tools appropriate for the language at hand; for example C/C++
programs should include a
Makefile while Python programs should not
require any kind of build tool.
Please follow the submission instructions as detailed on Piazza. Make sure that your tarball contains no derived files whatsoever (i.e. no executable files), but allows building all required derived files.
For reference, here is a short explanation of the grading criteria.
Packaging refers to the proper organization of the stuff you hand
in, following the guidelines for Deliverables above. Style refers to
programming style, including things like consistent indentation,
appropriate identifiers, useful comments, suitable documentation, etc.
Simple, clean, readable code is what you should be aiming for.
Performance refers to how fast your program can produce the required
results compared to other submissions. Design refers to proper
modularization and the proper choice of algorithms and data structures.
Functionality refers to your programs being able to do what they
should according to the specification given above; if the specification
is ambiguous and you had to make a certain choice, defend that choice in
README file. (It also refers to you simply doing the required
work, which may not be programming alone.)
If your programs cannot be built you will get no points whatsoever. If your programs fail miserably even once, i.e. terminate with an exception of any kind or dump core, we will take off 10%. Finally, make sure to include your name and email address in every file you turn in (well, in every file for which it makes sense anyway)!