Interactive Programming __ Programming

Source: Internet
Author: User
Tags ruby on rails

Accustomed to C + + Programming Mode: Edit, save, compile, run and debug after, forget there is actually another programming mode-interactive programming. Many scripting languages provide similar consoles, enter script statements directly, and perform a carriage return, and the results are immediately displayed without having to undergo a complex save and compile phase.

Interactive programming is handy for simple, experimental operations, such as testing the use of a function. Because after the input statement, you can immediately get the result, you know where the problem is, immediately can be fixed, the speed of development has been greatly improved. Think about how you can do this in languages like C + +. 1. Print out the output to the screen, to the log file, or MessageBox 2. Use the debugger to step through or set breakpoints. No matter which kind, it is more laborious, once found the problem, but also must terminate the whole process, again. If the program is loaded for a long time, or need to go through a lot of steps to reach the specified location, you are even harder-although VS2005 tools such as debugging can be implemented to modify C + + code and then run, but I use is still not much, it seems not so handy.

If you just want to implement some temporary action, such as viewing some information, the advantage of interactive programming is even more obvious. Because is the temporary operation, the randomness will be stronger, many times is sees one information only then will think to do another operation, therefore cannot think beforehand very well. At this point, like the command line, it is convenient to read and write. I think that's one of the reasons why Microsoft invented PowerShell.

And, of course, what inspired me was Ruby on Rails, it provides an application console that lets you run Rails applications interactively, rather than having to interact with the page, making it easy to develop and debug, especially in the absence of powerful remote debugging tools such as vs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.