McMaster University
CAS 706

Assignment 4

Due: April 10th

Scripting/Programming with libraries

This assignment is all about finding the right libraries as well as the right level of expressiveness to code what seems like a very complex task in very few lines of (still readable!) code.

First, you should write a Python program which makes a Google query to get files containing programs from a particular programming language (I recommend using C, but you may use C++ or some other language for which you have a compiler or tool which issues a lot of warnings for bad code). You are to download 1000 files from the web (obtained from your Google query), then run these files through a (local) compiler with all warnings turned on. You should then collect statistics about this "bad code", and output the statistics. The more thorough the statistics, the better. Your code should be no longer than 100 lines of well-formatted code.

Secondly, you are to do the same, but replacing Python with Perl, and C with HTML. Instead of using a compiler, use the W3C HTML Validator. You can use the validator locally, but you get extra points if you can use the online version of the Validator hosted on the W3C site.



Mar 2005