Archive for November, 2008

Practice, judgement and testing

Saturday, November 22nd, 2008

Montessori believed that knowledge acquisition through sensorial experience was subconscious and didn’t require active recall or correction. This specifically means that learners can engage in repetitive acivity without being tested or directly engaging in active recall, and the knowledge will be retained.

This also implies that you can engage in “preparatory activities” that aren’t directly related to the end goal, but put into place skills or habits necessary for the end goal. In the Karate Kid, the main character was taught how to paint the fence and wax the car using very specific muscular movements. These were preparatory activities to learning Karate (specifically hand blocks).

Similarly, the knobbed cylinders in Montessori prepare for learning by habitually going in left-to-right in Roman alphabet languages, and right-to-left in Semitic languages.

These is also true of pure-contour drawing for teaching draftsmanship. The copying of curves and edges is a skill that is practiced over and over in preparation for real drawing.

Which draws me to my little anecdote relating to my Wacom pen tablet. Tablets allow you to draw very quickly on the computer, but they take a slightly different sense of coordination compared both to a mouse and to physical pen and paper. I’m not a especially skilled artist yet, so I often still have difficulty making lines even match what I see. I’ve also be conditioned, through my experience in engineering and formalized schooling, to want to verify things after I’ve built them. So, I have a bit of a bad tendency (like many beginning artists) to be judgmental of my work. I also have a weird aversion (probably from formalized schooling) to not want to erase my work if I make a mistake.

Now keeping in mind that sensorial experience *doesn’t* need to be tested, just be expereinced for skills and knowledge to be learned, there is no reason at all to be critical. This is one of the great benefits of blind contour drawing, since the result generally does not match what you were drawing, you can’t critique the result, only the procedure used to get it (whether you drew to fast or too slow). I’ve discovered a somewhat similar technique when using the wacom tablet. Specifically, I take a source image that I’ll be using for a basis, and then draw lines directly onto it using the wacom tablet and inkscape. Of course, being an amatuer, the first like is usually very shaky and inaccurate, so I simply undo and retry until I get a good line. I can keep track of how I did the line with my muscle memory and spatial memory, and the line on the image gives me direct feedback on the accuracy of my drawing.

Another nice side effect is that in addition gaining a lot of practice without judgement, I also get a nice finished product in the end :). I bet it’s a preparatory for edge detection, accurate edge recording, scaling and understanding feedback on how a drawing looks. Plus the motor skills required for drawing effectively with a wacom tablet.

More random thoughts

Wednesday, November 19th, 2008

Intelligent Tutoring Systems

Cognitive Tutor seems pretty simplistic. The example they run throug with creating a learning card for fractional addition seems flawed. I’d constrain it based on algebraic rules and probable decisions made by children (multiply them together, or do a gcd) rather than enumerating all possible choices. Of course, I tend to be a deductivist, so I’d explain the rules of algebra as they relate to fractions before giving examples.

The other thing that may be interesting is that *making* the notes for a spaced learning system such as mnemosyne may add to understanding…It would be difficult to verify notes that students create, but it’s definitely something to explore (even if it does require grading of the notes for correctness by a competent human.)

Procedural Web Design

An interesting project would be procedurally create web layouts following some basic rules (Stuff in basic design books and “don’t make me think”, along with some color theory). It’d definitely be useful, as well.

AST Manipulation fun for when I have time

Sunday, November 2nd, 2008

Nice asserts

Currently python asserts are of the form

assert EXPRESSION, MESSAGE

It’d be really nice if an assert of the form

assert a < b < c

would display display a message equivalent to this (with a = 2, b = 1, c = 3)

AssertaionError: 2 < 1 < 3

I think I can do this for most Boolean expressions by doing an AST transform. So something like

assert a.foo() < g.bar() != f("fizzle")

Would be transformed into:

_1, _2, _3, = a.foo(), g.bar(), f("fizzle")
assert _1 < _2 != _3, "%s < %s != %s" % (_1, _2, _3)

This would happen right before methods/functions were run. Hopefully, by using AST it will be more portable to other python implementations (This is the primary reason cited by Guido for why adding this type of assertion to the CPython implementation wont be supported).

Mutation Testing

Mutation testing plugin for nose. Mutate Boolean expressions and constants akin to Pester, only using an AST transform instead of text substitution. This could potentially increase the types of mutations possible (shuffle orders of statements executed, change parameters, etc.)

Difficulties:

  • Determing what’s under test to change (perhaps use coverage/figleaf to figure out what to change?)
  • Keeping track and reporting mutation results to tester (should be relatively straightforward)
  • Doing this quickly — mutations usually take a long time. (Only mutate files specified by user?)

Genetic programming

AST tree manipulation can also be used to generate syntactically correct statements automatically. Assuming I find or create an acceptable cross-over algorithm (perhaps steal the one from pygp) AST will make this relatively straightforward.