Friday, October 2, 2009

Wave compiler

While getting ready for work this morning I had Wave on the brain, And while thinking about the revision control idea, and how a robot might act upon the changes near-instantly, that got me thinking of other tools that might act immediately upon changes being made.

What if your code editor edited a Wave instead? Many code editors have the Intellisense idea, where it will help you out with the parameters in the function you just mentioned and automatically close your parentheses, brackets and curly-braces for you -- all features I personally hate. Some people like them, though, and you could have such functionality in a Wave robot, watching your edits as you go and helping out. If you pause after typing

MyFooFunction(

it might guess that you have completely forgotten the parameters for the function, and will attach a reply to that function, having the parameter values supplied underneath the line you're editing. As soon as you close the function, the robot would remove the hint and let you get on with your coding. It could also help out with the closing of the function call or a block of code...

In fact, it could be constantly compiling your code for you, checking for undefined variables, syntax errors, type mismatches...

It would have to be aware of where you are in your code, what you're currently writing; it shouldn't complain about half-written statements, unclosed code blocks, etc., if the user is still working on them, but lines that have been typed previously, finished with a definitive carriage return or semicolon, could be fair game for reporting errors. These errors might be represented as highlighted code using markup (colours, underlining, etc.) or with reply blips attached to the problem instruction, variable or statement. These markups would be removed as soon as the user goes to tend to them.

A full-fledged compilation system might maintain a different blip in the Wave where it dumps all compilation errors, lint warnings, etc., in case the user wants to tend to bugs that the compiler isn't brave enough to report quite yet, unsure if it's being too hasty. Hell, depending on the type of application, the output could, if the code successfully compiles, be placed within the Wave.

And none of this touches on the idea of multiple humans working on the code at the same time.

No comments:

Post a Comment