Systematic Program Design

Systematic Program Design: TA Solver Project

Problem 1 was straight-forward, since it's basically the same problem as max-exits-to from the problem bank of this week that I had already solved. However, I adapted it to operate on all nodes of a network, that way we can take care of disconnected components. Going through the 5 step …



Systematic Program Design: Week 11 (Final Week) - Graphs

Graphs Module Many forms of information naturally organize themselves into trees of various kinds. But what about transit maps, wiring diagrams, the world wide web or even secret underground passages. Most of these have one or two key properties that make them be graphs instead of trees. One property is …



Systematic Program Design: Week 10 - Accumulators

Accumulators Module The rules we have been using to generate structural recursion templates are very powerful. They make it very easy to write functions that traverse complex data collecting information at every place in that data. The power of these rules is highlighted by our ability to design abstract fold …



Systematic Program Design: Week 9b - Search

Search Module In this module, we will expand on generative recursion and work on search problems, which are a category of problem solving that can be solved by generating the space of all possible paths from a given state and traversing that space until a solution is found. We will …



Systematic Program Design: Week 9a - Generative Recursion

Generative Recursion Module Generative recursion is in many ways similar to structural recursion: a function calls itself recursively (or several functions call themselves in mutual recursion). For the recursion to terminate, each recursive call must receive an argument that is in some way "closer to the base case". That is …



Systematic Program Design: Week 8 - Abstraction

Abstraction Module In this module we look another techniques for improving the structure of code. Most of the problems in this module involve refactoring existing programs -- so there's relatively little new coding to do. But that doesn't mean you won't be designing programs! One of the things that separates good …



Systematic Program Design: Week 7b - Local

In this module we look at a new technique for improving the structure of code. Most of the problems in this module involve refactoring existing programs -- so there's relatively little new coding to do. But that doesn't mean you won't be designing programs! One of the things that separates good …



Systematic Program Design: Week 7a - Two One-of Types

Module Overview Two One-Of Types In this module we will learn to design functions consuming two arguments that have one-of types. In order to do this, we will develop a new model of our code, the cross product of the types comment table. The cross product of the types comment …



Systematic Program Design: Week 6b - Mutual Reference

We are presented with a new data structure for arbitrarily wide and arbitrarily deep tree structures. The example given is a file system. This structure reminds me of the Trie data structure implementation in Python, because of the list of nodes data referencing itself. In this course’s terms, it …



Systematic Program Design: Space Invaders Project

Just completed the midterm project which was to implement Space Invaders game! It's pretty easy if you paid attention to all the lessons leading up to here. I started by doing a domain analysis using pen and paper. I also wrote out all the scenarios, such as changing direction when …