CSC 290A, Spring 2009: Homework

The following page lists the homework, written or programming assignments, for the Spring 2009 class. The homework is listed by due-date order : newest should be on top.


Rules

  • Submit your example and solution code through the CS department wiki by creating a new page or a set of new pages. Make them changable by only you and viewable by you, KonstantinosMenychtas, and ChenDing.
  • We have collected a set of easy to follow hints/guidelines on the Wiki-related hints page, including page creation, basic formatting, and access control.

Homework 2: On-line email drop-box. NEW

Have you ever found yourself in the uncomfortable situation to have to give your e-mail to people you wouldn't really want to ? What if you wrote this short and easy script they could use by visiting your website to mail you instead ? All you need to do use Ruby + CGI to handle an HTML form and take care of the e-mail forwarding.

In this pre-assignment you need to implement that exact form that would serve as an "email drop-box" for your website. Yes, that is a potential source of spam, so as soon as you finish familiarizing yourself with Ruby + CGI ( Common Gateway Interface ), you are free (but not required) to elaborate on the assignment and improve your service (ex. add sessions, or some visual authentication mechanism) , or re-implement the same scenario using another language (ex. PHP + CGI) and contrast.

How to start:

  • Login to your betaweb account.
  • Visit /var/www/html/cs290 and create your own directory, using your login name. That is where you will place your scripts.
  • To be a web service, your script has to be readable and executable by everyone. However, we request that students do not look at each other's script until the deadline passes.
  • Your scripts need to have a .cgi suffix.

Other notes

  • Implement a single script to handle every possible input / context to be displayed (both the form and "sent confirmation")
  • Use Ruby 's CGI class
  • Use the Ruby's system to invoke mail (unless you have a better idea)
  • Remember you can access the get/post of the form data through the params hash of the cgi object
  • See The Ruby Way, Chapter 19 for a first set of hints. And then, the web !

This assignment is meant as a warm-up for the more feature-rich Homework 3.

Homework 2 pre-assignment is due midnight, Sunday Feb. 15th.

Homework 1: Extensible Design

A common software problem is to develop a set of tools operating on a collection of data. The goal of extensible design is to structure the system so that new tools and new data types can be added without changing the code for existing tools and data types.

In this assignment, you are asked to come up with an example programming problem and demonstrate an extensible design on the example problem. The specific requirements are

  • the problem should involve data with recursive data types
  • the existing solution should have at least one data type and one tool
  • the extension should include at least one new data type and one new tool

The design will be evaluated not only in terms of correctness but also the brevity and clarity of your program. You are encouraged to use this exercise as a way to evaluate the object-oriented features of your favorite programming language and compare it with newer alternatives especially the one we discussed in class, Ruby.

Homework 1 is due midnight, Sunday Feb. 1st.

Edit | Attach | Watch | Print version | History: r20 | r13 < r12 < r11 < r10 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r11 - 2009-02-10 - KonstantinosMenychtas
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding URCS? Send feedback