Subscribe to DSC Newsletter

Do you know any company developing automated debugging software or environments?

Too often, we (programmers) spend too much time correcting very basic mistakes. An example is forgetting a semicolon at the end of a line (Perl), or having one extra comma in a SQL select statement as in

select
LastName,
FirstName,
City,
--zipcode
from users;

In this example, the extra comma appeared by accident when the zipcode field was commented out. Now the SQL code (previously correct) is buggy.

It would be very easy to write a program that automatically correct these basic errors, these errors waste as much as 10% of the time to any experienced programmers, and much more for novice coders.

For instance, applied to Perl, one feature (among hundreds of features) of the automated debugger would be:
  • Check first occurrences of lines that do not end with a a semicolon
  • When such a line of code is found, check the code until the next semicolon is found
  • If the code in question can not be successfully compiled, then try adding a semicolon to the first line that did not have one
  • After adding the semicolon in question, if the code can now be compiled, the error was just a missing semicolon, and the error has been automatically fixed (this will solve 99% of the missing semicolons)
I'm wondering if such automated debuggers exist. If not, I believe VC's should invest in this technology. It could save billions of dollars to the corporate world.

Views: 215

Reply to This

Replies to This Discussion

I do not agree.

Of course, such small errors happen and yes, they are annoying. The question is: Can be ensured (regarding your example) that if the code compiles after the semicolon was added, that the semantics is exactly as the coder planned it ? Debugging with tracing and breakpoints is much more time consuming than correcting a compiler error.

I am afraid we will reach a new level of "try-and-error-coding".
I think a completely automated tool would probably be too dangerous to actually use - too great a chance that the correction would change the meaning of something. (SQL especially.)

For finding errors, check out Micro Focus DevPartner Studio (formerly CompuWare DevPartner Studio).

Personally, I just prefer a good code highlighting system. Anyone who has ever been stuck in parentheses or quotations hell for an extended period of time can attest to the value of good code highlighting...
Many times a particular IDE (Integrated Development Environment) will provide syntax checking and debugging. For example Komodo, and Eclipse (for Java environments) both contain debuggers, and SAS has a built in debugger which can help you trace code. For SQL checking it is a little trickier, since there are so many variants of SQL, MS Sql has a built in checker within Management Studio, and DB/2 SQL has one as well. I have also used TOAD for Oracle, which checks syntax, and I believe TOAD is platform independent and is freeware.

-Ralph Winters

RSS

On Data Science Central

© 2019   AnalyticBridge.com is a subsidiary and dedicated channel of Data Science Central LLC   Powered by

Badges  |  Report an Issue  |  Privacy Policy  |  Terms of Service