CIS 15 Advanced Programming Techniques Using C - PowerPoint PPT Presentation

1 / 16
About This Presentation
Title:

CIS 15 Advanced Programming Techniques Using C

Description:

CIS 15 - Advanced Programming Techniques Using C. Professor Yedidyah Langsam. 525NE ... Use software tools to make programs more reliable (debuggers, lint, etc. ... – PowerPoint PPT presentation

Number of Views:194
Avg rating:3.0/5.0
Slides: 17
Provided by: professory
Category:

less

Transcript and Presenter's Notes

Title: CIS 15 Advanced Programming Techniques Using C


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

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

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

4
Class Requirements
  • Midterm 30
  • Final 40
  • 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
  • Code one statement per line
  • Use meaningful variables
  • Divide each program into functions
  • Each function should perform a single task

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

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

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

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

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

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

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

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

14
Characteristics of C - 3
  • 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
  • Learn how to avoid C pitfalls
  • Use software tools to make programs more reliable
    (debuggers, lint, etc.)
  • Take advantage of existing code libraries

16
Effective Use of C - 2
  • Adopt a sensible and consistent set of coding
    conventions
  • Avoid tricks and overly complex code
  • Use ANSI C
  • Avoid non-portable features
Write a Comment
User Comments (0)
About PowerShow.com