The ProgramByDesign (formerly TeachScheme!) project is an outreach effort of the
PLT research group. The goal is to train college faculty, high school
teacher
A teacher, also called a schoolteacher or formally an educator, is a person who helps students to acquire knowledge, competence, or virtue, via the practice of teaching.
''Informally'' the role of teacher may be taken on by anyone (e.g. w ...
s, and possibly even middle school teachers, in
programming and
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
.
History
Matthias Felleisen and
PLT began the effort in January 1995, one day after the ''
Symposium on Principles of Programming Languages'' (POPL), in response to Felleisen's observations of his
Rice University
William Marsh Rice University, commonly referred to as Rice University, is a Private university, private research university in Houston, Houston, Texas, United States. Established in 1912, the university spans 300 acres.
Rice University comp ...
freshmen students and the algebra
curriculum
In education, a curriculum (; : curriculums or curricula ) is the totality of student experiences that occur in an educational process. The term often refers specifically to a planned sequence of instruction, or to a view of the student's experi ...
of local public schools. His objective was to use
functional programming
In computer science, functional programming is a programming paradigm where programs are constructed by Function application, applying and Function composition (computer science), composing Function (computer science), functions. It is a declarat ...
to make
mathematics
Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
come alive and help inject design knowledge into the introductory
computer science
Computer science is the study of computation, information, and automation. Computer science spans Theoretical computer science, theoretical disciplines (such as algorithms, theory of computation, and information theory) to Applied science, ...
curriculum.
The effort began using a
programming language
A programming language is a system of notation for writing computer programs.
Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
named PLT Scheme which was a version of the language
Scheme, which is a
dialect
A dialect is a Variety (linguistics), variety of language spoken by a particular group of people. This may include dominant and standard language, standardized varieties as well as Vernacular language, vernacular, unwritten, or non-standardize ...
of
Lisp
Lisp (historically LISP, an abbreviation of "list processing") is a family of programming languages with a long history and a distinctive, fully parenthesized Polish notation#Explanation, prefix notation.
Originally specified in the late 1950s, ...
.
The group raised funds from several private
foundations, the
United States Department of Education
The United States Department of Education is a cabinet-level department of the United States government, originating in 1980. The department began operating on May 4, 1980, having been created after the Department of Health, Education, and ...
, and the
National Science Foundation
The U.S. National Science Foundation (NSF) is an Independent agencies of the United States government#Examples of independent agencies, independent agency of the Federal government of the United States, United States federal government that su ...
to create:
* Software appropriate for novices in functional programming
* Courseware: curricula, lecture notes, exercises, mini-projects
* Teacher training camps
Over ten years, it ran several dozen one-week
training workshops for some 550 teachers. In 2005, the TeachScheme! project ran an Anniversary workshop where two dozen teachers presented their work with students.
In 2010, PLT renamed its major programming language from ''PLT Scheme'' to ''
Racket'', and ''DrScheme'' to ''DrRacket''. A little later it renamed ''TeachScheme!'' to ''ProgramByDesign''.
Functional programming, computing, and algebra
The starting point of ProgramByDesign is the observation that students act as computers in
primary school
A primary school (in Ireland, India, the United Kingdom, Australia, New Zealand, Trinidad and Tobago, Jamaica, South Africa, and Singapore), elementary school, or grade school (in North America and the Philippines) is a school for primary ...
courses on arithmetic, and in
middle school
Middle school, also known as intermediate school, junior high school, junior secondary school, or lower secondary school, is an educational stage between primary school and secondary school.
Afghanistan
In Afghanistan, middle school includes g ...
and
secondary school
A secondary school, high school, or senior school, is an institution that provides secondary education. Some secondary schools provide both ''lower secondary education'' (ages 11 to 14) and ''upper secondary education'' (ages 14 to 18), i.e., b ...
courses on
pre-algebra
Pre-algebra is a common name for a course (education), course taught in middle school mathematics in the United States, usually taught in the 6th, 7th, 8th, or 9th grade. The main objective of it is to prepare students for the study of algebra. Us ...
and
algebra
Algebra is a branch of mathematics that deals with abstract systems, known as algebraic structures, and the manipulation of expressions within those systems. It is a generalization of arithmetic that introduces variables and algebraic ope ...
. Teachers program them with rules and run specific problems via exercises. The key is that students execute purely functional programs.
If students can be turned into teachers that create functional programs and run them on computers, this content can be reinforced and show students how writing down mathematics, and functional programs, creates lively animated scenes and even computer games.
Here is an example:
(require 2htdp/universe)
(require 2htdp/image)
;; create an image from the current time
(define (create-image t)
(place-image APPLE 50 (* 1/10 t t) SPACE))
;; names for basic images
(define APPLE (circle 3 "solid" "red"))
(define SPACE (empty-scene 100 100))
(animate create-image)
This short program simulates an apple falling from the top to the bottom of a small white canvas. It consists of three parts:
* A function definition for create-image, which is a one-line function in mathematics, assuming an algebra of images with place-image, circle, and empty-scene have been introduced
* Two abbreviations, where names are equated with some value, just as in "let x be 5" in an algebra text
* One line for running the program
A teacher can explain create-image as easily as any ordinary function in an algebra course. For example, one can first draw a table with two rows and ''n'' columns where each column contains ''t'' at the top and an appropriate image at the bottom. That is, if the numbers increase from left to right, then on each image the red dot is a little bit lower.
Finally the animate line applies the given function, create-image, at the rate of 28 ticks per second to 0, 1, 2, 3, and so on. The resulting images are displayed on the computer monitor at the same pace. That's how movies are made.
The background needed for such an example is little more than knowledge about making movies, about the algebra of pictures in DrRacket (which is like the one for numbers), and minimal pre-algebra. The ProgramByDesign project claims, however, that children would have more fun with such ''live'' functions than with algebraic expressions that count the number of garden tiles
ee Prentice Hall books for grades 8-9
The ProgramByDesign project proposes that both traditional mathematics and science courses could benefit from integrating this form of programming. In contrast to the traditional
BASIC
Basic or BASIC may refer to:
Science and technology
* BASIC, a computer programming language
* Basic (chemistry), having the properties of a base
* Basic access authentication, in HTTP
Entertainment
* Basic (film), ''Basic'' (film), a 2003 film
...
or
Visual Basic Visual Basic is a name for a family of programming languages from Microsoft. It may refer to:
* Visual Basic (.NET), the current version of Visual Basic launched in 2002 which runs on .NET
* Visual Basic (classic), the original Visual Basic suppo ...
blocks in such books, a Racket program consists of as many lines as the mathematics. Moving between the mathematics and the program is thus straightforward. Better still, the meaning of the two are the same. DrRacket's algebraic stepper can illustrate how Racket evaluates the program as if it were a sixth or seventh grade student, step by step, using plain algebra.
Functional Programming, Computing and Design in Programming 101
For the introductory curriculum on programming, the ProgramByDesign project emphasizes that courses should focus on the role of systematic design. Even if students never program again, they should see how helpful a systematic approach to problem solving is. This should help them whether they become programmers or doctors or journalists or photographers. Thus, an introductory course in programming would not be perceived as a place where students learn about the syntax of the currently fashionable (and soon-to-be-obsolete) programming languages, but a place where they can learn something widely applicable.
The key design element of the ProgramByDesign curriculum is the ''design recipe''. It has two dimensions: the process dimension and the data dimension.
Along the process dimension students learn that there are six steps to designing a (simple) program, before they can run it and others can use it:
# Analysing problems with the goal of describing the classes of data that go into the program and come out;
# Reformulating the problem statement as a concise purpose statement
# Creating examples that illustrate the purpose statement and that serve as criteria for success;
# Organizing givens, also called a template or inventory
# Coding
# Creating a test suite from examples to ensure the program works properly on small inputs.
As in
test-driven development, test cases are written ''before'' coding, as part of requirements analysis, rather than afterward as part of testing.
Almost any human endeavour can benefit from clearly understanding the problem, defining criteria for success, analyzing the available resources and givens, developing a proposed solution, and checking it against the criteria, in that order.
For example, a journalist benefits from a similar process: figuring out the major concepts in a story; creating a headline; lining up examples and specific data; organizing the article about the story of the givens and how the story unfolded; writing; and fact checking.
The data dimension can be summarized by the maxim ''the shape of the data determines the shape of the code and tests.'' For example, if the input or output data type has three variants, a test suite should have at least one test case from each variant, and program code will probably contain a three-way conditional (whether explicit or hidden in a polymorphic dispatch). If the input or output data type has three fields, a test suite will have to specify values for those three fields, and program code will have to refer to those three fields. If the input or output data type has a simple ''base case'' and one or more self-referential variants, the test suite should include a base case and one or more non-base cases, and the program code will probably have a base case and one or more self-referential cases, isomorphic to the data type. The technique of
recursion
Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
, rather than being mysterious and scary, is simply applying already-learned methods to a self-referential data type.
Organizing the givens is the task of translating the descriptions of data into a program skeleton. Each form of description determines a specific form of program organization. The transformation is nearly mechanical and helps the students focus on the creative part of the task.
How to Design Programs (HTDP) is the text book authored by the core of the ProgramByDesign group.
A third edition is being prepared.
Programming language choice
The name TeachScheme! appears to imply that this design recipe requires Scheme (now
Racket) and is teachable only with Scheme. Neither conclusion is true. Members of PLT and their trainees have successfully applied the design recipe in
assembly language
In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
,
C,
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
,
ML,
Python, and other programming languages, and with geometry, biology, and poetry courses. The fundamental idea of ProgramByDesign is to stress programming as a design activity. This misconception is one of the reasons for the renaming actions taken in 2010.
To get started, the ProgramByDesign project has produced three essential elements:
* A series of successively more powerful and permissive teaching languages, which are dialects of Racket, matched to the design recipe but with error reporting matched to the student's level (for example, many things that are legal in standard Racket, but which a beginning student doesn't need, are flagged as errors in the Beginning Student level)
* A beginner-friendly, freely-downloadable, pedagogic programming environment, an
integrated development environment
An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
named DrRacket, that enforces these language levels
* A curriculum, encoded mostly in the book How to Design Programs,
which third edition is in the works.
Their choice of Racket reflects their belief that Racket is a good language for a small team with little funding (relative to Java) to validate their conjectures. The PLT group has always tried to ensure that the ideas remain portable to other contexts.
For Java
Over the past few years, the team has also created a second part or phase of the curriculum. It demonstrates how the same design recipe ideas apply to a complex
object-oriented programming
Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impl ...
language, such as
Java
Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
. The recipes are applied initially in a functional paradigm, then introducing object-oriented concepts such as polymorphism and inheritance, and then introducing the imperative methods that are idiomatic in mainstream Java.
A part of the team has a grant from the National Science Foundation to conduct field tests in colleges and high schools.
Professional development
Professional development, also known as professional education, is learning that leads to or emphasizes education in a specific professional career field or builds practical job applicable skills emphasizing Praxis (process), praxis in addition t ...
workshops took place in the summer of 2007, 2008, 2009, and 2010. This part of the project is dubbed ReachJava; the accompanying book is tentatively titled "How to Design Classes."
Bootstrap
In 2006 PLT, at Northeastern University and
Citizen Schools from Boston, made joint efforts to reach out to inner city students with after-school programs. Citizen Schools is a nationwide organization that matches volunteers with after-school program sites and gets them started with scripted curricula. The goal of the effort is to translate the material into a sixth-grade curriculum. The first few tests were a great success in Boston.
The effect on the mathematics courses of this program has encouraged
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
and
Google
Google LLC (, ) is an American multinational corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
to fund a national scale-up effort, developing materials for training teachers and creating sites in Texas, California, and other volunteer cities.
References
External links
*
Racket''How to Design Programs''Bootstrap
{{Lisp programming language
Computer science education
Scheme (programming language)
Java (programming language)