lab-1.txt - = COMSC 110 Lab 1 = Goals = Start working with...

This preview shows 1 out of 3 pages.

=============== COMSC 110 Lab 1 =============== Goals ===== - Start working with plain text. - Introduce yourself to me. - Write some algorithms: - Simple - Variables - Branching Plain Text ========== A programmer needs to become comfortable with plain text. Plain text is comprised only of the characters on a standard keyboard. Whitespace, like space or tab, is used to separate characters. Pressing the Enter key will start a new line. Plain text characters don't have any formatting. They are not bold, italic, underlined. They don't have a font size. These styles are used outside of programming to communicate meaning. When writing in most programming languages, the meaning of something (the semantics) is found only in the characters that are written, not the style that they are written in. There are exceptions to this; for example the python language places meaning in whitespace. Most operating systems come packaged with a rudimentary text editor. As a programmer, you will quickly outgrow this text editor. When you decide that you would like to try working with a better tool, do some research on the internet to find a text editor made specifically for programmers. Some examples are: Notepad++, Vim, Emacs, JEdit, Textmate. It is common for programmers to write documents in plain text even when not programming. This document is an example of that. For this lab you will create a single plain text file for submission. - Open a plain text editor. - Create and save a new plain text file named exactly "lab1.txt" In plain text files, characters are often used in place of formatting. For example, you can use asterisks to *emphasize* something, or double-asterisks to **really** emphasize something. Non-alphabetic characters are often used for document structure, for example:: ========================== Here is a Document Heading ========================== - At the top of your lab1.txt file, create a document heading as shown above. The document heading should include the name of the course and lab number. - Leave one blank line below the header. - Include your name on the next line. - Include the date on the following line. In plain text we care about line length, that is, how many characters are on a single line in the file. When you write in a word processor like Microsoft Word, you rarely, if ever, consider this; long lines simply continue below the current one. In plain text, we manually decide where lines end by pressing the
Image of page 1

Subscribe to view the full document.

Enter key. If I ask you to write a novel in plain text, you could write the entire novel on a single line, never pressing the Enter key. If you were to open a file like this, your text editor may or may not wrap the content to fit the width of the screen. However, we don't leave this up to chance when we are creating plain text files, we manually break long lines by pressing the Enter key. This gets annoying quickly, and one of the key features of a decent text editor is that it will automatically press Enter for you type long lines.
Image of page 2
Image of page 3
You've reached the end of this preview.
  • Spring '14
  • Text editor, Plain text

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern