Saturday 10 February 2007

Patterns and Example

At my first Patterns for software design (PAFSD) class on 06-02-2007, Our lecturer, Dr. Sri introduced us to Patterns generally.

In Christopher Alexander's own words "Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that you can use this solution a million times over, without ever doing it the same way twice." [1]

[1] Christopher Alexander, A Pattern Language: Towns/Buildings/Construction, 1977, New York: Oxford University Press.

From the description given, a good pattern can be said to be a proven accepted solution to solve a recurring problem in a given context. If the context changes even if the problem is the same, then the solution changes too. The solution has to be appropriate to solve the current problem in the given context in order for it to be accepted as a good pattern.

Example of a Pattern.

Name: Teaching mentally retarded kids how to read music notes.

Problem: How to teach a mentally retarded kid how to read music notes easily?

Context: Teaching young kids how to write and read music is tedious. So teaching mental retarded is even much more difficult.

Mentally retarded kids find it diificult to remember things they are taught. .

Solution: start by teaching how to read the abc's of music. (i.e do, ra, me fa, so, la, ti do) go extremely slowly ensuring that the kid grasp each note in the trend before moving to next. Use exhaustive repetition to ensure what been taught sinks well and resides in the kid, as they easily forget.