Friday, May 27, 2011

Programming for non-programmers

Programming is difficult to think logically, step by step, without skipping any and all possibilities for its actions demand much attention, rigor. But in addition to these complications still learning a very difficult syntax, which does not bear the slightest mistake to the last comma. Besides syntax that takes us backward.

The simple statement A = A +1, which is found in almost all computer languages, including the old Basic supposed to go to novices yet, seems an insult to what we know of mathematics from primary school . We have already had trouble swallowing the math, should now throw out? Another obstacle, perhaps less obvious is the lack of results immediately rewarding for beginners.

Take, for example, taught the first instruction when addressing a new computer language: the famous "hello world". This is to show how to display on the screen the words "hello world" (or words). This is the simplest program imaginable. But it excites he? One sometimes has the impression that the computer still live at the end of the era of punch cards, which see the letters appear on the screen was still a miracle.

Today, instead of few words, it should be at least as easily get a beautiful picture, or a little animation. But most of these results are generally much more difficult to obtain. Even Python, perhaps the simplest and most elegant of the "big" computer languages today, immediately becomes more complicated when it comes to display an image, draw a picture or sound out.

Visual languages One of the first tasks of simplification would be to develop languages possible without syntax errors. This is the goal of "visual programming". Instead of writing the text, we manipulate icons, blocks, buttons. We construct a kind of Lego and it expresses the logic of the program by connections between modules.

More complications related to writing instructions, only the logic is likely to cause us problems. One of the leading products of its kind, Alice, developed at Carnegie Mellon can quickly create interactive 3D short films. We choose a setting, characters and describe their behavior by choosing the instructions that correspond to them (careful, they are in English).

The interest of Alice, in addition to its ability to provide a finished well polished, is that it teaches the basics of what is called the programming "object oriented". Roughly speaking, we can consider a program "classic" as a recipe. It shows one by one the steps to follow from beginning to end, and it's a unique player, and centralization, the "cook" one to one that performs all tasks.

In OOP, we find ourselves rather to direct a theatrical improvisation. There are several "characters" (such as buttons, icons, windows) and it tells them what they are entitled to do when facing such a situation. Object-oriented programming is preferable to the conventional method when creating highly interactive applications (that is to say ALL applications since the invention of the mouse and windows).

Alice does in the end that take literally the metaphor "theater" of the programming object. The creators of Alice sought to define packages of accessories and characters corresponding to certain specific universe (fantasy, science fiction, etc.).. A specific version of Alice, Storytelling Alice is especially for girls aged 12, who is said, would be put off by the side of too abstract programming.

Storytelling Alice is, as its name implies, especially directed towards the creation of stories. Theoretically nothing prevents Alice to stop being just a learning software programming to become a real machine to create short films or even adventure games (no action). Only obstacle definitively oriented education and the classroom, Alice does not easily incorporate new characters and scenery to create their own scenarios.

Most often, the beginner (which in the logic of Alice, is invariably a neophyte, a "young" or a child, an adult never motivated) has little choice between the packages offered by educators . The new version of Alice 3 would incorporate characters from The Sims, an initiative which should help to facilitate the emergence of a "scene" of an exchange of characters and settings between users (though we did not found traces of the import function in the Beta version currently available).

Kodu, the Microsoft product, brings a lot to Alice, though admittedly even a designer of Alice, it is even better and easier access. Here too, we assign behaviors to characters from a range of possible reactions. The stated goal of Microsoft is to allow anyone to program games for Xbox ....

Unfortunately, as of today, Kodu also seems limited by its capacity to import new characters, props and scenery ... CHILDREN'S SMALLTALK When Alan Kay and his team created the Smalltalk language at the Xerox Park, and with it object-oriented programming, their goal was to make the computer language so natural that most young people could get started without difficulty.

Small talk in English, the "chatter" informal conversation. Thirty years later, Smalltalk is still there, but it is used by the bac +5 computer, and the notion of "object" has become one of those abstruse concepts reserved for specialists. "When I designed object-oriented programming, believe me, I did not mind the C + +", said later Alan Kay.

Kay did not give as much to do for the Smalltalk language "for all". Thus was born Squeak, a modern version of Smalltalk that integrates multimedia. Squeak remains little used "as is" by computer novices. He served as a contrast to two development environment visual programming systems designed specifically for younger children: Etoys and Scratch.

Etoys is the older of the two. A bit like Alice, we define graphical objects and assigned various behaviors that program in the form of "blocks" that assembles without writing much more than a few variables. But the environment is 2D and can import all kinds of media. Scratch is newer, but is based on the same principles qu'Etoys: "We have identified three key design principles for Scratch: make it more" hack "(tinkers), more significant and more social than other programming environments" says Mitchel Resnick (.

pdf), which directs the Lifelong Kindergarten "at MIT. Hack, precisely because of its interface in blocks similar to Legos. Thus, "children can grind the bricks as they wish, and arrange them in different sequences to see how things go," says its creator. It is also "more significant" that is to say it allows people to easily create custom projects, import their own media, their own stories.

"That's why we chose to focus on 2D rather than 3D," said Resnick. "It is easier for people to create, customize or import artwork in 2D". Finally, it is more social web site of Scratch has been dubbed the "YouTube of programming" because everyone can host their projects and of course comment on those of others, and vote for their favorites.

