r/coding • u/jonfla • Aug 11 '15
Code transplant could revolutionize programming
http://www.wired.co.uk/news/archive/2015-07/30/code-organ-transplant-software-myscalpel13
u/jirachiex Aug 11 '15
Can someone explain what the analogy means, and how it's different from dynamic linking?
14
u/aftli Aug 11 '15
I had the same thought. Here's the overview.
First of all, I hate the analogy. I don't really think it makes sense, and I thought I was reading an Onion article at first.
Of note:
While we do not claim automated transplantation is now a solved problem, our results are encouraging: we report that in 12 of 15 experiments, involving 5 donors and 3 hosts (all popular real-world systems), we successfully autotransplanted new functionality and passed all regression tests.
So, that said, it seems that this relies on two key things: annotation of "donor" code (think docstrings, information about every parameter, etc. - I'm not exactly sure what it implies), and the "donor" having a test suite. They analyze the "donor" code and its sort of metadata, and it seems, take random bits and pieces from that code and put it together, trying different combinations of bits of it until all of the unit tests pass.
I think, anyway. That's what I could gleam from a quick read of the overview.
This doesn't seem more useful than dynamic linking or existing solutions like "just provide the source code for the library", so I think I'm probably misreading it.
12
Aug 12 '15
It appears as if the article suffers from an over-sensationalized tone.
It speaks nothing in regard to the optimization/quality of the translated code. It basically says, "hey, this can be done!" ... like, no shit! lol
5
u/Madamelic Aug 12 '15
It speaks nothing in regard to the optimization/quality of the translated code.
I think this is the most important part of this.
This process is nothing if code can't be maintained or understood. Although, I guess we could just let 'MuScalpel' create spaghetti code on top of spaghetti code.
4
u/Azuvector Aug 12 '15 edited Aug 12 '15
About my take on it as well. However, I'm currently reading Nick Bostrom's Superintelligence and what jumped to mind for me was that this really sounded like some sort of genetic algorithm that plays assembly games with source code that's had some meta data added to it, that probably results in something more geared for a machine to read than a human. Sort of a potentially cleaner implementation of polymorphic code.
1
u/HelperBot_ Aug 12 '15
Non-Mobile link: https://en.wikipedia.org/wiki/Superintelligence:_Paths,_Dangers,_Strategies
HelperBot_™ v1.0 I am a bot. Please message /u/swim1929 with any feedback and/or hate. Counter: 7062
5
9
4
u/EmperorOfCanada Aug 12 '15
They keep talking about transplanting a codec. If the original coders had written a clean API then "transplanting" the codec should take very little time as a programmer.
So if I am to have any takeaway from this technology is that it will reach into code that was created with a miserable API and create hooks for other software to use. I will assume that these are clean and consistent hooks.
5
4
u/CodeShaman Aug 12 '15
Here's their website for anybody that doesn't want to read a children's article.
Seems like it would've been cool a couple decades ago. The dependency management issues that C faces have been overcome by most all other programming languages without having to, you know... write a static code analysis metacompiler.
2
u/mcilrain Aug 12 '15
"Today, human programmers perform low-level programming tasks. Perhaps our grandchildren will look back on our current use of the word 'programmer' in a similar way?"
This article only suggests that future programmers will have a CTRL+V that fixes the parts that don't match up.
It doesn't reduce complexity, it only automates a time-consuming task that a programmer might perform, in cases where the unit tests (I wonder who wrote those?) don't exist or are insufficient to cover all functionality (is that even possible?) this technology would fail to make a programmer obsolete.
2
u/eugf_ Aug 12 '15
IMHO, this article does not explain clearly what really is a transplant in the programming context. Therefore, a terrible analogy. There are a few well known techniques that can be related to this (or not) , such as hot swap and dynamic linking. Also, there are existing tools that allows the programmer reuse more easly the code (e.g. noflo and webcomponents). In any case, this project seems to be more sensationalist than revolutionary.
2
1
u/geo_ff Aug 11 '15
This is too far down the academic CS rabbit hole for me. You guys have fun in wonderland, Imma just use these python libraries over here...
1
u/myhf Aug 12 '15
What's a "library"?
1
u/geo_ff Aug 12 '15
"The library contains built-in modules (written in C) that provide access to system functionality such as file I/O that would otherwise be inaccessible to Python programmers, as well as modules written in Python that provide standardized solutions for many problems that occur in everyday programming."
1
1
Aug 12 '15
...you mean that thing that happens whenever someone finds some open-source project they can cobble into what they were trying to do, and has happened since the beginning of OSS?
Yeah. Revolutionary
28
u/log_2 Aug 12 '15
This is a joke paper. Probably designed to see how far they get with media sensationalism.
Edit: From their paper:
If it's not a joke paper, then it is very poorly written with ridiculous analogies that only cause confusion in the technique.