r/Automate • u/nath_leigh • Jul 30 '15
Code 'transplant' could revolutionise programming (Wired UK).
http://www.wired.co.uk/news/archive/2015-07/30/code-organ-transplant-software-myscalpel4
u/Vaste Jul 31 '15 edited Jul 31 '15
Rather than TDD, this is Test Driven Copy Paste. Essentially, based on this comment, it is a system that can make existing tests pass, using the original implementation as "inspiration" (input).
Pretty cool, and certainly more than just a refactoring tool. Hints at a future of programming were one is essentially writing a specification (here in the form of tests) rather than writing an implementation.
8
Jul 31 '15
What problem is this trying to solve? There are already libraries and API's. You don't have to reinvent the wheel when you make programs.
7
u/BittyTang Jul 31 '15 edited Jul 31 '15
To me, it sounds like this is more of an automatic refactoring tool. Just because libraries encapsulate functionality and provide an interface doesn't mean that an already existing piece of software can use it effortlessly. It sounds like this tool can look at a library's API and figure out how to refactor the other piece of software so it can use the API.
2
u/Ambiwlans Jul 31 '15
You can build a program while avoiding the use of actual programmers until you've created a horrible bloated monster that costs you millions to fix.
2
u/the320x200 Jul 30 '15
I wonder how this avoids transplanting (rimshot) the menial work they're trying to avoid from working in the app to working on expanded test validation, since the test suite now needs to be expanded to cover a much more thorough set of results than would be necessary normally.
1
u/TotesMessenger Jul 31 '15
1
1
u/typeof_expat Jul 31 '15
Since they said this method was akin to human organ transplant let us take that analogy further and we must ask: will this code suffer from complications much like human hosts do?
1
Jul 30 '15 edited Jul 30 '15
Why would this even be necessary? I thought codecs were often implemented as plugins or at least available as libraries with accessible interfaces.
If it is implemented properly the first time there is no need to 'transplant' the code anywhere.
And in this way, you retain all of the original design intent and testing. As others are mentioning: how is a successful 'transplant' easily verified? I imagine it being a nightmare.
2
1
u/maxwellb Jul 31 '15
Well, the article did say that it took the human programmers 20 days, so it can't have been all that clean and pluggable.
1
u/brookllyn Jul 31 '15
Or it took the programmer a day to implement it and create a patch and QA was backlogged and took 19 days to mark it as solved.
Just saying we don't really know. Could go look it up but meh.
-2
u/TH3J4CK4L Jul 31 '15
Are we on Star trek voyager? EMH? Doctor? Saving a ship of holograms?
Anyone understand the reference?
0
Jul 31 '15
[deleted]
0
u/mindbleach Aug 01 '15
Hacky bullshit gets things done. Whether or not they're actually the things you wanted done, well, that's someone else's problem.
-1
u/omniron Jul 31 '15
Except if the technique is expanded, and combined with other research in automated programming, it's irrelevant how "standardized" or hacky something is, if it can be proven to work and be reliable. This is the future.
Just like Microsoft Excel lets any old idiot plug numbers into Excel and create nice graphs and projections, this technology brings us 1 step closer to a future where any old idiot who can specify what they want a computer to do can generate a novel computer program.
This will lead to tools where no longer does someone have to have a natural knack for programming to write cool programs, they just have to know what they want.
3
u/dread_beard532 Jul 31 '15
they just have to know what they want.
I'd guess that at least 50% of the time spent on most projects is due to people not knowing what they want.
3
u/ruinercollector Jul 31 '15
This will lead to tools where no longer does someone have to have a natural knack for programming to write cool programs, they just have to know what they want.
And no how to communicate what they want accurately and in enough detail. That is literally what programming is and that is precisely the "knack" that you have to have to write software now.
2
u/hosford42 Aug 03 '15
And I doubt this technology could make most VB scripts look any worse than they already do.
1
u/omniron Aug 03 '15
ha true, but readability is irrelevant when a computer is doing all the reading.
0
Jul 31 '15
[deleted]
2
u/omniron Jul 31 '15
It's definitely a step in that direction. If you have a library of functions, and want to add then to an existing program, this tech could allow a laymen to do so.
0
u/thepeacemaker Jul 31 '15
This shouldn't be necessary
Why not? It sounds pretty handy to me. "Hey you know feature X project Y? Let's apply that to Z".
if people start using it a lot, then it will actually hurt the development community more than it helps it.
Exactly how would this hurt?
We need more things standardized, and we need more modular libraries and plugins.
Right, but the reason there is not more of those things is because those things are hard to get right. Surely automation in this area would help.
This is hacky bullshit at best.
I see no evidence of that. I am highly skeptical of what this thing actually is and how well it might do it, but I don't doubt the usefulness.
3
u/Ambiwlans Jul 31 '15
You aren't a programmer if you don't think this is hacky bullshit.
2
u/ruinercollector Jul 31 '15
Exactly. This surgery metaphor is leaky and wrong in so many ways.
1
u/thepeacemaker Aug 01 '15
This I agree with you on 100%. "Transplant" is a terrible term. I wish we knew more of the actual details to properly classify it.
13
u/nath_leigh Jul 30 '15
To demonstrate the system, Harman's team successfully transplanted a video coding format from one media player to another. The H.264 codec, which used to be lacking in VLC media player, was transplanted from x264. It took the automated system 26 hours to complete the transplant, while VLC's manual addition of the code happened over a period of 20 days.
The system could be used to transplant anything from automatic save features to social media integration, video chat, spellcheckers and even video and audio processing.
At present it only works on the C programming language, but there is nothing to stop it being applied to others. Eventually it may even be possible to transplant features between languages and platforms with no human involvement whatsoever.