74.101 Slides - Computer Science

January 5, 2018 | Author: Anonymous | Category: Engineering & Technology, Computer Science
Share Embed Donate

Short Description

Download 74.101 Slides - Computer Science...


Computer Science 211 Software Tools and Systems Programming Tue. 3-4, Thu. 3-5, UC30

Software Tools & Systems Programming Welcome! I am Dr. Bin MA, your instructor. I am an Assistant Professor of Computer Science at UWO. You may reach me by  [email protected]  Middlesex College 364  x. 86890

Software Tools & Systems Programming To talk to me in person: 

Pls. try to come only at my office hours:  Tuesday

11-12, Wednsday 4-5  Other time is fine but not encouraged.  

TA’s office hours TBA. We will decide other office hours for me and the Teaching Assistants as the need arises.

Software Tools & Systems Programming http://www.csd.uwo.ca/courses/CS211b contains:  Assignments  Lecture notes 

  

will be posted at the END of the week in which they are presented

Marks Important notices …

Texts and References 

Mark G. Sobell, UNIX System V: A Practical Guide. – about how to use Unix – recommended – but do have a reference book about Unix!

King, C Programming: A Modern Approach. – about C Programming, a little about C++. – required. – readings from the book will be assigned.

Software Tools & Systems Programming -- Goal Use

Unix and Program in C fluently

Software Tools & Systems Programming Topics (1) 

Unix fundamentals – history – files  think

of Windows files

– processes  programs

that are currently running  Unix allows concurrent processes

– shells a

command line interpreter,  think of the Dos prompt window

– basic commands

Topics (2) – emacs  an

editor, suitable for editing C programs.

– utilities  applications

that are popular in the Unix community

– shell programming  shell

is not only a command line interpreter

– regular expressions  make

up a useful notation system to specify text patterns in Unix community  useful for some utilities and perl

– pipes and filters  important

mechanisms in Unix  combine simple commands to perform complex tasks

Software Tools & Systems Programming Topics (3) C


– Syntax: Variables, statements, functions. – I/O: standard I/O, files. – Standard library: standard functions that you can include in your program. – System calls: Communicate with the operating system.

Software Tools & Systems Programming Topics (4)  Software


– Make: helps to organize and build a program in multiple files. – SCCS, RCS: Source Code Control System, Revision Control System. – Lint, Gdb: tools that help you to debug a program.

Software Tools & Systems Programming Topics (5)  C++


– Classes and Objects: think of classes and objects in java – Templates: “uncertain” classes, you can declare classes from a template class by filling appropriate information at the “uncertain” fields. – STL: Standard Template Library.

Software Tools & Systems Programming Topics – conclusion  Unix

fundamentals  C programming  Software tools  C++

Student Evaluation 

four (4) assignments each worth 6% of your final grade – assignments are to be done individually.

one midterm exam held near the end of February. – worth 20% of your final grade.

final exam worth 56% of your final grade.

Assignments (1) 

Assignments involve – shell programming – C and C++ programming – concept questions (non-programming)

Programming assignments must be able to run on the departmental computing equipment – You may develop assignments on your home computer. – It takes time to get it work at a different environment.

Assignments (2) 

All assignments will be available on the course website. – the marks and answers for previous assignments will be there as well – please monitor these pages closely

Assignments are to be done individually. – – – –

It’s a good thing to discuss. Never copy an assignment. Never let others “have a look” at your assignments. Be friendly not to ask to have a look at others’ assignments.

Assignments (3) 

Assignment Submission Policy – Assignments due by 5pm of the deadlines  Hand in at appropriate assignment locker – Late assignments  accepted for up to five days after the deadlines – weekends count as a single day  late penalty of 5% of the available marks per day  NOT based on the time it was printed – Each student has three late coupons  virtual coupons held by TA  each coupon can cover the penalty for one day late  cannot be used to extend the fifth day deadline – You must follow assignment guidelines to ensure full marks – Check the course website for more accurate information

Ethical use of Computing Facilities  Students

are expected to adhere to the Rules of Ethical Conduct to use the computing facilities of the Department: http://www.csd.uwo.ca/policy/index.html  You should receive an email about the rules.

Unix Basic

Unix accounts 

  

You must have an “account” to use a Unix computer. An account has a username and a password. You can only access the resources that are specified by your account information. There is at least one super user account in a system usually named by “administrator”, who has absolute power over the system.

Login your account (1) User name


(2) Password is not displayed. Greetings from Unix.




Login your account (2)

After login 

Change password immediately if you login for the first time


Ready for new command

To make a good password 

A bad password – Birth date. – Telephone number. – Name.

tricks to make a good password – picked letters from a sentence.  I love Unix  Ioenx – a mix of upper and lower cases. – use some non-alphabet characters. – change your password regularly.

a bad password not only harms you – attack is much easier with an account on the computer – ITS and CSD also run password "crackers“ to guess your password by "intelligent brute force"

Log out 

Don’t forget to logout! algernon% exit

algernon% logout

Some basic commands 

who: Who are using the system. algernon% who bma ttyp0 scott tty02 jenny tty03

Aug 11 08:47 Aug 10 11:01 Aug 10 07:21

who am i: Who am I. algernon% who am i bma ttyp0 Aug 11 08:47

Some basic commands 

ls: List the files under current directory

algernon% ls readme cs211.1.ppt

cs211.2.ppt cs211.3.ppt

cs211.ppt.gz make/

cat: Display the content of a file algernon% cat readme Unix is easy! algernon%

notes.zip unix-faq shell/ unix-faq~

Some basic commands 

Ctrl-c: (press and c at the same time) Interrupt the current task. algernon% cat ^c algernon%

netscape: surf the net. algernon% netscape

Some basic commands 

man: See the manual page of a command.

algernon% man cat Reformatting page. Wait... Done User Commands cat(1) NAME cat - concatenate and display files SYNOPSIS cat [ -nbsuvet ] [ file ... ] DESCRIPTION cat reads each file in sequence and writes it on the standard output. Thus: example% cat file prints file on your terminal, and: example% cat file1 file2 >file3 concatenates file1 and file2, and writes the results in file3. If no input file is given, cat reads from the standard input file. OPTIONS--More--(11%)

Try the following commands with man       

cd: change directory to .. more: show the content of a file in pages. cp: copy a file from .. to .. rm: remove a file. mkdir: make a directory. mv: move a file to.. mail: send an email.

View more...


Copyright � 2017 NANOPDF Inc.