An introduction to programming in C

From Nottinghack Wiki
Revision as of 23:36, 2 May 2012 by Marcus (talk | contribs) (Started drafting the course description and 'syllabus')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Course Description

Rough notes:

The aim of this course is to give you a strong foundation in programming using the C language. It will focus on practical programming skills and problem solving, and will run for several weeks in the evenings and/or on weekends. In the first session you will create a basic C program. and you will learn to develop and test more sophisticated programs in each session of the course. After introducing the basics, we'll help you find a programming project that interests you, and we will give you the support to get it off the ground. By completing this course you will reach a similar level to people completing a good undergraduate degree module in C programming.

The course will start with computer programming, so we can focus on the software instead of the electronics, but the same skills can be used in microcontroller programming. You will learn about the main components of a personal computer, how the computer hardware interprets different types of data, and you will understand distinctions between: hardware, software, and operating system.

You will learn how to design a sequence of actions to accomplish a task (algorithms) and you'll learn some ways to represent complex data in the computer's memory (data structures). You'll also learn how to find and correct mistakes in your program description (debugging).

More than a university course can offer

This course is designed for a hackspace, so it's different from a university course. We have gathered these course materials and exercises so we can teach each other in a structured way. The course tutors will be experienced programmers and we will invite local developers to come and give brief talks, but the focus will be on practical exercises and skills you can use to make awesome things.

Equipment you’ll need

You'll need to bring a computer.

Todo:

  • Clarify minimum specs (especially: operating system versions, and whether CD drives/USB ports will be needed to install the software).

What you need to be familiar with

You will need to know how to use your computer, including how to: install and run software, manage files and folders, edit and save files, and you will need some proficiency in typing.

What we won’t cover

Physical computing and electronics will not be covered by this course, and language theory will not be covered in any depth. The C++ programming language will not be covered.

Suggested preparatory work

Software and costs

All of the software used in this course is GPL software that is freely available.

Course Syllabus

The following list gives an overview of the course content in technical terms. The indentation of the list gives an impression of how the topics will be approached. Do not worry if the terminology below makes little sense to you now, because the course will teach you this jargon.


  • Brief overview of computer systems:
    • Hardware, firmware and software
    • Operating systems
    • Components of modern PCs
    • Fundamental computer architecture


  • Programming concepts and tools:
    • Elements of programming languages (syntax, semantics, libraries)
    • Choosing an appropriate language for an application
    • The pros and cons of the C language
    • toolchains and IDEs
    • Bugs and debugging
    • Data arrays and named locations – This can be illustrated with a spreadsheet program


  • The C language
    • Data types
      • Basic types, e.g. char, int, long, float, double
      • The meaning of void
    • Variables
      • Storage class specifiers: auto, static & external
      • Scope and lifetime of variables
    • Arrays
    • Pointers
    • Operators
      • Arithmetic: add, subtract, multiply …
      • Logical & Boolean: AND, OR, NOT
      • Comparison: equal, greater-than, less-than …
      • Cast
    • The pre-processor
      • Symbolic constants
      • Macros
    • An introduction to ANSI standard functions
      • Input and output of data: printf, scanf, putchar & getchar
      • File access
    • Control structures
      • Conditional expressions: if, if…else, if…else if
      • Loops: for, while, do-while
      • The switch and break statements
      • Nesting
    • Functions (Subroutines)
      • Return values
      • Formal and actual arguments
      • Pass by value
      • Pass by reference
      • Prototyping
    • ASCII strings
      • ASCII character codes
      • Null terminators
    • Processing arrays
      • Passing arrays to functions


  • Advanced concepts:
    • Dynamic data structures: the linked list
    • Defensive programming
    • Abstract data types in C

Course Delivery

Todo:

  • Dates & times
  • Number of places
  • Things to take away: bundle of software, teaching materials, etc.
  • Bios of tutors
  • Prices and payment options
  • Coursework
  • Assessment? (probably not)