CS 4010 Spring 2018
Lab 1
Due: February 7, 2018
Find a computer and log into the OSX side using your
new login name and password.
Open Firefox and find the class web
page.
Find the Terminal and BBedit (TextWrangler)
- use the finder window and go to applications.
Once you have the Terminal open, you can change your
password.
First think of a good password, here is some
advice from Dr. Sarraillé:
You must construct your password according to the following
requirements:
- Each password must have at least six characters. Only the
first eight characters are significant.
- Each password must contain at least two alphabetic characters
and at least one numeric or special character. In this case,
"alphabetic" refers to all upper or lower case letters.
- Each password must differ from your login name (username) and
any reverse or circular shift of that login name. For comparison
purposes, an upper case letter and its corresponding lower case
letter are equivalent.
- New passwords must differ from the old by at least three
characters. For comparison purposes, an upper case letter and
its corresponding lower case letter are equivalent.
Additionally:
- Unfortunately, it is likely that hackers will be trying to
break into your account. They run sophisticated computer
programs that are very good at quickly discovering (cracking)
passwords.
- A password needs to be easy to remember but hard to guess.
In other words it needs to be easy for you to remember but hard
for the cracker's computer program to discover.
- Here is a very nice way to create a password: You can think of
a saying you enjoy and base the password on the use of the first
letter of each word. For example A word to the wise is
sufficient could become aw,ttwIs.
- But don't use aw,ttwIs as your password! You need to
make up a password known only to you!
- For maximum security, your password should have eight
characters. (That makes it harder for the cracker to guess.)
Change Password: Now
that you have a password that is secure and you can remember, you
can change to it by typing passwd at the prompt in the Terminal.
You will be prompted for your old password and then have to enter
your new one (usually twice to verify).
NOTE: If you are asked to "Create a new Key
chain" answer yes. If you answered no, you will need to go to
your Library directory and delete the existing key chain folder,
then logout and log back in to ensure that your old password is
no longer required.
Set up a directory for this class in your home
directory using finder. You may want to add
some subdirectories, such as Tools, Lab Assignments, etc.
Download the examples from the book web site.
In TextWrangler - start on page 19 of the book:
Here is the text from the book to play with
Agalma
elegans
Frillagalma vityazi
Cordagalma tottoni
Mus musculus
+40 46'N +014 15'E
+21 17'N -157 52'W
Use Find - command f, to find and replace
"galma" with ".", using Case Sensitive and Grep, in
Agalma elegans
Then try it again
on all three names.
Continue to work through Chapter 2 as time permits.
What to turn in:
Create a new file in TextWrangler called <your name>Lab1.txt
For example my file would be called MelanieMartinLab1.txt
For the examples on pages 21-27 of the
book.
In this file, for each example, cut and paste:
- Original Data
- Your regular expression to capture the data
- Your regular expression to print the data
- The modified data
Make sure to separate with blanks lines to make it readable.
Here is an example:
===================================================
Data:
-9 59.8'S
-157 58.2'W
+21 17.4'N +157
51.6'W
+38 30.5'N +28 17.2'W
+40 46.1'N +14 15.8'E
+10 24.8'N +51 21.9'E
Find:
(.\d+)
(\d+\.\d)\'\w\s+(.\d+) (\d+\.\d)\'\w
Replace:
\1\t\2\t\3\t\4
Result:
-9
59.8 -157 58.2
+21
17.4 +157 51.6
+38
30.5 +28 17.2
+40
46.1 +14 15.8
+10
24.8 +51 21.9
======================================================
Turn
it in:
Go to the CS Homework Submission System: https://www.cs.csustan.edu/cshomework/
Choose: instructor Martin, use your CS login and
password
Spring 2018
CS4010
Lab1
Upload the files as prompted.