Computer programming
Definition
Computer programming (often shortened to programming or coding), sometimes considered a branch of applied mathematics, is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. [...] There is an ongoing debate on the extent to which the writing of programs is an art, a craft or an engineering discipline. (Wikipedia, retrieved 13 August 2008).
The purpose of this page (for now) is to:
- provide a few pointers to learning materials
- link to some programming-related pages of this wiki.
See also: programmed instruction (the term programming can refer to other things than computer programming).
The very essence of computer programming
Copyright notice: This section uses excerpts from chapter 1 of How to Think Like a Computer Scientist: Learning with Python by Allen Downey et al. (2002) and is avaible under GNU Free Documentation License
A program is a sequence of instructions that specifies how to perform a computation. The computation might be something mathematical, such as solving a system of equations or finding the roots of a polynomial, but it can also be a symbolic computation, such as searching and replacing text in a document or (strangely enough) compiling a program.
The details look different in different languages, but a few basic instructions appear in just about every language:
- input
- Get data from the keyboard, a file, or some other device.
- output
- Display data on the screen or send data to a file or other device.
- math
- Perform basic mathematical operations like addition and multiplication.
- conditional execution
- Check for certain conditions and execute the appropriate sequence of statements.
- repetition
- Perform some action repeatedly, usually with some variation.
Believe it or not, that's pretty much all there is to it. Every program you've ever used, no matter how complicated, is made up of instructions that look more or less like these. Thus, we can describe programming as the process of breaking a large, complex task into smaller and smaller subtasks until the subtasks are simple enough to be performed with one of these basic instructions.
Teaching programming
Teaching programming - in particular to non-computer science students - remains a challenge today, altough probably less than teaching mathematics. In academics there exist several strategies for teaching initial programming:
- Use an end-user programming environment that can be related to present or futur professional activities, e.g.:
- web-page scripting with JavaScript
- BASIC programming with Office applications
- Use a programming microworld (in particular an environment that is supposed to provide "fun" to learners, e.g. robot programming for engineers, 3D programming in graphic arts)
- Use an educational programming language (some programming microworlds included).
- See the category Educational programming languages at Wikipedia.
- Most well-known examples are Scheme, the Pascal family and Haskel (because these languages also can be used for "real" purposes).
- Use an industry language like Java or C++
Daniel K. Schneider doesn't have any real data about this, but believes that all these strategies do have advantages and disavantages. There are several questions that could/should influence a choice:
- Is the goal to teach just vaguely "about" computer programming or fundamentals ? (i.e. does this course prepare for other courses)
- Is it important that programming knowledge could immediately be applied to relevant real world problems ?
- Is it important that the programming activity is fun ?
- Should programming activities lead to products that can be used in a way (e.g. a game)
- Should the language be an industry language ?
- .....
We hypothesize that there are probably three not so compatible fundamental options
- Teach students with an end-user programming language that is fairly easy to learn and that can be applied immmeditately. The drawback is that some programming concepts can't be taught properly.
- Teach students with a special purpose graphics language that is fun and allows to create interesting objects. Examples are programming microworlds, or well designed 3D or game engines. Disadvantage is maybe that not enough emphasis will be put on teaching of algorithms.
- Teach students with a special language that optimized to teach certain principles (e.g. Pascal for structured programming, Scheme for (more but not only) functional programming. A similar strategy is to use "clean" modern languages like Python. Drawback is that these languages are not very popular outside education and this may hinder motivation.
- Teach students with an ordinary programming language. Drawback is that these languages are either ugly (like C or Java) or not up to modern design standards (like C++).
Links
Overviews
- Programming (Wikipedia).
- Data Structure (Wikipedia).
- Algorithm (Wikipedia)
Introductory tutorials
- Computer programming (Wikibooks). This a short conceptual overview. It also summarized all computer programming books in a table.
- Wikibooks series of three computer science textbooks on algorithm
- Introduction to computer programming, Landofcode.com. A series of short tutorials about fundamental concepts.
Introductory free online textbooks
- Using Java
- Allen Downey, How to Think Like a Computer Scientist - Java Version, Grean Tea Press.
- Using Javascript
- See Javascript links
- Using Python
- Jeffrey Elkner, Allen B. Downey, and Chris Meyers (2008). How to Think Like a Computer Scientist: Learning with Python, 2nd Ed.
- Allen Downey, Jeffrey Elkner and Chris Meyers (2002), How to Think Like a Computer Scientist, Python Version, First edition. Grean Tea Press. There are some translation and derivations from this, e.g. Programmer avec Python
- Allen B. Downey (2008). Think Python, An Introduction to Software Design. Green Tea Press. (This is a revised version of How to Think Like a Computer Scientist).
- Using Scheme
- Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, Shriram Krishnamurthi (2003). How to design programs, MIT Press.
- Hal Abelson, Jerry Sussman's and Julie Sussman's (1984). Structure and Interpretation of Computer Programs. companion site, including an HTML version of the text
Introductory programming courses
- CS 242 - Computer languages (Standford)
- 6.00 Introduction to Computer Science and Programming (MIT Open Courseware, Fall 2007)
- 6.001 Structure and Interpretation of Computer Programs (MIT Open Courseware, Spring 2005).