An introduction to programming in C: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
Marcus (talk | contribs)
Started drafting the course description and 'syllabus'
 
Marcus (talk | contribs)
Added suggestions for preparatory work. Thinking about breaking this course into 10 sessions.
Line 1: Line 1:
{{ambox|text=This is a very early work in progress!}}
{{ambox|text=This is a very early work in progress!}}


== Course Description ==
== Course description ==
<big>Rough notes:</big>
<big>Rough notes:</big>


Line 29: Line 29:


== What you need to be familiar with ==
== 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.
If you need any help to prepare for the course, you are welcome to approach us on an [[open hack night]] or ask on our [[mailing list]].  You will need basic proficiency in typing and will need to know how to use your computer, including how to: install and run software, edit and save text files, and manage files and directories.  No previous programming experience will be needed though.
 
== Suggested preparatory work ==
# Familiarise yourself with file management on your computer.  It's important to know about files, directories, and file extensions.
#* If you use GNU/Linux or OSX, then familiarise yourself with your program of choice: Nautilus, Thunar, Finder or the command shell.
#* If you have to use Microsoft Windows, make sure you are able to use [[wikipedia:Windows Explorer|Windows Explorer]] (and see [http://www.mediacollege.com/microsoft/windows/extension-change.html]).
# Make sure your computer is working reliably and that you have any passwords needed to install programs on the computer.


== What we won’t cover ==
== 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.
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 ==
== Software and costs ==
All of the software used in this course is GPL software that is freely available.
All of the software used in this course is GPL software that is freely available.


== Course Syllabus ==
== 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.
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.


Line 102: Line 106:
** Abstract data types in C
** Abstract data types in C


== Course Delivery ==
== Course materials ==
* [[/Information for tutors|Information for tutors]]
* An introductory weekend event could offer some initial taster sessions:
** [[/Sessions#Session 1|Session 1]]
** [[/Sessions#Session 2|Session 2]]
* Additional sessions could be run in the evenings for 8-10 weeks:
** [[/Sessions#Session 3|Session 3]]
** [[/Sessions#Session 4|Session 4]]
** [[/Sessions#Session 5|Session 5]]
** [[/Sessions#Session 6|Session 6]]
** [[/Sessions#Session 7|Session 7]]
** [[/Sessions#Session 8|Session 8]]
** [[/Sessions#Session 9|Session 9]]
** [[/Sessions#Session 10|Session 10]]
 
== Course delivery ==
Todo:
Todo:
* Dates & times
* Dates & times

Revision as of 15:15, 4 May 2012

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

If you need any help to prepare for the course, you are welcome to approach us on an open hack night or ask on our mailing list. You will need basic proficiency in typing and will need to know how to use your computer, including how to: install and run software, edit and save text files, and manage files and directories. No previous programming experience will be needed though.

Suggested preparatory work

  1. Familiarise yourself with file management on your computer. It's important to know about files, directories, and file extensions.
    • If you use GNU/Linux or OSX, then familiarise yourself with your program of choice: Nautilus, Thunar, Finder or the command shell.
    • If you have to use Microsoft Windows, make sure you are able to use Windows Explorer (and see [1]).
  2. Make sure your computer is working reliably and that you have any passwords needed to install programs on the computer.

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.

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 materials

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)