CS 115: Introduction to Computer Science 1

The Rules of CS115

  • The first rule of CS115 is do not Copy/Paste.
  • Always name your functions as indicated in the interface file.
  • Always run at least one basic test on your code.
    If you like the results, leave your code alone; if not, change your code.
  • Submit your code often and submit your code early.
  • Check the announcements at least once a day.

The Copy/Paste Error

When you go to check your marked assignment and you see that your code looks similar to the following:

  • #reader(lib"read.ss""wxme")WXME0108 ##
    This file uses the GRacket editor format.
    Open this file in DrRacket version 5.0.1 or later to read it.
    Most likely, it was created by saving a program in DrRacket,
    and it probably contains a program with non-text elements
    (such as images or comment boxes).
    28 7 #"wxtext\0"
    3 1 6 #"wxtab\0"
    1 1 8 #"wxmedia\0"
    4 1 8 #"wximage\0"
    2 0 34 #"(lib \"syntax-browser.ss\" \"mrlib\")\0"
    1 0 16 #"drscheme:number\0"
    3 0 44 #"(lib \"number-snip.ss\" \"drscheme\" \"private\")\0"
    1 0 36 #"(lib \"comment-snip.ss\" \"framework\")\0"
    1 0 43 #"(lib \"collapsed-snipclass.ss\" \"framework\")\0"
    0 0 19 #"drscheme:sexp-snip\0"
    0 0 36 #"(lib \"cache-image-snip.ss\" \"mrlib\")\0"
    1 0 30 #"(lib \"image-core.ss\" \"mrlib\")\0"
    1 0 33 #"(lib \"bullet-snip.ss\" \"browser\")\0"
    0 0 29 #"drscheme:bindings-snipclass%\0"

it means that something was copied from the Interactions window (the bottom window) or perhaps the assignment PDF and pasted it into the Definitions window (the top window). This renders your code unreadable by both MarkUs and the markers. As a result, you will receive a zero(0) for that question.

How to Avoid the Copy/Paste Error

Type everything (code and comments) into the Definitions window. Do not copy/paste anything.

How to Identify a Copy/Paste Error

If you are unsure if everything in your file was typed, use one of the following methods to check.

  • Submit your file to MarkUs and click on its filename. If it looks like the example at the top of the page, there is a copy/paste error in the file.
  • Submit your file to MarkUs and check the Basic Test results email. If you cannot find the email, request a Basic Test to have the email sent again (Click here).

    If there is a copy/paste error, in the Basic Test results email you will see a message similar to the following:

    • Tests for Question 1: FAILED; FAILED - Error creating evaluator, a1q1.1292377245-407910189.rkt:191:1: function call: expected a defined name or a primitive operation name after an open parenthesis, but found something else at: #";; The first three lines of this file were inserted by DrRacket. The" in: (#%app #";; The first three lines of this file were inserted by DrRacket. The" #"y record metadata")
  • Open your file in a text editor (for example Microsoft Word). You code will look like the example at the top of the page if there is a copy/paste error.
  • Look at your code, particularly any numbers. If the number is any colour other than green (such as black), then it most likely is a number that was copy/pasted. Any numbers with a bar over it is from a copy/paste.
  • Look at your comments. Even if the copy/paste item is commented out, it will still affect your code. To find it, uncomment any comments. If any number remains orange, then it is most likely one from a copy/paste.
  • Note: The last two items refer to the default colour scheme in DrRacket. If you have changed the colour scheme, then note what colour numbers should be in your environment and any numbers of a different colour were copy/pasted. Similarly for comments, if uncommented numbers retain the colour of a comment, it is from a copy/paste.

How to Fix Your File

Find the copy/paste item in your file, delete it, and type the item back in. If you do not know or cannot find where it is, retype your entire file.

Valid XHTML 1.0 Strict Valid CSS!

Last modified on Thursday, 03 September 2015, at 14:13 hours.

Course Supported by Instructional Support Group