- Instructors
- Course Description
- Course Objectives
- Learning Outcomes
- Required Software and Equipment
- Getting a Copy of Code Discussed in Class
- Activities, Evaluation and Assignments
- Detailed Schedule
- Late Work and Attendance
- Statement on Academic Offences
- Support Services
- Useful Links

### Instructors

- Bill Turkel,
*wturkel@uwo.ca*, Lawson Hall 2267, Office Hours: Mondays 2:30-3:30pm or by appointment - Antonio Jimenez-Mavillard (TA),
*ajimene6@uwo.ca*, Arts and Humanities 1R14, Office Hours: Tuesdays 10:30-11:30am or by appointment

### Course Description

This is a first course in programming, intended for students of all backgrounds. No prior experience is necessary. We will be using the *Mathematica* language from Wolfram Research (also known as “the Wolfram Language”). It is a great choice for working with all of the kinds of sources that digital humanists typically care about: images, text, data, code, computer graphics, visualizations, video, electronics, sound and music. Furthermore, *Mathematica* allows you to integrate all of these kinds of sources into powerful and interactive notebooks.

The main idea of the course is that programming can be a way of exploring the kinds of questions that humanists and artists have always been interested in: what is true? what is beautiful? how can we be sure of what we know? what does it mean to be human? what does it mean to be alive? Computer programs can also provide humanists, artists and social scientists with ways of communicating with one another. Plus, it is a lot of fun!

### Course Objectives

- Use programming as a means of expression and a way of communicating with other people
- Explore humanistic topics using the medium of code
- Explore the relevance of basic computational ideas to the arts and humanities
- Learn about designing real-time, interactive applications

### Learning Outcomes

- Gain experience with programming in a multi-paradigm language
- Develop systems for real-time interaction using a variety of artistic media

### Required Software and Equipment

To get the most out of this course, you will need a Windows, Mac or Linux laptop, which you should bring to every class.

You are advised to purchase a student **desktop** license for Wolfram Research′s Mathematica software (also known as the Wolfram Language). A one-semester license is US $45 and a 12-month license costs US $70. For this course you only need a license for the semester, but a permanent academic license is also available for US $115 if you would like to continue to program in *Mathematica* in the future. The software is available for Windows, Mac and Linux computers. If you are unwilling or unable to purchase the software, please do not take this course.

### Getting a Copy of Code Discussed in Class

Before each day’s class, I will post a download link to a *Mathematica* notebook on this webpage. Make sure that you have downloaded a copy to your own computer before class.

### In-class Activities, Evaluation and Assignments

There are two 2-hour sessions per week. For the first hour each day, I will explain and demonstrate the use of particular programming constructs using notebooks that I supply each class. For the second hour, you will practice programming in class and the TA and I will go around and answer questions and provide assistance. At the end of each class you will upload a copy of your day’s notebook to the OWL Site. You have one week to submit each notebook in order to receive a grade for it. If you fail to submit a notebook within that period, you will receive zero for that day’s work. In addition to the in-class work, your grade will also be based on two assignments and two exams. You will not be permitted to use any electronic devices during the examinations.

- In-class hands-on work (30%)
- Two programming assignments (10% each, total 20%)
- In-class mid-term examination (20%)
- Final examination (30%)

**Online Textbook**

For each class, readings will be assigned from an online textbook: Stephen Wolfram, *An Elementary Introduction to the Wolfram Language*. After you do the readings for each week, *make sure to do the exercises*. This way you will be sure you have learned the commands from that lesson. There are answers to all of the exercises on this page.

**OWL Site**

The OWL Site for the course will only be used to submit coursework and assignments. All other course material will be available on this webpage.

### Detailed Schedule

More information will be posted in advance of each class.

- M Jan 04. Introduction to the course.
*Mathematica*notebooks.

Install*Mathematica*(you must have it running before next class).

Readings: Wolfram,*Elementary Introduction*, “What is the Wolfram Language?” and “Practicalities of Using the Wolfram Language“ - W Jan 06. NOTEBOOK 01: The Graphics Command. Circle and disk; line weights, colours and styles; coordinates and scale; image size; building an image; ellipses and rectangles; assigning values to symbols.

Readings: Wolfram,*Elementary Introduction*, “01: Starting Out“ - M Jan 11. NOTEBOOK 02: Relative Coordinates. Absolute vs. relative coordinates; drawing multiple copies; simple functions; points and lines; the Table command.

Readings: Wolfram,*Elementary Introduction*, “02: Introducing Functions“ - W Jan 13. NOTEBOOK 03: Randomness. Random integers; the RandomChoice command; weighting probabilities; mixing random and non-random elements; building a picture from repeated elements; random circles.

ASSIGNMENT 1 handed out.

Readings: Wolfram,*Elementary Introduction*, “03: First Look at Lists“ - M Jan 18. NOTEBOOK 04: Polygons. Specifying points; opacity and transparency; the CirclePoints command; regular polygons; adding text to graphics.

Readings: Wolfram,*Elementary Introduction*, “04: Displaying Lists“ - W Jan 20. NOTEBOOK 05: Transforming Graphics. The Scale command; relative proportions; the Translate command; the Rotate command; tables of graphic transformations.

Readings: Wolfram,*Elementary Introduction*, “05: Operations on Lists“ - M Jan 25. NOTEBOOK 06: Curves. Bézier curves; control points; composite curves; closed curves; line thickness and dashing; edges and faces; the CapForm and JoinForm commands; tables of curves.

Readings: Wolfram,*Elementary Introduction*, “06: Making Tables“ - W Jan 27. NOTEBOOK 07: Colour. RGB colour; the ColorSlider and ColorSetter commands; blending colours; Hue, saturation and brightness / value; parts of lists.

