elfs: (Default)
[personal profile] elfs
I'm all about process. I love to read about Getting Things Done and all the nifty different ways that one can apply GTD principles to just about all aspects of your life.

For a while, I was enamored of pattern languages. A pattern language is a set of common problems within a larger problem space, on varying degrees of scale, that describe a problem clearly and the best known solutions to that problem. In computer programming, design patterns give developers a common vocabulary for describing what they do; for example, there are several different kinds of windows one might use (application window, popup dialog, warning, media window) and a factory provides a unified tool for building any of these without the developer having to know the particularities of each kind; on the other hand, if you have a kind of window and it needs more functionality but you don't have the source code, you would use a decorator to wrap the window object and attach new behaviors to it. By giving these practices names, developers have a way of talking one to another without having to clarify terms first.

I've since come to understand that patterns represent shortcomings in a language and the correct solution is not to use the pattern, but to create a method within the language that makes the pattern obsolete. (You can do this with dynamic languages like Ruby and Python.) The classic example is "save frame state," which is a pattern seen often in the 1960s. C did away with "push frame state and goto" entirely by creating function definitions, which did all the frame state management and assembly-level jumping for you in an intuitive manner.

So I groaned when I saw A Pattern Language For Productivity, which turns out to be actually fairly useful. He's tried to hew closer to the Alexandrian model (used in architecture) of patterns than the so-called Gang of Four model (used in programming). The Alexandrian model is better because, unlike programming languages, we don't have a dynamic grip on the real world; we can't make time move faster, or change the meaning of items like pencils and paper. There's nothing wrong with the real world; it's just a brute fact.

And we have to live in it. If your life is a clutter-bound nightmare, take a look. There's nothing new here, but at least it's organized with "when to use" recommendations.

Date: 2008-04-18 07:13 pm (UTC)
From: [identity profile] intrepid-reason.livejournal.com
Man, I wish you taught intro to programming. Seriously I do..
Edited Date: 2008-04-18 07:13 pm (UTC)

Date: 2008-04-19 12:07 am (UTC)
ext_74896: Tyler Durden (Default)
From: [identity profile] mundens.livejournal.com
Hmm... so exactly how does implementing a pattern via language extension make the pattern obsolete ? People still need to know what it is so they know why, when, and how, to use your extension, or if the pattern is implemented automatically, what is going on when debugging. I'd also point out that patterns cross language and machine boundaries, such as many current MVC web implementations where the pattern extends across two or three machines and two or three languages, so can't be implement as a language extension.

Even with your example I disagree that "save frame state" was done away with by implementing functions. The generic form of the pattern, "save state", is still relevant in web development and work-flow management, the need to save state doesn't go away just because you have access to the concept of a function call.

Patterns are also very useful in the analysis space when you're dealing with a customer who is untrained in IT, and is trying to describe what they want their system to do, as after listening to the customer for a while, you can then usually draw out an analysis pattern that fits their requirements, and fills in all the bits they haven't thought of yet.

Of course I have to admit to being slightly biased, having worked with Richard Helm, and once being paid thousands of dollars a day to teach people how to use patterns. Even now, eight years later, I still find many people who don't understand patterns still making the same mistakes patterns help you solve. You may be lucky working with switched on and educated people, but some of us have to work with "programmers" who don't own a home computer and who need to have the concept of "web browser" explained to them, because to them "programming" is still filling in forms on a green screen.

Date: 2008-04-20 08:36 am (UTC)
lovingboth: (Default)
From: [personal profile] lovingboth
C didn't invent function definitions, of course. I'm trying to think what did...

Profile

elfs: (Default)
Elf Sternberg

December 2025

S M T W T F S
 12345 6
78910111213
14151617181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 5th, 2026 03:19 am
Powered by Dreamwidth Studios