35 Comments »

Ruby “One-Liners”

The assignment is here: http://e168f07.7fff.com/private/assignments/

The reason it’s a PDF is because I don’t want these to get pasted in e-mail, blogs, etc., etc. Let me know if this is onerous or unreasonable.

How to submit:

E-mail your answers to your section leader.

Include in the subject line: E168

Include in the body: submission:assignment2

Your answers must be in a text file or in the e-mail — no PDFs or Word docs. Reason: We will want to easily cut-and-paste your answers. Make sure to identify each answer by the question number.

If I need to make any changes, I will include it here, and will send a notification.

Do not be scared of these questions: Remember that the due date is a ways off, and I haven’t lectured on blocks, etc.

The early ones are highly doable. The harder ones at the end are worth fewer points so that if you can’t do them or if you can only do a partial solution, it won’t kill your grade. The Ruby “magic” is the extreme compression you see at the top of p. 23 in the Pickaxe, and throughout the API documentation for Enumerable (p. 454 and after).

Let me know how these go.