Академический Документы
Профессиональный Документы
Культура Документы
7/24/2012
Introduction
Who am I?
Dr David K Wood Australian Centre for Field Robotics (ACFR) Room: ACFR field Lab, Ground Floor, EE Building Availability: Limited outside of lectures. Phone: 90366398 Email: d.wood@acfr.usyd.edu.au
NO LAB CHANGES!
If you really need something changed, come see me after the lecture
7/24/2012
Introduction
Tutors
Lachlan McCalman l.mccalman@acfr.usyd.edu.au Nasir Ahsan a.nasir@acfr.usyd.edu.au Me - Wednesday d.wood@acfr.usyd.edu.au
7/24/2012
Introduction
Textbooks
Prescribed Textbooks: Bailey, T. An Introductory Course on C Programming and Software Design
This text is by an earlier lecturer for this course, and still follows the lecture schedule quite well. It is available online at:
www-personal.acfr.usyd.edu.au/tbailey/ctext
Deitel, H.M. and Deitel, P.J., C: How to Program. 3rd Ed.
An alternative introductory textbook. Very simple. Many code examples.
Kernighan, B.W. & Ritchie, D.M. The C Programming Language. 2nd Ed.
The textbook you will probably turn to as you gain experience. Written by the creator of C (Ritchie), it is authoritative and complete.
7/24/2012
Introduction
Other Resources
It is highly recommended to get a compiler and development environment for home Visual Studio
Real version is large, expensive and under-utilised Other versions are insecure and unreliable! Express Edition is FREE from the MS website, and has the same functionality as the laboratory machines.
7/24/2012
Introduction
Course Information
Course material accessible from AMME website.
www.aeromech.usyd.edu.au/MTRX1702/Course_Material/
7/24/2012
Introduction
Class Diversity
I expect a wide range of diversity regarding familiarity with programming concepts and C.
Some will be quite proficient. Some will be complete novices.
Remember that many aspects of programming will become clearer by looking at example code and doing the labs.
7/24/2012
Introduction
Feedback
Please provide feedback
Problems with course material or presentation Problems with labs Constructive criticism (or praise)
Do so by sending me an email If you want something fixed or desire some modification of the course, let me know sooner rather than later
7/24/2012
Introduction
10
My Expectations
By undertaking this subject, the student is committing to: Learn the subject, not just memorize notes. Attend all lectures, with the aim of learning and understanding, not just note taking. Attend all laboratory sessions, with the aim of maximizing your understanding of the course material. Study this topic for at least 1 hour per week outside of allocated class time. Being familiar with, and adhering to the Universitys policies, in particular the policy on academic honesty.
7/24/2012 Introduction 11
7/24/2012
Introduction
12
How to Do Well
Attend lectures and labs. Read the lecture notes. Read ahead and come to class prepared. Read the lab sheet in advance.
Work through lab questions in the allotted time. Ask questions if you dont understand. Keep up to date.
Assessment
Lab Attendance (5%) Two Assignments (50%) Two-hour Exam (45%) Each week (starting in Week 2) lab-work is given.
Attending and participating in labs is compulsory. Understanding code and writing programs is the only way to learn to program. This is not a course that you can cram in stu-vac.
Experiment with code-modules during labs. Use the debugger. Work through the labs and lectures, and the exam will be simple!
7/24/2012
Introduction
14
Why Learn C?
After all, C is over 30 years old. There are other newer languages now. 1. 2. 3. 4. 5. 6. C will be the language used in several later courses. C compilers exist for almost all platforms, so your code can be readily ported and run anywhere. C is high-level, yet close to the machine. So, it is commonly used in embedded programming. C remains the language of choice in many other areas also. For example, systems programming, graphics, numerics, real-time control, etc. Thus, it means real jobs. There exists a huge base of existing C code that must be maintained. Again, real jobs. There exists a huge number of open-source libraries for C. This code is often of excellent quality and can be used directly in your project.
Introduction 15
7/24/2012
Course Objectives
Introduce the C programming language as a practical programming tool. Introduce the basic concepts of software design.
Learn to design, code, and debug complete C programs. Learn how to decompose large problems into manageable systems of modules. Design for correctness, flexibility, extensibility, maintainability.
7/24/2012
Introduction
16
C Language Overview
General purpose language: used for writing software in many different domains (compilers, graphics, games, embedded systems, etc) A small language - 32 keywords With a small level of experience, can expect to know, and regularly use, the entire language. Provides modern high-level control constructs: decisions, loops, functions. Provides low-level capabilities: manipulate characters (bytes) and addresses.
7/24/2012
Introduction
19
C comes with a standard library that provides a collection of commonly used functions (145 of them). All C programs are composed of functions, and we will cover functions extensively in this course.
7/24/2012
Introduction
20
#include <stdio.h> int main(void) { printf("Hello, world!\n"); /* Print Hello World to screen */ return 0; /* Return Success */ }
7/24/2012
Introduction
21
7/24/2012
Introduction
22
Instead of executing our code within a scripting engine, we compile to an executable. Two major savings:
1. Efficiency Compile happens before runtime 2. Portability No longer need engine
7/24/2012
Introduction
24
Get rid of the operating system altogether My program directly interfaces to the hardware and thus to the real world! Common in embedded systems. MTRX2700, MTRX3700, MTRX4730 and your own hobby work
7/24/2012 Introduction 25
Homework
Get a copy of the lecture notes off the web. Review chapters 1 and 2 of lecture notes. (Today's lecture and next lecture) Decide on and purchase a textbook. Look into getting some sort of development environment on a home/personal computer. Lecture notes contain many small code snippets. These might be more understandable as complete working programs, which, for Chapters 1 3, can be found on the textbook webpage.
7/24/2012 Introduction 26