Functional Problem Solving (CSC 151 2015F) : Assignments
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Taking Notes] [Rubric] [Remote Access]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Labs] [Outlines] [Readings] - [Examples] [Handouts]
Reference: [Setup] [VM] [Errors] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Curtsinger (2015F)] [Davis (2013F)] [Rebelsky (2015S)] [Weinman (2014F)]
Misc: [Submit Questions] - [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)]
Summary: We detail three satisfactory ways to print your examinations or other pieces of code so that it is readable for you and for others (particularly for your faculty members and graders).
You may have already experienced that reading code takes mental effort. Fortunately, when you are reading code in DrRacket, it adds things like auto-indent and color highlighting to make that job easier. Unfortunately, if you print code in non-standard ways, these helpful cues go away. This document describes three ways (ordered from easiest to more involved) to print code to hard copy that will conserve paper and preserve some amount of readability:
The easiest way to print your code is directly from DrRacket. Unfortunately, if you use DrRacket to print from MathLan, the screen size of your font seems not to match the printed page well. We I have found that after you adjust for reasonable line lengths (don't trust DrRacket to wrap your lines sensibly--you must manually enter line breaks), if you change the on screen font size to 7 (using the default "Monospace" font) translates to paper well.
You may adjust the font size as follows:
To return your font size to "normal" after printing, you may follow the same steps, choosing a different font size (probably 12).
Next, select the menu and click the option. You may follow the usual steps to print (preferably double-sided); the closest printer to the labs in SCI 3813 and SCI 3815 is called “duerer”.
Some of you may choose to take advantage of a word processor when submitting code. That is fine, but to preserve the alignment that DrRacket gives your code, you must use what is called a “monospace” font. (That means each character, whether "i" or "m" takes exactly the same width on the page.)
Please leave your code single-spaced (double-spacing makes it harder to read).
If you use LibreOffice on the MathLAN, you can choose from among several fonts with "mono" in the title, including:
If you use another word processing product, some other standard options might include:
Please preserve the formatting of your code and formal comments in these monospace (fixed pitch) fonts. Other items may be rendered in a sensible font of your choosing.
For those comfortable typing in the command-line terminal,
you can issue a command that will both format your text file
and submit it for printing. If you know the path to your file is, say,
/home/username/Desktop/myfile.rkt
and you wanted to print to the printer duerer, then you
would use the Terminal command (changing username
to your own user name, of course):
enscript -Pduerer -Escheme /home/username/Desktop/myfile.rkt