Теория и практика перевода. Терехова Г.В. - 88 стр.

UptoLike

Составители: 

2.2.8 Текст “Programming by Example” (by Henry Lieberman)
Henry Lieberman is a research scientist in the Media Laboratory at the
Massachusetts Institute of Technology in Cambridge, Mas.
Avoiding the voodoo of conventional programming, users get personalized
solutions to one-of-a kind application problems that can be used over and over again.
When I first started to learn about programming, many more years ago than I
care to think about, my idea of how it should work was that it should be like teaching
someone how to perform a task. After all, isn’t the goal of programming to get the
computer to learn and then actually perform some new behavior? And what better
way to teach than by example?
So I imagined what you would do would be to show the computer an example
of what you wanted it to do, go through it step by step, and then have it try to apply
what you had showed it in some new example. I guessed that you’d have to learn
some special instructions that would tell it what would change from example to
example and what would stay the same. But basically, I imagined it would work by
remembering examples you showed it and replaying the remembered procedures.
Imagine my shock when I found out how most computer programmers
worked. There were these things called “programming languages” that didn’t have
much to do with what you were actually working on. You had to write out all the
instructions for the program in advance, without being able to see whet any of them
did. How could you know whether they did what you wanted? If you didn’t get the
syntax exactly right (and who could?) nothing would work. Even after you had the
program, tried it out, and something went wrong, you couldn’t see what was going on
in the program. How could you tell which part it was wrong? Wait a second, I this
approach to programming couldn’t possibly work.
I’m still trying to fix it.
Over the years, a small but dedicated group of researchers came to feel the
same way I did, ultimately developing a radically different approach to programming,
called “programming by example” (PBE). It is sometimes also called “programming
by demonstration”, because the user demonstrates examples of the desired behavior
to the computer. A software agent records the interactions between the user and a
conventional “direct manipulation” interface and writes a program corresponding to
the users’ actions. The agent can then generalize the program so it works in other
situations similar to, but not necessarily exactly the same as, the examples on which it
was taught.
This ability makes PBE like macros on steroids. Conventional macros are
limited to playing back exactly the steps recorded, making them brittle, because if the
slightest detail of the context changes, the macro ceases to work. Generalization is
also PBE`s central problem, the solution of which should enable PBE to replace
practically all conventional programming.
Children might represent the first real commercial market for PBE systems.
They are not spoiled by conventional ideas of programming; for them, usability and
immediacy are paramount. That’s why it’s with children in mind that this special
section explores two notable PBE systems recently brought to market to enthusiastic
      2.2.8 Текст “Programming by Example” (by Henry Lieberman)

        Henry Lieberman is a research scientist in the Media Laboratory at the
Massachusetts Institute of Technology in Cambridge, Mas.
        Avoiding the voodoo of conventional programming, users get personalized
solutions to one-of-a kind application problems that can be used over and over again.
       When I first started to learn about programming, many more years ago than I
care to think about, my idea of how it should work was that it should be like teaching
someone how to perform a task. After all, isn’t the goal of programming to get the
computer to learn and then actually perform some new behavior? And what better
way to teach than by example?
        So I imagined what you would do would be to show the computer an example
of what you wanted it to do, go through it step by step, and then have it try to apply
what you had showed it in some new example. I guessed that you’d have to learn
some special instructions that would tell it what would change from example to
example and what would stay the same. But basically, I imagined it would work by
remembering examples you showed it and replaying the remembered procedures.
        Imagine my shock when I found out how most computer programmers
worked. There were these things called “programming languages” that didn’t have
much to do with what you were actually working on. You had to write out all the
instructions for the program in advance, without being able to see whet any of them
did. How could you know whether they did what you wanted? If you didn’t get the
syntax exactly right (and who could?) nothing would work. Even after you had the
program, tried it out, and something went wrong, you couldn’t see what was going on
in the program. How could you tell which part it was wrong? Wait a second, I this
approach to programming couldn’t possibly work.
        I’m still trying to fix it.
        Over the years, a small but dedicated group of researchers came to feel the
same way I did, ultimately developing a radically different approach to programming,
called “programming by example” (PBE). It is sometimes also called “programming
by demonstration”, because the user demonstrates examples of the desired behavior
to the computer. A software agent records the interactions between the user and a
conventional “direct manipulation” interface and writes a program corresponding to
the users’ actions. The agent can then generalize the program so it works in other
situations similar to, but not necessarily exactly the same as, the examples on which it
was taught.
        This ability makes PBE like macros on steroids. Conventional macros are
limited to playing back exactly the steps recorded, making them brittle, because if the
slightest detail of the context changes, the macro ceases to work. Generalization is
also PBE`s central problem, the solution of which should enable PBE to replace
practically all conventional programming.
        Children might represent the first real commercial market for PBE systems.
They are not spoiled by conventional ideas of programming; for them, usability and
immediacy are paramount. That’s why it’s with children in mind that this special
section explores two notable PBE systems recently brought to market to enthusiastic