Presentation is loading. Please wait.

Presentation is loading. Please wait.

COP 3275 Chapter 01 course website: Jonathan C.L. Liu, Ph.D. CISE Department University of Florida.

Similar presentations


Presentation on theme: "COP 3275 Chapter 01 course website: Jonathan C.L. Liu, Ph.D. CISE Department University of Florida."— Presentation transcript:

1 COP 3275 Chapter 01 course website: http://www.cise.ufl.edu/class/cop3275fa11/ Jonathan C.L. Liu, Ph.D. CISE Department University of Florida

2 Software Systems in C Many systems/languages are written in C: Ruby: the standard 1.8.7 implementation is written in C, as a single-pass interpreted language. CPython: often used as a scripting language, but is also used in a wide range of non-scripting contexts Original Google search engine prototype Dr. Liu's (not-so-well-known) video streaming prototype software system :-)

3 Why is C (still) Important? It is still widely used for developing new software, especially where memory and processing power are limited (e.g., embedded systems) Java programs consume 3-4 times as much memory as C programs C programs run about 3-4 times faster than Java programs “An Empirical Comparison of Seven Programming Languages” by L. Prechelt, Computer Practices, pp. 23-29, Oct. 2000.

4 Origins of C (1) C is a by-produce of UNIX, developed at Bell Lab by KenThompson, Dennis Ritchie and others. Thompson designed a small language named “B”. “B” was based on BCPL, a system programming language developed in the mid- 1960s.

5 Origins of C (2) By 1971, Ritchie began to develop an extended version of “B” language. He called the new language “NB” (New B) at first. As the NB language began to diverge more from B, he changed its name to C. The C language was stable enough by 1973 that UNIX could be re-written in C.

6 The Year of 1973 PC/Internet are not invented (totally) yet!! Computers mostly mean “super computers”, “main-frame computers” and “minicomputers” (e.g., DEC PDP-7)

7 Standardizations of C C Became popular during the 1980s, both for UNIX programming and for developing applications for personal computers. K&R C: Described in Kernighan and Ritchie, The C Programming Language, Prentice-Hall, 1978; The de-facto standard ANSI C (ISO C, C89): ANSI standard X3.159-1989 (completed in 1988; formally approved in December 1989); International standard ISO/IEC 9899:1990 C99: International standard ISO/IEC 9899:1999; Incorporates changes from Amendment 1 (1995)

8 C-based Languages C++ includes all the features of C, but adds classes and other features to support object-oriented programming Java is based on C++ and therefore inherits many C features C# is a more recent language derived from C++ and Java Perl has adopted many of the features of C.

9 Strengths of C (1) Efficient: especially fast with the combination of hybrid programming with assembly languages Portable: usually does not requires a significant change when the C programs are ported to different machines (ranging from super-computer to embedded systems)  C compilers are small and easy to be included in any application development environment

10 Strengths of C (2) Powerful: has a large collections of data types and operators.  It is often possible to accomplish quite a bit with just a few lines of C codes Flexible: C imposes very few restrictions on the use of its features Standard Library: almost universal

11 Strengths of C (3) Integrated well with UNIX: including the popular variant known as Linux and MacOS (at least partially)

12 Weaknesses of C (1) Programs can be error-prone  Some mistakes can not be detected by the compilers  “No errors, No warnings” from compilers is just half-way done to finish the programming  Run-time errors are hard to debug  Infinite loop and program crash are possible outcomes

13 Weaknesses of C (2) Programs can be difficult to understand  In old days, programmers only has limited terminal-time to get the job done  Some programmers like to write the programs other people can not understand :-<

14 Weaknesses of C (3) Programs can be difficult to maintain  When the programs get big, they are impossible to prevent complex references Sometimes these programs are called “spaghetti codes” by my graduate students

15 Effective Use of C Learn how to avoid the pitfalls. Use software tools ( lint, debuggers, etc.) to make programs more reliable. Take advantages of existing code libraries. Adopt a sensible set of coding conventions. Avoid “tricks” and overly-complex codes. Stick to the standards (to maximize the portability).

16 What we hope... Learning C can give you greater insight into the features of C++, Java, C#, Perl and other C-based languages (Eventually) learning to balance both performance and functional requirements of the software systems Be interested on programming and join the software industry !!  77 of world's top 100 software companies are in USA (IDC Data 2009) …


Download ppt "COP 3275 Chapter 01 course website: Jonathan C.L. Liu, Ph.D. CISE Department University of Florida."

Similar presentations


Ads by Google