2008 June 29: Basic Programming Topics
From TC Open Circuit Wiki
Contents |
Presenter
Description
This session aims to give the class a basic overview of programming and the concepts of programming. Though there are hundreds of programming languages out there, and they all have their strengths and weakness and specific syntax, there are many abstract concepts which will help you better program in any language.
Session Details
Programming Language Levels
A computer can actually only understand binary data (ones and zeros), most languages are on different levels depending on how abstracted it becomes from binary. Usually they fall into the following categories:
- Machine Code
- This is binary format and extremely difficult for humans to read.
- Assembly Language
- Low Level languages that does little abstract from binary and is usually used to interact directly with hardware.
- Compiled Language
- A High Level Language that is written is language more close to human language but requires a Compiler to translate into Machine Code.
- Interpreted Language
- A High Level Language. Written in human language, this programming does not require a compiler, but does require an interpreter when run.
Programming Types
There are many different Programming Paradigms (ways of programming). Most languages do one better than others and can fit into the following types of programming languages:
- Event-Driven
- This style is based on input by the user or machine which is an event. This is usually used for low-level programming.
- Functional
- Mostly used for mathematical programming.
- Procedural
- Also see: Imperative Programming
- Object-Oriented
- This consists of containing things into objects which interact.
Basic Syntax
Syntax is basically the structure of a language and how ideas/statements/sentences are formed in a given language. Specifically we will be talking about programming languages and the common syntax.
Variables and Types
Almost all languages use Variables to store data. We also briefly go over Variable Type and how the role it plays in programming as well as Constants. This will also include a overview of common data types.
Scope and Namespace
It is important to understand the scope of variables and statements. We must also be aware of the idea of namespace.
Common Structures of Programming (Control Flow)
- Basic Control Flow
- Assignments (or Operators)
- Incrementing
- See also: Common Operator Notation
- See also: Operator Overloading
- Conditional Statements
- Iteration and Loops
- Sub-Routines
- Classes (Object-Oriented Programming)
Related Topics
Learning a Programming Language
We will go over some resource and simple tips for learning a new language and will go over the concept of Hello World.
Preparation
Please read or do the following before this session.
Resources
Further Resources
- Even if you do not know specific languages, check out this list Language Types of specific languages.
- Variable Type Comparison
- See Also: Syntax Comparison
- Extensive List of Hello World Programs
- Control Flow
- For further advanced topics, see:
- Pointers
- Exception Handling
- Error Handling
- Programming Constructs Topics
- Intro to Programming (hard to read, but good content)
Tasks
- Please note the links in the Session Details above You do not have to read all of the articles outlined on this page, but please familiarize yourself with them.
- Read Get Started with Programming
Post Assignments
- none
