Questions about the coursework
The plagiarism detection software
The size of the textarea: your textarea needs to accept texts of the
given size. But the textarea does not have to restrict input to that size.
What is the end of a "line": for the purposes of the coursework a
line ends in a newline character. Thus a line can have less than 80 characters.
Is the distribution of white space relevant for lines or the whole
text: the distribution of white space should be analysed for the whole
text. But newline characters are white space, thus you can analyse it line by line.
How to present the results for the white space distribution:
for this part you only need to report whether or not the texts have the
same or a different distribution.
Different browsers: your software only needs to run on Internet Explorer
as it is installed in the JKCC.
Security: your script will be tested with respect to possible
break-ins over the web using the list given on the exercise pages for week 6.
There won't be any tests performed with respect to security from other users
on the same server (because if you are using PHP at Napier, you can't protect your
code against those anyway). But you may wish to discuss both aspects in
Storing results: you can store all of the results or, if you want
to, you could just store the texts and then regenerate the information on demand.
The printed documentation
Schematic diagram/flowchart: you only need one diagram. This diagram
can be about your whole application (either including the HTML pages or only the
scripts) or it can focus on a particular aspect of the tool.
Handin of the printed documentation: please note that you need
to show your matriculation card when you are handing in your documentation at
the School Office.
Hints for general problems with the webserver
There may be problems with the PHP version on socweb1.
The count parameter in preg_replace() is only available in PHP 5. Socweb
runs PHP 4.3.4. The offset parameter in preg_match() or the return
value in preg_match_all() might produce a count (I haven't tried it
though). It should also be possible to solve the problem without counting,
just by matching.
Perl: Internal Server Error
If you edit your CGI files
using a Windows editor, the first line of your file must end in "-w"
("#!/usr/local/bin/perl -w"), otherwise you will get a server error.
This is because Unix does not like the Windows newline character after "/perl";
Unfortunately, more complex CGI scripts with undefined variables
can run slowly with the "-w" option. On Unix, it may be better
not to use the "-w" once any errors have been removed from the script.
No html pages, Perl or PHP scripts are viewable through the browser
For some reason C&IT seems to occasionally reset permissions. Go
to your home directory (the one above public_html) and type "chmod 711 .".
Questions about the exam
The format of the exam
See the past paper webpage
You will not be asked to recite facts, but instead you will be
tested with respect to your understanding of the topics.
If you are asked to write code in the exam, you can write it
either in Perl or PHP.
What books to use for revision?
There should be a few books about Perl, PHP in the library
(eg the Learning Perl book). But I am not sure how you would use them
for revision because they are more reference books than textbooks.
I would probably recommend to go over some of the exercises again
instead of reading lots of books.
Will we have to know the content of the various extra readings?
You should know the concepts which were discussed in the extra readings.
But you will not be asked to recall exactly what author X said in paper Y.
What you can take with you to the exam
The exam is an open-book exam. You may use any book and any
You should take the following with you:
You may NOT use electronic devices (e.g. laptops, calculators,
mobile phones etc). If you require electronic devices because of
a disability or other reasons, you need to obtain advance permission.
- the printouts that were handed out during class,
- any handwritten notes that you compiled during the semester,
- one or two books on server-side languages, especially a book with a good
index so that you can find things quickly.