3 ms·
You're right that the tech is probably there now. But you need some user testing, and maybe some ML. I mean, the machine needs to train enough to know that wh
by inputcoffee 10y ago
You're right that the tech is probably there now.
But you need some user testing, and maybe some ML.
I mean, the machine needs to train enough to know that when the user types "string.len" they really mean "size(string)" and it can't just follow the alphabet anymore.
- yorwba 10y agoAllowing arbitrary syntax transformation would create an insanely large search space, but if you limit the possibilities to a few common cases (like string.len -> size(string) [attribute -> global function] or amount.add(increment) -> Number.plus(amount, increment) [instance method -> class method]) and cull the generated code heavily using a static checker, you might be able to do quite a lot. Of course then you have to deal with the case where the suggestion is subtly wrong (e.g. amount.add(increment) was intended to mutate the amount, while Number.plus is a pure function) and the programmer might not spot it, if they were unfamiliar with the correct usage in the first place. Now we are firmly in research territory, I think.
- inputcoffee 10y agoHere are some ideas for the search space problem: 1. Do it in the cloud somewhere. You probably want to do this anyway so you can learn from everyone. 2. Now you can't indefinitely keep everyone's code in the cloud (as kite is learning), so you take the most common use cases and privacy minded coders can download those to their desktop. 3. Of course languages are constantly evolving so the "cloud archive" will always be live and learning from everyone By the way, you would "learn" a mapping when someone searches for "len, length, .len" and so on but they finally settle on "size" so you would have the input and the correctly labeled target from people's code. You do have to watch them programming in practice though. For the subtle variations, it would hopefully give you a list of suggestions in order of usage.