It is this community, sharing, allowing users to more easily capture the language. One thing that was lacking in language education of yesteryear. Resnick and quote on this Marvin Minsky, Artificial Intelligence Pope at MIT as saying the logo (first language for the younger ones) that he "had a great grammar, but not great literature." What are the differences between Etoys and Scratch? Difficult to compare without a long experience of both systems.

Here are some first impressions. Scratch interface is more attractive. Etoys blocks are essentially records, and their text is not always understandable (they keep a Smalltalk syntax) and for their pale green color, it is quite sad. Rather, they entertain themselves to assemble the blocks Scratch, colorful and explicit, that can change shape depending on how they are associated.

That may be superficial considerations for a professional, but they account for an amateur, especially when he was 8 years old. In contrast, seems Etoys has a greater number of features, such as the integration of Kedama, a "multi-agent system" designed to model the collective behavior (like ants).

A note from OLPC news blog seems to confirm our impressions. We will explain that "Eric Eisaman, a physics professor who has used Squeak and Etoys for several years, has noticed different behaviors of students toward Squeak and Etoys. This suggests that Scratch is a good introduction to Etoys, which is itself a good introduction to Squeak.

" Despite its attractive side, Scratch is still a suitable primarily for younger children. But what of the great mass of adults who want to get into the lineup without going back to kindergarten? There are two derivatives of Scratch might be of interest. StarLogo TNG (for "The New Generation", to distinguish it from the old StarLogo, also created by Mitchel Resnick, who does not seem to have played a role in the realization of the TNG) is both a modeling language Complex Systems' multi-agent ", and a system for creating 3D game.

The Scratch and therefore any request without writing a line of text. Unlike Alice and Kodu, it is fairly easy to import 3D shapes in StarLogo TNG, using the format. kmz Google SketchUp, one of the most accessible 3D modelers on the market, both financial (free) and in terms of use. Attention, unlike Kedama, which is part of Etoys, StarLogo TNG is not in the original cast of Scratch: it is software independent.

However, it must recognize that, purely entertaining applications created by StarLogo TNG still fairly primitive and ultimately frustrating. Maybe Resnick was right to abandon the original 3D in the Scratch? As for those who wish to work in depth on the concepts of complexity, they may prefer to use StarLogo original, or better still his most successful clone, Netlogo.

The other derivative of Scratch is even more interesting. Google does indeed use Scratch as a base for their system Inventor app that aims to facilitate the creation of Android applications by everyone (video). Inventor app adds many features classic Scratch specific mobile and the Google universe: it becomes possible to manipulate the "Google Maps", to use geolocation, etc..

Until today, it seemed there was always a border between research "academic" of a group of researchers working on the teaching of programming and Tech News Buzz commercial services. App With Inventor, for the first time we see an experimental model of graphical programming in the heart of a service to millions of users.

Finally, it is worth noting that visual programming is not just for beginners. The language Pure Data, which will be widely presented in a forthcoming article in this issue, is also based on a visual metaphor, but certainly not intended to newcomers. In addition, there are many professional systems that incorporate an element of visual programming.

In many development environments, we can generate graphical interface (buttons, icons, windows) and determine certain actions without programming, but for the heart of the project, we must resort to traditional methods. Closer in spirit to the visual programming, there are systems like Hypercard, which fans of the first Macs still remember fondly.

Hypercard is also presented as a tool for creating programs for non-specialists, but this product, many software authors that followed (as Director) proposed hypermedia systems actually quite simple and not complete programming languages . When we wanted to complicate things again resorted to a traditional language integrated as HyperTalk or Lingo.

In a system like Scratch, this is the heart of language expressed in the form of icons: the initialization of variables, loops, conditions ... Not just the GUI or multimedia elements specifically. PROCESSING FOR ARTISTS AND DESIGNERS However, there is another way to allow the uninitiated to approach programming.

One that is less to simplify the syntax to allow fast creation of high quality programs and rewarding. In Tech News Buzz designers, language and wins all the votes: Processing. Processing is based on Java, which can appear as an accessible and streamlined version. It must be admitted, when installing Processing, we do not like necessarily on the field its revolutionary value.

In many ways, this is a programming language "classic". So it does not have an interpreter to test his instructions "on the fly" as do systems like Squeak or Python. In addition, we must still define the "type variables", string, integer or float, in short a lot of words of unknown meaning, not to mention the systematic use of {} and so difficult to reach from the keyboard nor the semicolon compulsory whose oversight can ruin everything.

In terms of syntax and ease of use, Python is much more advanced ... But where Processing is very strong, is the ease with which it can handle multimedia data, images, movies and sounds. For an artist or researcher wishing to view data, for example, Processing is a must. Processing is not a solution for amateurs which we initiated in his spare time.

It is aimed at enthusiasts who are dedicated to a project and who will not hesitate to do so, invest the elbow grease in learning a "real" programming language. Besides the visual programming is she really an introduction so easy for beginners? Frankly, the multitude of blocks, buttons, menus and icons Etoys, Scratch App Inventor or can sometimes be as complex and confusing language in a rigorous syntax (and not talking about the replay of a program designed by others).

It is likely that visual languages will attract a new population of programmers, those with a visual intelligence, spatial, hackers of all kinds. A language like Processing for its part, remains a fairly standard approach that will appeal more to those with a mindset of engineers, planners.

What is however of those who possess intelligence more "literary" and "mathematical" or "visual"? Maybe Tech News Buzz programming natural language and semantic web will offer them there systems, ways of expressing their thoughts that neither traditional programming languages or new visual interfaces are able to offer them?

No comments:

Post a Comment