Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 15 - Advanced Programming Techniques Using C Professor Yedidyah Langsam 525NE 718-951-4161 icq: 10661149 AOL IM: BCCISProf.

Similar presentations


Presentation on theme: "CIS 15 - Advanced Programming Techniques Using C Professor Yedidyah Langsam 525NE 718-951-4161 icq: 10661149 AOL IM: BCCISProf."— Presentation transcript:

1 CIS 15 - Advanced Programming Techniques Using C Professor Yedidyah Langsam 525NE 718-951-4161 langsam@sci.brooklyn.cuny.edu icq: 10661149 AOL IM: BCCISProf http://eilat.sci.brooklyn.cuny.edu

2 Required Texts l C Programming: A Modern Approach, King, K. N., W. W. Norton & Co., 1996 l Learning the UNIX Operating System, 4th ed., Peek, J., et. al., O’Reilly, 1998 l Data Structures Using C and C++, 2nd ed., Langsam, Y., et. al., Prentice-Hall, 1996

3 Supplementary Texts l The C Programming Language, 2nd ed., Kernighan, B. and Ritchie, D., Prentice- Hall, 1988 l Fun with Unix, Landy, S., Brooklyn College Press l CIS 15 Class Notes, Langsam, Y.

4 Class Requirements l Midterm 30% l Final40% l Programs (5-6)30% 5 point penalty for each class day an assignment is late. Programs are to be an individual effort.

5 Structured Programming Rules - 1 l Code one statement per line l Use meaningful variables l Divide each program into functions l Each function should perform a single task

6 Structured Programming Rules - 2 l Use proper documentation l Each function must begin with a comment l Avoid trivial comments - code should read like English l Avoid clever code

7 Structured Programming Rules - 3 l Use proper & consistent indentation (3-5 spaces) l For functions - place { and } on separate lines l For statements - place { on the same line as the statement and line up the } with the keyword

8 Structured Programming Rules - 4 l Comment every } l Skip lines for clarity - but do not double space l Separate all functions

9 Structured Programming Rules - 5 l Use lowercase for all variables and keywords l Use uppercase for all #defined symbolic constants

10 Documentation - 1 Every program must begin with complete documentation l Identification –Name –Instructor –Program number –Date submitted –Class & Section

11 Documentation - 2 l Statement of Problem l Input & Output requirements l Algorithms used l Assumptions used and conditions under which program will fail

12 Characteristics of C - 1 l C is standardized (ANSI C) l C is ubiquitous l C is a low-level language l C is a small language l C is a permissive language

13 Characteristics of C - 2 l Strengths –Efficiency –Portability –Power –Flexibility –Standard Library –Integration with UNIX

14 Characteristics of C - 3 l Weaknesses –C programs can be error prone –C programs can be difficult to understand –C programs can be difficult to modify

15 Effective Use of C - 1 l Learn how to avoid C pitfalls l Use software tools to make programs more reliable (debuggers, lint, etc.) l Take advantage of existing code libraries

16 Effective Use of C - 2 l Adopt a sensible and consistent set of coding conventions l Avoid “tricks” and overly complex code l Use ANSI C l Avoid non-portable features


Download ppt "CIS 15 - Advanced Programming Techniques Using C Professor Yedidyah Langsam 525NE 718-951-4161 icq: 10661149 AOL IM: BCCISProf."

Similar presentations


Ads by Google