We are independent & ad-supported. We may earn a commission for purchases made through our links.
Advertiser Disclosure
Our website is an independent, advertising-supported platform. We provide our content free of charge to our readers, and to keep it that way, we rely on revenue generated through advertisements and affiliate partnerships. This means that when you click on certain links on our site and make a purchase, we may earn a commission. Learn more.
How We Make Money
We sustain our operations through affiliate commissions and advertising. If you click on an affiliate link and make a purchase, we may receive a commission from the merchant at no additional cost to you. We also display advertisements on our website, which help generate revenue to support our work and keep our content free for readers. Our editorial team operates independently of our advertising and affiliate partnerships to ensure that our content remains unbiased and focused on providing you with the best information and recommendations based on thorough research and honest evaluations. To remain transparent, we’ve provided a list of our current affiliate partners here.
Software

Our Promise to you

Founded in 2002, our company has been a trusted resource for readers seeking informative and engaging content. Our dedication to quality remains unwavering—and will never change. We follow a strict editorial policy, ensuring that our content is authored by highly qualified professionals and edited by subject matter experts. This guarantees that everything we publish is objective, accurate, and trustworthy.

Over the years, we've refined our approach to cover a wide range of topics, providing readers with reliable and practical advice to enhance their knowledge and skills. That's why millions of readers turn to us each year. Join us in celebrating the joy of learning, guided by standards you can trust.

What is Interactive Programming?

By Jessica Reed
Updated: May 16, 2024
Views: 22,952
Share

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.

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.

Share
EasyTechJunkie is dedicated to providing accurate and trustworthy information. We carefully select reputable sources and employ a rigorous fact-checking process to maintain the highest standards. To learn more about our commitment to accuracy, read our editorial process.
Discussion Comments
By allenJo — On Dec 14, 2011

@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.

By Mammmood — On Dec 14, 2011

@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.

By MrMoody — On Dec 13, 2011

@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.

By David09 — On Dec 12, 2011

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.

Share
https://www.easytechjunkie.com/what-is-interactive-programming.htm
Copy this link
EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.

EasyTechJunkie, in your inbox

Our latest articles, guides, and more, delivered daily.