Class 1 | Thur 23‑8‑2012 | Quick introductions, what to expect from the class and
labs,
The inside of a computer, partly illustrated by Colossus:
A,
B,
C,
a pentode vacuum tube. Why computers use binary, and what programming them would be like without modern programming languages. | ||||
Class 2 | Tue 28‑8‑2012 | Things we are lucky to be able to avoid: A,
B. tiny program This is why programming libraries are always used. | ||||
Class 3 | Thur 30‑8‑2012 | Defining our own functions, Squares and Triangles and Spirographs. | ||||
Class 4 | Tue 4‑9‑2012 | Small simple flexible functions are the key to reliable programming. The
Spirography program improved. Some rather dull C++ language rules to be aware of. | ||||
Class 5 | Thur 6‑9‑2012 | A program that needs improvement: version 1,
version 2, and
attempted improvement,
successful improvement, and
simplification. Generalising to controlled repetition, counting up and down. Adapted to a temperature conversion table. | ||||
Class 6 | Tue 11‑9‑2012 | Microsoft announcement. Expressions, priorities, types, statements, declarations. The quadratic solving function, introducing named constants. | ||||
Class 7 | Thur 13‑9‑2012 | More complex repetition patterns, and interacting with the user. The converter to binary. | ||||
Class 8 | Tue 18‑9‑2012 | Non-void functions:
Converter,
Big unreadable quadratic tester,
Much better version. The circular factorial definition, and how it works. | ||||
Class 9 | Thur 20‑9‑2012 | Big complicated functions are bad. Little simple functions work together to
perform big complicated tasks reliably. What would this odd function do? What about these ones? The fractal star that used to be a triangle. | ||||
Class 10 | Tue 25‑9‑2012 |
How to make bees,
what a caprimulgus does at night. Brownian motion and the while loop. The start of something big, and the complete version. | ||||
Class 11 | Thur 27‑9‑2012 | Prototypes, and a tidied-up and structured number speaker. Rabbit unix accounts, Basic unix commands. | ||||
Class 12 | Tue 2‑10‑2012 | an old test. More unixing. | ||||
Class 13 | Thur 4‑10‑2012 | another old test. The guessing game, a logarithmic algorithm, and finding square roots the same way. | ||||
Class 14 | Tue 9‑10‑2012 | Some more test preparation. Divide and Conquer: cut your enemy clean in half. square root function for integers fixed, and another square root function that finds the closest double to the square root of X in 50-ish steps. | ||||
Class 15 | Thur 11‑10‑2012 | Test day. | ||||
Class 16 | Tue 16‑10‑2012 | Variables: simple patterns, and the fibonacci experiments. | ||||
Class 17 | Thur 18‑10‑2012 | The ratio of successive terms in the fibonacci sequence
rapidly converges on (1+sqrt(5))/2, which is the ratio of width to length
of the architectural golden rectangle. Loops within loops, and introducing the update operators +=, *=, /=, etc, and the "for loop". When used properly, they can simplify and clarify a program. | ||||
Class 18 | Tue 23‑10‑2012 | Arrays. Strings are objects (samples: one, two, three). Files, ifstreams and ofstreams are objects too (samples: writing, reading). | ||||
Class 19 | Thur 25‑10‑2012 | The dangers of over-confidence. Do loops, break, continue, and the irritatingly ill-conceived switch statement. The badly designed program, and how good programming habits could have saved us. | ||||
Class 20 | Tue 30‑10‑2012 | Reference parameters, and how slow sorting could be. | ||||
Class 21 | Thur 1‑11‑2012 | Introducing objects and physical simulations: The boy and the bull. | ||||
Class 22 | Tue 6‑11‑2012 | Announcement. Finishing the simulation, Trees that move, and a dinosaur. Beginning a molecular weight calculator, the data file. | ||||
Class 23 | Thur 8‑11‑2012 | Lots of objects working together and simplifying design: more
of the chemistry calculator. At the moment it processes a formula correctly, but then says "no such element" a few hundred times and has a segmentation fault. See if you can work out a good clean way of fixing that, and think about how to deal with numbers as in H2O, CaSO4, or even Mg(OH)2. | ||||
Class 24 | Tue 13‑11‑2012 | Practice with arrays and files. "Bubble sort": it's slow but it's short. | ||||
Class 25 | Thur 15‑11‑2012 | Test Day. Here is last year's second test. And here's another older one. | ||||
Class 26 | Tue 20‑11‑2012 | Two dimensional arrays. Calculating with complex numbers. | ||||
Class 27 | Tue 27‑11‑2012 | The complex number fractal explorer (tidied up a bit). | ||||
Class 28 | Thur 29‑11‑2012 | What we learned from the test. |
Lab Setup Guide Library downloads and documentation | ||||||||
Lab 1 | 28-30 Aug | (pdf) | Using visual C++ to run programs; drawing stars and stick figures. | |||||
Lab 2 | 4-6 Sep | (pdf) | Divide and conquer: building big programs from little functions. | |||||
Lab 3 | 11-13 Sep | (pdf) | Controlling repetition in programs. | |||||
Lab 4 | 18-20 Sep | (pdf) | A video game: exploding the enemy with a cannon (assistance with the drawing). | |||||
Lab 5 | 25-27 Sep | (pdf) | A real-time animated clock application. | |||||
Lab 6 | 2-4 Oct | (pdf) | Generating calendars and using Unix. | |||||
Lab 7 | 9-11 Oct | (pdf) | A randomly generated Happy Street Scene. | |||||
Lab 8 | 16-18 Oct | (pdf) | An interactive desk calculator. | |||||
Lab 9 | 23-25 Oct | (pdf) | Meteorological data processing and visualisation. the data files | |||||
Lab 10 | 30 Oct - 1 Nov | (pdf) | Interactive map of the United States. Data files: state outlines, capitals. | |||||
Lab 11 | 6-8 Nov | (pdf) | Database programming under Unix. Data files: database1.txt, 2, 35, 10, 20. The special timing function. | |||||
Lab 12 | 13-15 Nov | (pdf) | A robot seaching for treasure in a maze. sample maze | |||||
Lab 13 | 27-29 Nov | (pdf) | An automatic robot: he turned into a video game. |