Conversational Programming

Conversational Programming is a new, radical programming paradigm (patent-pending, AgentSheets Inc.) to help you with programming. Computationally speaking, Conversational Programming is tracking the state of your program, including user selection, as a context for interpretation and is constantly running your program in order to give you informal feedback.

The basic idea is simple. Imagine, that similar to pair programming for professional programmers, you are creating a program together with your programming expert friend. Your friend does not just take over the mouse and write the program for you. After all, (s)he probably does not really know what kind of program you are planning to write. However, using a conversational style of feedback, that is some kind of non-intrusive, informal feedback, your friend can subtly point out potential problems and opportunities that may be very helpful to you. In essence, you are programming in a conversational style through an informal dialog. You change the program or look at specific aspects of your simulation and get valuable feedback.

Conversational Programming is not about static analysis. Linguistically speaking Conversational Programming is not limited to the syntax of your program but - and this is unique - provides feedback about its semantics and its pragmatics. That is, Conversational Programming uses the current context in the worksheet (simulation or game world) to visualize the meaning of your program. Your conversational programming expert friend observes how you interact with your program as well with the objects that you are programming. Say, if you make the game of Frogger in AgentSheets, you select the Frog in your worksheet and look at the program of the Frog. Conversational Programming will not only look at your selected objects and programs but will actually run parts of your program in order to be able to tell you about the consequences of your program. Is this and that condition true or false right now given then state of your Frog? Would a certain rule of your frog be able to fire given the precise situation your selected frog is in? (see example in Animation 2 below) What other conditions from the palette could you use that would be true right now? (see example in Animation 1 below). This kind of feedback could save you hours of debugging.

When conversational programming is on, the conditions and rules will be annotated to help you understand what is happening in your program. Two different things will be annotated:

1) Conditions in the Conditions Palette will show up as green if they are true, red if they are false, as showing in the animation below for the Frogger game.

Animation 1: Conversational Programming in the Frogger Game: Condition Palettes

2) Rules in an agent's Behavior Editor will have a green background when they would fire in the current situation, a red background when they are false and their regular uncolored background when they are not evaluated. Individual conditions will also be annotated in the behavior editor. In this case, conditions will show up as green if they are true, red if they are false, and unchanged (uncolored) if they are not evaluated.

Animation 2: Conversational Programming in the Frogger Game: Frog's behavior editor