5 January 2022

Before We Start

You will get an email on 3 or 4 January, which will refer you to this page. Here is what you need to do before we begin so we can hit the ground running. Save this email until the first day of class; you will need the information it contains.

You will need three important items.

You will receive an account on cs.ncssm.edu on the first day of JTerm. This will afford us a uniform UNIX computing environment. This server has all of your favorite compilers, inclding headlless Java, C, and Python. The server is not visible off of campus.

Windoze Login

You need to be on campus to do this.

  1. Start PuTTy
  2. Port: 22
  3. hostname: cs.ncssm.edu
  4. You will be asked for your login and password, which has been sent to you. You will see a black terminal window asking for your login name. Enter it and hit ENTER.
  5. You will be asked for your pasword. YOU WILL NOT SEE CHARACTERS AS YOU TYPE. Hit ENTER when you have typed it in.
  6. If you log in successfuly you will see a system prompt looking like this: ~>
  7. Type passwd at this prompt and you can change your password.
  8. To end your session, type exit at the prompt.

This brief video shows how to customize your PuTTY session. You can create different profiles for different purposes.

This video has some really nice tips to make PuTTy easier to use and make you more productive.

Mac/UNIX Login

  1. Open a terminal window.
  2. At the prompt, type ssh (your user name)@cs.ncssm.edu. You will see this.

    picture of login window

  3. Type your password. YOU WILL NOT SEE CHARACTERS AS YOU TYPE. Hit ENTER when you have typed it in. You will get a system prompt which will likely just be ~>.

    picture of terminal after successful login

  4. Type passwd at this prompt and you can change your password. Just follow the directions and choose a strong password.
  5. To end your session, type exit at the prompt.

Handy Resources

Cast of Characters

Meeting Times There will be two sessions.

Central Theme This is about data acquisition and visualization. You will learn a toolset that is freely available and amazingly powerful. It allows you to do some heavy lifting without writing a ton of code.

What you will Learn

What you will Create Start thinking about things that interest you and which produce scads of data. This can encompass economics, politics, science, sports, and a panoply of other areas of interest.

You will build an apparatus that allows you to acquire and process data and use that apparatus to look at a "real-world" problem.

The Anatomy of a UNIX Command

The three parts

  1. name: The name of the command
  2. options: these are preceded by - or --
  3. arguments: these are things being acted upon.

Commands we learned this AM

  1. command mode: search replace mobility save save as This is the default mode
  2. insert mode: type

Getting INTO insert moe

i insert before the cursor
I inserts at beginning of line
A appends to end of line
a appends after the cursor
o opens a new line after the cursor
O opens a new line before the cursor

ESC goes from ANY mode into command mode.

o
Command mode mobility
arrow keys:  go in inidicated direction one spaceo
:number go to line numbero
^ go to start of line
$ go to end of line
gg go to top.  :1 also works
G  go to bottom
u undo
/string to search for string forward
?string to search for string backwards
n to find next
N to fine previous
:set ignorecase  - editor now searches case-insenitive
:set noignorecase = turn off ignoring case
:set number
:set nonumber
:set ignorecase  - editor now searches case-insenitive
:set noignorecase = turn off ignoring case

Saving graces

:w  writes file to disk
:q quits a saved file
:wq save adn quit
:qw ERROR
:w filename saves a copy to the named file.
:a, b w filename saves a copy to the named file of lines a to b, inclusive.
:w! filename overwrites an exsiting file with a copy of the one 
you are editing.
:r filename reads the file in at the cursor's location.
yy yanks cursor's line to Mabel
p pastes Mabel's contents
dd cuts cursor's line to Mabel
:a, b d
% matches any delimiter.

:s/old/new   substitute first instance of old to new on cursor's line
:a,b s/old/new substitutes first insance of old to new on lines
    a through b.
:a,b s/old/new/g substitutes all insances of old to new on lines
    a through b.
flagst end:

^ can be beginning of line
$ can be end of line
g global (do all)
i case-insensitive
c check each one
replace mode
r then characgter repalces cursor's character with character specified.
R mows down characters as you tupe


The File System: HFS!