Computer programming: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
Line 10: Line 10:


In this wiki, see also:  
In this wiki, see also:  
* [[informatics literacy]]
* Other entries in the category [[:category:programming|programming]]
* Other entries in the category [[:category:programming|programming]]
* [[end-user programming]]
* [[end-user programming]]

Revision as of 18:30, 14 January 2015

Draft

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.

In this wiki, see also:

The very essence of computer programming

What is a simple computer program ?

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.

The mechanics of computer science - a larger picture

Peter Denning (2004) defined several great principles or "windows" in computing curricula and that we reproduce partially in the table below.

WindowCentral ConcernPrincipal Stories (shortened by DKS)
ComputationWhat can be computed and howAlgorithm, data structure, automata, etc
CommunicationSending messages from one point to anotherData transmission, encoding to medium, file compression, cryptography, etc.
CoordinationMultiple entities cooperating toward a single resultHuman-to-human, human-computer (interface, input, output, response time, data visualization); computer-computer, etc.
AutomationPerforming cognitive tasks by computer.Simulation and machine performance of cognitive tasks,philosophical, expertise and expert systems, etc.
RecollectionStoring and retrieving information.Hierarchies of storage, caching, retrieval by name, retrieval by content.

From this table it follows implicitlyimplicitely that programming is not only about algorithms in the traditional sense (e.g. teaching sorting problems).

The domains of computer science

ACM distinguished in 2003 about 30 domains of computer science. Introductory programming may be offered through several of these "domains" combined.

  • algorithms
  • artificial intelligence
  • compilers
  • computational science
  • computer architecture
  • data mining
  • data security
  • data structures
  • databases
  • decision support systems
  • distributed computation
  • e-commerce
  • graphics
  • human computer interaction
  • information retrieval
  • management info systems
  • natural language processing
  • networks
  • operating systems
  • parallel computation
  • programming languages
  • real-time systems
  • robots
  • scientific computation
  • software engineering
  • supercomputers
  • virtual reality
  • vision
  • visualization
  • workflow

The pedagogy of computer programming

(this may be moved to its own page some day ....)

Goals

The Association of Computing Machinery (ACM)

Strategies

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:

  1. 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
  2. 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)
  3. 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).
  4. 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 four not very compatible options for introductory programming teaching.

  1. 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 since some end-user languages are fairly poor in expressive power and/or since other design question (e.g. how to make a good interactive HTML or Word page) can interfere.
  2. 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 and good design.
  3. 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 of students.
  4. Teach students with an ordinary programming language. Drawback is that these languages are either ugly (like the C family of syntax, e.g. C, Perl, PHP, Java) or not up to modern design standards (like C or C++). Also, expressive power of "industry" languages can be fairly weak.

Links

Overviews

Programming languages

rss TIOBE Programming Community Index for August 2011]

Introductory tutorials

Introductory free online textbooks

Using Java
Using Javascript
Using 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

Thoughts

Lists of algorithms

  • The Stony Brook Algorithm Repository is intended to serve as a comprehensive collection of algorithm implementations for over seventy of the most fundamental problems in combinatorial algorithms. The problem taxonomy, implementations, and supporting material are all drawn from my book The Algorithm Design Manual.
  • List of Algorithms (Scriptol) is a complete list of all major algorithms (300), in any domain. The goal is to provide a ready to run program for each one, or a description of the algorithm. Programming languages include Java, JavaScript and PHP, C, C++ either in direct form or generated from a Scriptol source.

Introductory programming courses

  • CS 242 - Computer languages (Standford)

Journals on computer education

(there are several, to do ....)

Programming education

See also microworlds, in particular programming microworlds. These are design to teach and learn programming, e.g. scratch

Bibliography

Pedagogy of computer programming

  • Denning, Peter, Great Principles in Computing Curricula, SIGCSE'04, March 3-7, 2004
  • Denning, Peter. Great Principles of Computing. ACM Communications 46, 11 (Nov 2003)
  • Guzdial, Mark, and Elliot Solloway. "Computer science is more important than calculus: The challenge of living up to our potential." Inroads (ACM SIGCSE Bulletin), June 2003, 5-8.
  • National Educationa Technology Standards for Students (NETS), ISTE, 2007.

Textbooks

(need more, at least two for each popular language ...)

Java

Java is a difficult language and it probably doesn't make sens for non-CS students to learn it...

  • Horstmann, Cay S. (2007). Java Concepts for Java 5 and 6, 5th Edition, Wiley, ISBN 978-0-470-10555-9, Wiley higher ed. site
  • Malik, D.S. and Nair, P.S., Java Programming: From Problem Analysis to Program Design, Thomson, (companion site)
  • Lewis, John and Loftus, William (1999). Java Software Solutions: Foundations of Program Design, Addison Wesley Longman. ISBN 978-0201612714
PHP
  • Lea Chris , Choi Wankyu , Allan Kent, Ganesh Prasad, Chris Ullman (2000), Beginning PHP4, Wrox Press Inc; ISBN 978-0-7645-4364-7. (Suitable for beginners, PHP 4 is outdated, but the 2-3 introductory chapters are still ok)
  • Mercer, Dave W. et al. (2004). Beginning PHP5. Wrox Press, ISBN 978-0-7645-5783-5.
Python
  • Allen Downey (2008). Think Python. How to Think Like a Computer Scientist. Needham, Massachusetts, Green Tea Press PDF (free textbook!)
  • David Ascher and Mark Lutz, Learning Python, O'Reilly
  • Guido Van Rossum (latest version), Python Tutorial (the "official" Python online tutorial)
Scheme

Other interesting books

  • Amy Brown and Greg Wilson (eds.) Lulu.com, The Architecture of Open Source Applications. 2011, 978-1-257-63801-7. Available as free e-book from http://www.aosabook.org/en/. The print version can be bought at Lulu

Language-related resources

See also other entries in the. Stuff below should be provisional and migrate to each language / environment