Category: 

What is Interactive Programming?

Article Details
  • Written By: Jessica Reed
  • Edited By: Heather Bailey
  • Last Modified Date: 12 November 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
President Richard Nixon had an entire speech prepared in case the Apollo 11 astronauts became stranded on the Moon.  more...

December 8 ,  1965 :  Pope Paul VI promulgated Vatican II into ecumenical law.  more...

Interactive programming, also known as live coding, refers to any computer programming language that allows the creator to make changes to the program while it is already running. In traditional programming, the coder first writes out the program and then saves it. He then runs the program on the computer. If an error occurs, it's back to the drawing board to type out new code and run the program all over again. With interactive programming, the designer can make changes to the code without having to run the program over again.

Another use for interactive programming is to allow input from the user in what is called an interactive application. This can be as simple as asking the user for her name and then displaying it on the screen. The program has an interactive element by changing the value of the user's name based on what she types. When the program was created, it did not know her name and the value was blank. Once it learned her name, it put that value into the program while the program was still running and then displayed it on the screen.

Ad

This type of interactive programming is in contrast to another programming process known as batch processing. In batch processing, the program can run without ever needing input from the user. This has the advantage of running on its own without needing the user's help, but does have one major drawback. All the information needed for the program to run must be coded in to it from the beginning. If the program wanted to display the user's name, it would need to know it already, as it could not ask for the user's input.

In the creation of a program, it goes through development cycles. These cycles start out with identifying what the program should do, writing the code for it, and testing out the program. The designer then goes back and makes changes to the program and tests it again. This process repeats until a successful program is created.

When interactive programming is used, the distinct lines between stages of the development cycle become blurred. Writing the program and running the program become one and the same. Instead of writing the program and then executing it, the developer can write the program, run it, and continue to write or make changes to it while it is running. This allows for much more flexibility in programs, and allows the programmer or user to make changes without restarting the program.

Ad

You might also Like

Recommended

Discuss this Article

allenJo
Post 4

@Mammmood - I think that the only use for batch programming, based on my own experience, is to use scripts that run scheduled jobs. They were actually called batch scripts for that reason.

They could be programmed to run unattended, mainly for evening jobs or stuff like that. You could also incorporate them into the program to do stuff that the user is never supposed to see, but is important for the proper functioning of the program.

Mammmood
Post 3

@MrMoody - I think that the real uses for interactive programming, at least on a very complex level, would be some game development environments.

Games can be extended and expanded as you go, allowing the user to create new universes and objects and behaviors. I believe that would be an example of an interactive program that gave the users maximum flexibility.

In either case, it seems that such a programming environment might be very complex. How do you make sure that the users don’t write code that doesn’t break your main application logic?

You need to define boundaries between what the user can do and what the application can do. Probably you would have checks in place too, in order to ensure that proper values and stuff are entered into the program.

MrMoody
Post 2

@David09 - I think that there are two definitions for interactive programming here. The article talks about taking user input and then displaying it. That’s an interactive program, but it’s not the kind of interactive programming discussed in the main paragraph.

That type of interactive programming involves changing code on the fly – most programming languages don’t let you do that! I’ve never done that, anyway. I admit it would provide you with a lot of flexibility but I don’t think it would be useful for independent software vendors (such as the company I work for) which want to keep the code base compiled for security reasons.

David09
Post 1

I’ve been doing computer programming for over ten years now, and I must say, I’ve never done the kind of interactive programming described here. I think there are limited applications for the kind of programming that is truly interactive.

I can imagine a financial application as one example. Suppose this application lets you add your own custom functions. You can embed a custom script inside the financial application that performs those functions.

I don’t know if this is exactly interactive programming or not, since the program is already compiled and the scripts are executed on the fly, in a separate memory space, but it seems to come close.

Post your comments

Post Anonymously

Login

username
password
forgot password?

Register

username
password
confirm
email