General Information
Instructor:
Geoffrey Towell
259 Park Science Building
526-5064
gtowell at brynmawr dot edu
http://cs.brynmawr.edu/~gtowell
Instructor:
Lecture Hours | Monday / Thursday 1:10 - 2:30 |
Room | Remote |
---|
Lab | Monday 2:40 - 4:00 |
Office Hours: | Tuesday 2-3pm, Thursday 3-4pm. Or by appointment
In the spring of 2021 all office hours will be by zoom. |
Zoom | Meeting code: 232 840 6920. Password: given in class. Also available on course Moodle page |
Course Description: |
This is a course in systems programming using the C programming language in the Linux environment. C undergirds the world of modern computers and runs on anything. Learning C will also teach you how a computer really works under the hood and it will power your knowledge of programming and system building on any platform.
A secondary goal of this course is to give you a chance to learn some fundamental technologies in widespread use. As a computer scientist, you will be expected to know about Makefiles, version control, and command-line execution in the Linux environment.
By the end of this course, you will be able to…
- Write standalone programs in the C programming language
- Understand computer memory management and pointers
- Work with linked structures (lists, trees, and graphs)
- Use the Linux command line
- Become familiar with programming tools and environment in Linux
During the course, you will…
- Code lots of C programs
- Setup and use Make files, and other Linux tools
- Learn how to debug
- Learn the use of lots of Unix utilities
|
Computer Lab | Park 231
Instructions for using the lab computers Remote accessable lab computer status Do not use the computers in Park 230, they are on a different file system |
Text
C Programming: A Modern Approach
by K. N. King (2nd edition). W. W. Norton & Company, 2008. (Available at the campus bookstore.)
The Linux Command Line: A Complete Introduction by William E. Shotts, Jr. No Starch Press, 2012. May be available at the campus bookstore.
Free download through both the Bryn Mawr and Haverford libraries.
Head First C
by David Griffiths and Dawn Griffiths. O’Reilly Media, 2012. This is an alternative introduction to C that may be helpful to you. Readings will not be assigned from it. Do not purchase unless you want another book on C programming.
The C Programming Language
by Brian W. Kernighan and Dennis M. Ritchie (2nd edition). Prentice Hall, 1988. The first edition of this book is what introduced C to the world. Do not purchase this book unless you'd like a souvenir in your collection of CS books. (This is the book from which I learned C programmingß.)
Important Dates
- Feb 15, First lecture
- Mar 15, First Midterm
- Apr 12, Second Midterm
- Exam period, Final Exam
Programming Environment
The programming environments and tolls we will be using ar all Unix based. It is certainly possible to set up a C programming enviroments (e.g., compiler) on you own machine (be it either Windows or Mac). However, some tools we will discuss will not be available (at least in the ways in which we discuss them). Hence, it will probably be easiest if you always compile and run your programs on the CS department Unix machines.
To that end I encourage you to read and follow these directions. The will set up an environment identical to the one which I will be using in lectures this semester. It is also the system I use for all of my C code development.
Observations about issues with using VSC for C development workarround suggestions.
Assignments
There will 10 (ish) weekly homework assignments. Homework will be electronically submitted. All work must be turned in by the due date or it will not be considered.
Work submitted 24 or more hours in advance of the due date will receive a 3 percent bonus.
In addition, you have 2 (two) 24 late passes to be used at your discretion during the semester. To use a late pass you merely have to send me an email saying that you intend to use a late pass. You do not need permission, this is merely to inform me that you are using a late pass. This email MUST be sent prior to the due date. (I have received email with time stamps less than one minute before the due date.) I repeat, approval is automatic. You can use both late passes on a single assignment. These late passes are intended to give you a little scheduling flexibility. For major issues (requiring more than 24 hours), talk to me. For such issues, you must talk to be more than 24 hours prior to the due date.
Homework assignments are intended to take under 10 hours to complete. That said, some people will require far more that that on some assignments. I strongly encourage everyone to start early. Work some on the assignment. Then go get something to eat, take a nap, etc. Often with programming, getting away from the problem for a while is important.
Despite my best efforts, homeworks may have sections that are not quite correct. If you find one, let me know. If I agree that there issue is an issue and you have told me of the issue at least 48 hours prior to the due date then I will give bonus points as follows:
3 points for the first issue reported
2 points for the second issue reported
1 point for the third issue reported
Ordering is based on date of email recipt. One bonus per person per assignment.
All assignments must abide by the following standards
Posted code samples will -- almost always -- adhere to these standards. (Code shown in class may not so that it can fit on screens.)
TA
Anna Goncharova will be the TA for this class. She will be available to help 6-8pm Tuesday and 10-12am Wednesday. All assignments will be due Wednesday evenings. Talk to her, she is there to help.
All assignments must be accompanied by a README file. See the file for a description of the expected contents.
Labs
Rather than having a single lab per week, lab will usually consist of small assignments after every class. These assignments are capped at 45 minutes. That is, if you find you have spent more than 45 minutes, stop. During the scheduled lab period I will be available, either in the lab or in my office. Unlike homeworks in which the work must be your own, you are encouraged to closely cooperate with others in the class. You may even submit a single answer for a group. Lab assignments will not be graded or returned. I will look to see that a reasonable answer has been submitted, that is all. I will let you know if I do not think your answer was NOT reasonable. All lab work will be submitted via email to gtowell246@cs.brynmawr.edu. Please use this email address only for lab work. (If you continue to submit to gtowell380 that is fine.) Lab work is due prior to the start of the next class.
For the most part, lab assignments will be given in the lecture notes. While not required, I encourage you to work on the lab assignments immediately after class. I will almost always be available to help at that time.
- Lab 0: set up your computing enviroment. Follow these directions. When complete, send your public key to gtowell246@cs.brynmawr.edu
Lectures
I will not record classes. That said, if you have issues with attending a class, let me know.
I intend to post lecture notes here before every class. If you do not see them, tell me.
-
Feb 15 -- Introduction to C and Unix
-
Feb 18 -- IO
-
Feb 22 -- UNIX IO redirection, printing, ints and chars
-
Feb 25 -- Unix links, C Arrays and strings
-
March 1 -- files, sort; nD arrays, .h files
-
march 4 -- Grep and pointers
-
March 8 -- Unix History; Files, Pointers and makefiles
-
March 11 -- Review
-
March 18 -- Permissions and Recursion
-
March 22: Unix Processes; C Structs
-
March 25: Unix Scripts, more structs
-
April 1 -- gzip and tar; more with pointers
- Lecture notes NO LAB
- reader0
- reader0b
- reader1
- reader1a
- reader2dynamically opens then closes
- reader3Proceduralized
- Weather with dynamic memory allocation, onstructors and descructors main,temp.c,,util.c,util.h,weather,weather.h,weather time,time.h,wind.c,wind.h
-
April 5 -- shell scripts; more with pointers
- Lecture notes Lab on slide 20. I have updated the pdf with the lab as I specified it at the end of class
- Weather with dynamic memory allocation, onstructors and descructors main,temp.c,,util.c,util.h,weather,weather.h,weather time,time.h,wind.c,wind.h
- faculty
- Double linked list h c
- Queue h c makefile
-
April 8: Shell loops. Queues and issues
- Lecture Notes Lab on slide 9
- Queue h c makefile
- Shell looping simple while, for on list, for on range, C like for, total size, linking.
- Splitting issue 1b.h, a.h, b.c
- Splitting Issue 2s1.c, s1.h, s2.c
- Splitting Issue 3m1.c, m1.h, m2.c, m2.h,
-
April 15 -- GDB, Garbage, Unions, void *
-
April 19, -- UNIX:customization, C:function pointers
-
April 22 -- Unix: scripts with lots of command line params; C -- structures getting classy
-
April 26: Unix:shell script conclusions C: Huffman coding, writing binary
-
Apr 29 -- UNIX: networking C: Bits
-
May 3 -- Going Parallel
-
May 6 -- String search
-
May 10 -- Closing Remarks
Course Policies
Communication
Attendance and active participation are
expected in every class. Participation includes asking questions,
contributing answers, proposing ideas, and providing constructive
comments.
Please
stay in touch with me, particularly if you feel stuck on a topic
or assignment and can't figure out how to proceed. Often a quick
e-mail, or face-to-face, or zoom conference can reveal solutions
to problems and generate renewed creative and scholarly energy. It
is essential that you begin assignments early.
Grading
Grades will be awarded based on the number of points earned and according to the
percentage breakdowns shown.
Homework | 45% |
Lab | 5% |
Midterms (2) | 32% |
Final exam | 18% |
|
Mid-terms will be in class (or possibly take-home). If take-home then the time to complete will be no more than 2 hours. In-class exams will be closed book, closed notes, open minds. Take home exams will be open everything except for other people.
Incomplete grades will be given only for verifiable medical
illness or other such dire circumstances.
ALL work submitted for grading should be entirely YOUR OWN (except for labs). Sharing of programs, code snippets, etc. is not permitted under ANY circumstances. That said, I encourage you to discuss assignments at an algorithmic level with other students.
Links
Learning Accommodations
Students requesting accommodations in this course because of the impact of disability
are encouraged to meet with me privately early in the semester with a verification letter.
Students not yet approved to receive accommodations should also contact Deb Alder,
Coordinator of Accessibility Services, at 610-526-7351 in Guild Hall, as soon as possible,
to verify their eligibility for reasonable accommodations. Early contact will help avoid
unnecessary inconvenience and delays.
This class may be recorded.
Creating a Welcoming Environment
All members of the Instruction Staff are dedicated to the cause of improving diversity, equity, and inclusion in the field of computing, and to supporting the wellness and mental health of our students.
Diversity and Inclusion
It is essential that all members of the course community – the instructor, TAs, and students – work together to create a supportive, inclusive environment that welcomes all students, regardless of their race, ethnicity, gender identity, sexuality, or socioeconomic status. All participants in this course deserve to and should expect to be treated with respect by other members of the community.
Class meetings, lab sessions, office hours, and group working time should be spaces where everyone feels welcome and included. In order to foster a welcoming environment, students of this course are expected to: exercise consideration and respect in their speech and actions; attempt collaboration and consideration, including listening to opposing perspectives and authentically and respectfully raising concerns, before conflict; refrain from demeaning, discriminatory, or harassing behavior and speech.
Wellness
Additionally, your mental health and wellness are of utmost importance to the course Instruction Staff, if not the College as a whole. All members of the instruction staff will be happy to chat or just to listen if you need someone to talk to, even if it’s not specifically about this course.
If you or someone you know is in distress and urgently needs to speak with someone, please do not hesitate to contact BMC Counseling Serices: 610-526-7360 (610-526-7778 nights and weekends). If you are uncomfortable reaching out to Counseling Services, any member of the Instruction Staff will be happy to contact them on your behalf.
We understand that student life can be extremely difficult, both mentally and emotionally. If you are living with mental health issues such as anxiety, depression, ADHD, or other conditions that may affect you this semester, you are encouraged to discuss these with the Instructor. Although the details are up to you to disclose, the Instruction Staff will do their best to support and accommodate you in order to ensure that you can succeed this course while staying healthy.
Created on January 2021. Subject to constant revision.