ASSIGNMENT 1 due.

Readings: Wolfram,*Elementary Introduction*, “07: Colors and Styles“ - M Feb 01. NOTEBOOK 08: Tables and Lists. Lists of coordinates; Part; using Table to generate coordinate lists; random coordinates; the order of operations; tables with multiple iterators; iterating by choosing elements from a list.

Readings: Wolfram,*Elementary Introduction*, “08: Basic Graphic Objects“ - W Feb 03. NOTEBOOK 09: The Manipulate Command. Manipulate; simple animation; control variables; adding noise; lists of frames; exporting animations as GIFs; the ListAnimate command.

ASSIGNMENT 1 zero date.

Readings: Wolfram,*Elementary Introduction*, “09: Interactive Manipulation“ - M Feb 08. NOTEBOOK 10: Conditionals. The If and Which conditional expressions; True, False and Undefined; collision detection; measuring Euclidean distance; using conditionals with ListAnimate and Manipulate.

Readings: Wolfram,*Elementary Introduction*, “10: Images“ - W Feb 10. NOTEBOOK 11: Raster Graphics. The Raster command; constructing raster images with Table; turning pixels on and off; grayscale raster images; combining vector and raster graphics.
- M Feb 15. READING WEEK
- W Feb 17. READING WEEK
- M Feb 22. IN-CLASS MIDTERM EXAMINATION. Covers in-class NOTEBOOKS 01-11 and Wolfram,
*Elementary Introduction*, sections 01-10. - W Feb 24. NOTEBOOK 12: Images. Image data; pixel matrixes; channels and colour; image manipulation; filters and effects.

Readings: Wolfram,*Elementary Introduction*, “13: Arrays, or Lists of Lists“ - M Feb 29. NOTEBOOK 13: Layout. Colour rasters; combining digital images with graphics; rows, columns and grids; collages; partitioning and assembling images.

Readings: Wolfram,*Elementary Introduction*, “37: Layout and Display“ - W Mar 02. NOTEBOOK 14: Map and Partition. Tables of coordinate pairs; the Map command; partitioning lists into sublists; overlap and offset; the RandomSample command; randomizing the order of coordinate pairs.

ASSIGNMENT 2 handed out.

Readings: Wolfram,*Elementary Introduction*, “14: Coordinates and Graphics“ - M Mar 07. NOTEBOOK 15: Sound. Representing and playing notes; chords; note duration; MIDI instruments; describing notes with numbers; random music; percussion; importing MIDI files; ListPlay and Play; EmitSound and animation.

DROP DATE

Readings: Wolfram,*Elementary Introduction*, “12: Sound“ - W Mar 09. NOTEBOOK 16: Strings. Strings; reversing and taking elements; conversion to uppercase and lowercase; StringSplit, StringJoin and StringRiffle; functions for capitalizing and camel case; ciphers; StringReplace; CharacterRange; word and letter frequency analysis; sample texts.

Readings: Wolfram,*Elementary Introduction*, “11: Strings and Text“ - M Mar 14. NOTEBOOK 17: Turtle Graphics. Turtles; the AnglePath command; generating paths with ConstantArray; turn angles; Tables of paths; random walks; rectangular and triangular grids; other drawing primitives.

Readings: Wolfram,*Elementary Introduction*, “25: Ways to Apply Functions“ - W Mar 16. CLASS CANCELLED.
- M Mar 21. NOTEBOOK 18: Directing 01. Storyboards; composition; the rule of thirds; the 180 degree rule; fading to and from white and black; editing longer animations using ListAnimate.

Readings: Wolfram,*Elementary Introduction*, “26: Pure Anonymous Functions“ - W Mar 23. NOTEBOOK 19: Directing 02. Dimensions and multiples; scene and viewfinder; panning; zooming; animating credit sequences.

ASSIGNMENT 2 due.

Readings: Wolfram,*Elementary Introduction*, “27: Applying Functions Repeatedly“ - M Mar 28. CLASS CANCELLED.
- W Mar 30. NOTEBOOK 20: Functional Programming.

ASSIGNMENT 2 zero date.

Readings: Wolfram,*Elementary Introduction*, “28: Tests and Conditionals“and “29: More About Pure Functions“ - M Apr 04. NO CLASS.
- W Apr 06. Final Exam Review.

### Late Work and Attendance

Participation in the in-class activities is a key component of this class. I expect you to attend every class and participate in the day’s activities.

In general, I don’t like to penalize late work. Each notebook and assignment will have a suggested due date and, a week later, a zero date. If you hand in your notebook or assignment before the zero date, you will receive full credit for your work. After the zero date, it will be worth nothing.

If you are unable to meet a course requirement due to illness or other serious circumstances, you must provide valid medical or other supporting documentation to the Dean’s office as soon as possible and contact me immediately.

Regarding absence for medical illness, see the Policy on Accommodation for Medical Illness:

https://studentservices.uwo.ca/secure/medical_accommodations_link_for_OOR.pdf

Approval from the Dean’s Office is required for non-medical absences from examinations.

### Statement on Academic Offences

Scholastic offences are taken seriously and students are directed to read the appropriate policy, specifically, the definition of what constitutes a Scholastic Offence, at the following Web site:

http://www.uwo.ca/univsec/pdf/academic_policies/appeals/scholastic_discipline_undergrad.pdf

### Support Services

Students who are in emotional/mental distress should refer to Mental Health@Western

http://www.uwo.ca/uwocom/mentalhealth/

for a complete list of options about how to obtain help.