Computer program fixes old code faster than expert engineers
newsoffice.mit.edu
newsoffice.mit.edu
[1] https://en.wikipedia.org/wiki/Profile-guided_optimization
[2] http://www.cs.virginia.edu/kim/courses/cs771/papers/bala00dy...
Dynamic instrumentation is powerful, I think Google is using DynamoRIO heavily. Optimising compilers for DSLs is a trendy topic because
1. We are beginning to understand well how canonically to embed DSLs in general purpose languages, and have to build compilers for languages.
2. DSLs typically work on much more restricted domains than general purpose languages, so optimisation is much easier, and more powerful.
The Pochoir compiler for stencil computations is an example of this. There are many open questions about compilation of DSLs other than optimisation, for example automatic generation of operational and axiomatic semantics of DSLs, and associated tooling. Really interesting research field.
Here (Link to the paper:[2]) this is different: The authors do NOT have access to the source code, they only have stripped binaries. From these unreadable binary instructions, they are able to identify interesting patterns: they extract the algorithm from the assembly. For this to work, they seem to need run time information. This means, as in conventional PGO, they need to have a wide variety of valuable input. It apparently cannot be done at compile time: "Current state-of-the-art techniques are not capable of extracting the simple algorithms from these highly optimized program."
Once the algorithm is figured out, the Helium framework is generating domain specific code in "Halide". Halide compilers knows how to optimize these stencil computation better than old hand written code, which give them these impressive improvements.
[1]https://msdn.microsoft.com/en-us/library/e7k32f4k.aspx
[2] http://groups.csail.mit.edu/commit/papers/2015/mendis-pldi15...
http://llvm.1065342.n5.nabble.com/Capabilities-of-Clang-s-PG...
the technique could be applied in other areas
The optimisations used in the paper are tightly coupled to a certain approach to image-processing.Answer: Understand the problem domain better.
As for the billion dollar problem I would guess it (Bit rot) is that or more over the entire software industry.
But it's not possible yet, as the AI would need to have a human-like intelligence, and that's very far away.
You are right about humans knowing about domain knowledge, but you don't need human level AI to have computers writing software
Maybe future programmers will be more like spec writers than actual coders
An AI would know how to fill in the gaps when you said "Make me a blog page" or "Make this server scalable."
This may sound outrageous, but some very large percentage of coding practice is wheel reinvention. Developers the world over solve the same problems over and over again.
One of the first applications for useful AI will be to collect and automate that repetition.
There's already a "make me a blog" project, and Bootstrap is so cliched now I'm surprised there aren't more site builders being developed. So this isn't entirely impractical.
The hard part is the visual design. It's much harder to automate that in a way that includes some genuine original creativity.
Of course web apps != general scientific or business coding. So AI isn't a complete solution. But it doesn't need to be to be useful. (Domain specific, after all.)
"When I tap on this thing " - put the finger on the control "Go ahead and get the latest articles from HackerNews"
The System contacts "Hacker News" and queries for "latest articles" API. The systems negotiate an API key, account, etc and is good to go. The result is a list of articles with title and number of comments.
"Now use a nice table. " System formats output. "Show me other styles" Lists table styles. "This one. Now if the number of comments is more than 100, show them in red" And so on.
In the end, the System can generate source code in a multitude of languages (why?), some kind of pseudo code and of course an interactive, editable video of the "programming" session which others can watch and fix if necessary.
So basically, one person can design the whole "application" in a couple of hours.
We're not that far from that. And as we get closer, it will become better and better and it will be a lot easier to extend and modify this "System".
Imagine developing the System using the System.
Programming as we know it will remain a thing of the distant past as is the case with all things that evolve over time.
We are doing OK in human language recognition as well as understanding in simple dialogue frames. The technology is also moving awfully fast at the moment. You are thinking in terms of human level intelligence, but it really doesn't have to be that good. It only has to provide enough random-but-feedback guided choices until the user finds what they are really looking for.
Put it this way: if the user could get what they wanted from the computer directly just by "searching", the process would be more efficient since the most inefficient part about programming is human-to-human communication and coordination.
As far as code goes, we've already solved the problem of modeling the structure of any programming language with an implementation. That's not the hard part.
That's because users don't know exactly what they want. They know it when they see it, but they don't know how to explain it. They expect the engineers to guide them through to their idea.
But as per example above, that could be done by an app - guiding a user from nothing to whatever he wants by interactively experimenting with features.
Think of a REPL with access to a huge number of libraries, which is searchable by voice input.
I still remember books about software engineering written in the 80s (mainly intended for manager types) which, in their opening chapters after an explanation of how the discipline of "software engineering" evolved to the present day, painted a rosy-ass picture of the future by describing the year 2010 in which software architects lounged about in easy chairs and gave plain-English directions to HAL 9000 workstations -- replete with line drawings of retrofuturistic offices straight out of The Jetsons, The Incredibles, or Logan's Run.
Needless to say, 2010 came and went and the state of the craft had evolved microscopically compared to anticipated advances despite having plenty more CPU cycles to burn on ever more complicated tooling. In some ways it has regressed. The know-how which produced Unix and ARPANET on limited hardware with limited resources, inside academic, industrial, and government departments which got little recognition or respect, is in short enough supply that we may not be able to repeat the feat if we had to do it all over again.
Alan Kay maintains that programming is pop culture because we don't remember our history but it's worse than that. We're like a primitive Mesopotamian tribe from antiquity who had a history but forgot it except for bits and pieces which got written down and became Religion. Things like "GO TO considered harmful", "object-oriented programming is good", "DRY", "refactoring", "design patterns", etc.
We're saddled with object-oriented programming -- and its attendant complexity -- for life. But most of us don't understand how OO came to be, why it might be good, or what the tradeoffs are vs. other programming methods because we don't ask ourselves these questions.
Design patterns should be treated like TV Tropes, replete with having maybe a great wiki describing them all, and allowing the addition of new ones as well as admitting variations and inversions. Instead we treat them like nam-shubs, strict instructions handed down from the gods on what to do under these circumstances to achieve this result.
And in this culture we await the day when, magically, the Machines will spontaneously evolve the intelligence to relieve us of the burden of software design specifics!
In fact, most of the tasks described in those futuristic books didn't involve programming, I suspect they were examples of how you could ask your HAL 9000 to tell you how much is 9999 * 9999 and it would give you the answer in human voice. A lot of the tasks which would have required programming in the 80s are now solved by one of the millions of apps, so that's another angle.
Maybe we're not exactly were sci-fi predicted we'd be at, but there are a lot of things that sci-fi didn't even dream of that we take for granted.
Even the dev environments of today. You'd think they only include the text editor/IDE, but you've also got the browser, google and stackoverflow, github and a myriad of tools and libraries to help use build more and more complex apps.
The fact is, today's programmer-for-hire is an interface between the client (app inventor/architect) and the machine, just like secretaries were interfaces between their boss' spoken messages and the typewritten letters.
And if something can be optimized away by technology someday it will. Maybe it won't involve spoken language (although, why not, if it's done right?), but my bet is that programming will be less of a profession and more of a skill that you learn by using powerful tools.
Up from enhanced code completion, AI can become effective in coding even before they are human-level intelligent simply by creating a conversational feedback loop with a human; e.g. more to the right, more to the left, redder, yes! One could argue that the human is still programming, but they might not need any specialized programming training to use such a system. In that case, we really aren't as far away as many think.
You might argue this isn't "true" program synthesis, but in some cases it can outdo human programs, because the synthesizer can be tied into a verifier to produce only "correct" programs, where correctness is defined by a few simple and declarative properties. One example of this sort of thing is from Udupa and colleagues in PLDI'13: http://dl.acm.org/citation.cfm?doid=2462156.2462174. They're able to generate correct cache coherence protocols from a partial specification and input/output examples. This is a big improvement over the current state of the art, where a lot of very smart people think really hard and come up with a coherence protocol, convince themselves it's correct, and then some other very smart people spend a few months playing with automated verifiers trying to prove the protocol correct, and finally someone actually implements the protocol in hardware, and you might still run into bugs at this stage.
Then they came for the vehicle drivers, and I did not speak out - Because I was not a vehicle driver.
Then they can for the accountants, and I did not speak out - Because I was not a accountants.
Then they came for me - and there was no one left to speak for me.
http://www.martin-niemoeller-stiftung.de/4/daszitat/a31
Let the guy (or gal) make a joke, we don't need to be reminded that we only care about the Jewish holocaust and not the Ukrainian holocaust 10 years prior by the same mustache shape on a different tyrant.
EDIT: Not to mention the person who said that actually hated the Jews: https://en.wikipedia.org/wiki/Talk:First_they_came_...#Poem_...
Could be easier, less risky, and more urgent than learning to recode the whole system.
Now, color me impressed if the thing output the same language as the original source, all spruced up.
As it is, they'll just have a code base that will eventually transform into the anti-christ cause management will always be like, "Hey, don't ever fix the code, just run that see-saw whatever thing on it afterwards."
</fiction></joke>
I've been involved in development for over quarter of a century. Back in the late 80s, we had a dev team dedicated for years building some mapping software. Their entire product could probably be put together in a couple of hours using Google Maps and a bit of JavaScript.
All this automation has happened, yet I see no slowdown in the amount of development that still happens. They can just concentrate on more bespoke, more value-adding work these days.
A software version of the Jevons paradox: making software cheaper increases the demand for software.