Computer programming

From EduTechWiki - Reading time: 9 min

Draft

Definition[edit | edit source]

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[edit | edit source]

What is a simple computer program ?[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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

Goals[edit | edit source]

The Association of Computing Machinery (ACM) defined both specific and general learning goals for various degrees in computer science and related areas. E.g. in their Curriculum Guidelines for Undergraduate Programs in Computer Science, characteristics of graduates are defined as follows:

  • Technical understanding of computer science (as defined by a core body of knowledge in various subdisciplines)
  • Familiarity with common themes and principles
  • Appreciation of the interplay between theory and practice
  • System-level perspective
  • Problem solving skills
  • Project experience
  • Commitment to life-long learning
  • Commitment to professional responsibility
  • Communication and organizational skills
  • Awareness of the broad applicability of computing
  • Appreciation of domain-specific knowledge

Again, for undergraduate computer science students, the core topics are the following:

  • Algorithms and Complexity (AL)
  • Architecture and Organization (AR)
  • Computational Science (CN)
  • Discrete Structures (DS)
  • Graphics and Visualization (GV)
  • Human-Computer Interaction (HCI)
  • Information Assurance and Security (IAS)
  • Information Management (IM)
  • Intelligent Systems (IS)
  • Networking and Communication (NC)
  • Operating Systems (OS)
  • Platform-Based Development (PBD)
  • Parallel and Distributed Computing (PD)
  • Programming Languages (PL)
  • Software Development Fundamentals (SDF)
  • Software Engineering (SE)
  • Systems Fundamentals (SF)
  • Social Issues and Professional Practice (SP)

Strategies[edit | edit source]

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
    • Game programming, e.g. Programe teaches C# programming with unity (in German)
  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).
  4. Use an industry language like Java, C++, or Python

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. Drawback is that these languages are not very popular outside education and this may hinder motivation of students. To counter this drawback, a similar strategy is to use "clean" modern languages like Python.
  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[edit | edit source]

Overviews[edit | edit source]

Popularity of programming languages[edit | edit source]

As of 2019, there are hundreds of programming languages, but only about 20 are somewhat popular, since “One language may occupy the greater number of programmer hours, a different one have more lines of code, a third may utilize the most CPU time, and so on. Some languages are very popular for particular kinds of applications.” (Wikpedia).

Measuring programming language popularity is quite a difficult task and results are widely different according to what is measured (lines of code, time spent, etc.) and how it is measured.

More information:

Programming languages suitable for teaching to beginners and non computer scientists[edit | edit source]

Almost any programming language is suitable for teaching. The question is how to define "suitability" (see above). In EduTechWiki, so far, we neither got much programming documentation nor documentation on how to use various environments. Below, we list a few languages that do have potential to teach programming to non-computer science students and for various, very different reasons. For example:

Language Reasons for using it in education
ActionScript Highly motivating and easy. It marries computer animation with programming in a single environment. However it has lost the battle and is being replaced by JavaScript.
JavaScript (see our Tutorials in french) It runs anywhere, no typing and includes powerful "fun" libraries.
OpenSCAD Creating 3D objects is fun.
Python because it is a clean language
Scratch made for education. Allows to learn programming without suffering through initial syntax problems.
Squeak Create applications
PHP most open source portal software is written in PHP
fr:R (in french) statistics and data mining is important

See also

Introductory tutorials[edit | edit source]

  • Programming Wiki (in German). Wiki that includes several online interpreters (JavaScript, SQL, Pascal, Java, etc.), tutorials, exercises, etc.

Introductory free online textbooks[edit | edit source]

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[edit | edit source]

Lists of algorithms[edit | edit source]

  • 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[edit | edit source]

  • CS 242 - Computer languages (Standford)

Journals on computer education[edit | edit source]

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

Magazines for teachers[edit | edit source]

Programming education[edit | edit source]

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

  • IsPython.com. D.White et al. Various resources for computer education.

Bibliography[edit | edit source]

Pedagogy of computer programming[edit | edit source]

  • 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[edit | edit source]

(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[edit | edit source]

  • 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[edit | edit source]

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


Licensed under CC BY-SA 3.0 | Source: https://edutechwiki.unige.ch/en/Computer_programming
412 views |
↧ Download this article as ZWI file
Encyclosphere.org EncycloReader is supported by the EncyclosphereKSF