199 points · by fragomatic · 9y ago · 155 comments
This is not a new thought. The problem with it, however, is that such a description would have to be very precise or else leave room for different interpretations which in turn could lead to very different programs being generated. In particular, as programmers know, it's often the edge cases that pose the main difficulty not the typical case.
Describing what your program should do in sufficient detail will probably end up being not very far from the actual program itself.
Perhaps the solution to this particular problem is a clear specification of the requirements of the problem -- very similar to how corps define requirements documents for what their product does/behaves like?
As a relatively new manager, I find figuring out where the balance is tricky.
I don't mean to spew hyperbole, because complete automation is likely very far off. But, I just wanted to point out the market forces behind this type of technology are gigantic.
I'd be more curious to see an AI write tests...
If you go trough the easiest path, you just need to write the program and compare the results with the AI's ;)
But if you go on a case by case basis, your work will grow exponentially with the program size, not a mere 2x.
Static types also specify universal properties, which is why tests can't replace types, even in theory. But tests+types could be a type of spec.
Developing an AI that can infer a simple, tasteful set of general rules (and suitable types) from a small set of test cases is certainly hard but not theoretically impossible.
Automated tests are generally not practical for proofing program correctness. Why would you expect them to be sufficient as a specification format?
For your add(int32, int32) function: While an AI-generated implementation is not provably correct unless the test contains 2^64 inputs, I think it's pretty likely that a correct implementation would in fact be generated pretty quickly.
So I started tinkering with the concept, and I've got a bit of a start on it here:
https://github.com/michaelmelanson/autocoder
What's there is very rudimentary. The main class is a good place to start.
Basically I'm building up a library of transformations that can describe solutions to kata problems (the 'word wrap' one currently). The next step is to create a search algorithm to derive an ordered sequence of transformations from that library to pass an ordered sequence of tests.
Basically as time progresses we keep creating languages that are a "higher level".
I mean, the difficulty lies in specifying what you want in such an unambiguous way that a program that fulfill the specification actually does what you had in mind originally.
or we just ditch humans and allow an ai to assess what software we need.
These advanced AIs would just be the next level of this, giving even easier ways to specify to a computer exactly what you want it to do.
Writing code isn't the difficult part about building most software.
if one programmer can now do the work of 5 with the help of an AI, companies will quickly be hiring less developers.
yet everytime i mention this, im told that "software developers are the one job that will never be at risk of automation"
The AI is itself a program. If the AI can write programs, it can write a better version of itself. A few iterations of this, and it will have far surpassed human intelligence.
So it would be more accurate to say that writing programs is the last job that will be automated.
Instead of having to hire multiple senior level developers, all they needed to do was hire one project manager (me) and a bunch of junior developers (which are much cheaper). This is because all of the engineering-level software was given out for free and the company only needs to make changes, which takes much less experienced employees.
The end result is still that it takes more time to fix the errors than it would have to write it in the first place.
Why do so many computer languages experience scope creep? Including C++ and JS.
Isn't that the idea behind https://en.wikipedia.org/wiki/Prolog ?
If I can create using English, there is a lot of possibilities for me. I can work on expanding language and build on skills I already have. I figure something like this will spill over into other areas. For example, I could theoretically make animation by describing the scene with words. Detail varies depending on how detailed I get.
It would still be a vast amount of work, but suddenly it is doable just by honing skills I already have. This is where the hope lies with folks like me.
I guess that you have worked for someone else as a programmer? Didn't they tell you what they wanted? How did you achieve it? They probably didn't have to write it for you in very specific terms unless a problem occurrs.
The brute-force approach described in the article, where you just randomly try lines of code without any other knowledge, won't make for a very competent programmer.
Unlike general supervised learning problems, for many of the deep learning "generative" models that get posted to HN regularly, there is no objective "test set" to measure generalization, so it's extremely easy to claim the model has learned something. When we see a cool demo / audio sample / pictures, how do we know the model hasn't just simply interpolated a bunch of training examples? In many cases this is quite clear, like when you start seeing cats everywhere in the generated imagery. It's very hard to ferret out the BS with these models.
But the judging of models by their visualizations is something which is still done too often, and it annoys quite some researchers in the area that those papers still pass review at machine learning conferences. They should be sent to computer graphics conferences, because that is what they actually do /vent.
A different problem I see with faces in particular though is that our visual system is actually wired to do some really heavy denoising/pattern matching on faces (for example people seeing the face of Jesus on slices of toast), so the generation of faces doesn't actually need to be that good to produce results that seem appealing to humans.
So I guess we are all out of jobs in a couple years...
Technically I see no reason you couldn't say that meets the definition of learning.
But perhaps that's asking the wrong question. Dictionaries aside, one might decide that a useful standard of "learning" in certain contexts is to have a level of understanding of the subject. And then we ask, does the system have understanding? What is understanding?
A system that only interpolates training data can't logically become consistently better at the task than the data it learns from. Whereas a a sufficiently deep learning system (including, but not limited to, a human) can defeat its master.
Running a crude algorithm some small set of training data specifically meant to amaze you on specific algorithm have very little information content.
Programmer: why is my program not working?
AI: Strange, it's working for me. Programmer: why is my program not working?
AI: Have you tried turning it off and on again?The approach taken seems to be quite unique. Especially when compared to GPs and GA evolved custom assemblies. Those approaches work too, but mostly fail (or take too long) at solving slightly complex problems.
No, AI didn't write code. A program explicitly built and trained to write code, wrote code.
A bit too pedantic, perhaps, but there isn't some singular program out there which first learned to play chess, then see and catalog pictures, create creepy art, play Go, drive cars, and now write code. Which is what "AI learns to X" seems to imply.
Of course, that's not as interesting of a headline.
Hell, you're probably using computer-written code right now. FFTW and ATLAS are autogenerated and autotuned kernels for solving FFT instances of known size and linear algebra routines, respectively, and they're among the most common implementations of these APIs.
Much like non-artificial intelligence, then.
This article appeared in print under the headline “Computers are learning to code for themselves”
And someone decided that the article is not click baity enough, lets make it look like malevolent(From this article: http://www.inc.com/betsy-mikel/mark-cuban-says-this-will-soo...)
the problem is human computer interaction. to specify what is needed is harder than the actual coding.
i would guess this will be implemented in an IDE and will reduce coding times tremendously
someone has to tell the thing what to do, in a understandable way. and this will not be the client/manager/whoeverneedssomething.
and that's not coding. that's software engineering. maybe codingmonkeys will disappear but a "developer" is, imo, a guy who does more than code
The absolute worse case is that we'll be employed to goad the AI.
e.g. Assembler -> C -> C++
There recently has been a post @ HN about the missing programming paradigm (http://wiki.c2.com/?ThereAreExactlyThreeParadigms). With the emerge of smarter tools, programming will get easier in one way or the other, releasing the coder from a lot of pain ( as C or C++ did realse us from tedious, painful assembler ). However, I am quite sure that it won't replace programmers since our job is actually not to code but more to solve a given problem with a range of tools. Smarter tools will probably boost productivity of a single person to handle bigger and more complex architectures or other kinds of new problem areas will come up. Research will go faster. Products will get developed faster. Everything will kind of speed up. Nevertheless, the problems to get solve / implement will remain until there's some kind of GAI. If there's an GAI smart enough to solve our problems probably most of the Jobs have been replaced.
Well that's the thing, "describing" an idea to the point where you are explicit enough to get the actual b behavior you want, you are basically writing code. Granted, you might have to add superfluous constructs and syntax to make it fit the programming languages we currently have, but that is a different kind of problem.
On a serious note this could potentially suck for developers. Just like the labor jobs and automation. You have a skill set? Well this computer can do your job. I guess be the guy building the code writing the code.
I do wonder what will we do when computers do everything for us. I have this motor that moves my neck to a look at a girl who also has a motor that moved her neck to look at me haha.
Yeah, this is a pretty existential question that has been posed a lot around here. What do you do if you do not have to do anything? It is like vacation, forever. You are free to be lazy, or creative, or adventurous, or somewhere in between, but will you be happier? I have been between significant work for a few months and I am itching to do something consequential but I also really enjoy the space to do anything, not that I take full advantage more often than when I was working full time.
The ongoing basic universal income study at YC, blog.ycombinator.com/hiring-for-basic-income/ I hope produces some more clarification.
I guess that's one way to look at death from malnutrition, exposure or untreated illness.
We can wax optimistic about what post-automation life could be like, but let's be honest: right now, unless you are an investor in companies that have automated or provide automation solutions, you are in absolutely no position to see 'vacation, forever' on the horizon for yourself or your children in a post-automation world.
We should be frantically trying to do everything possible to fix that, however, because automation will be competing against the wage-labor relationship that the majority of people are dependent on.
More so it was just, for me when I was not very busy I kind of felt unhappy, am I depressed? What is my purpose? I think the drive might disappear that made us evolve/try to do things in the first place. Then perhaps we become extinct haha. Got too darn efficient.
I also realize when we talk it's usually people reverting to themselves talking about themselves (I'm doing this right now). A friend of mine said "that's what people do, that's how you converse, offer your perspective tangible to the current discussion..." I don't know I just feel that I I I I I I (use the letter I) too much.
Yes, you might have just had the misfortune of crossing paths with an awkward person. Ha.
Thanks though for entertaining my thought. Wall-e is the answer.
edit: subbed awkward for neurotic
Sorry but as another Google-coder I just had to say that from another perspective people pay you to do a job, to perform a task. You perform that task. How is up to you. ;)
Yeah can't be too copy-paste, gotta see what you're copying/pasting. Still the upvotes though/comments and date. Yeah really helpful and MDN/forums.
They thought the same was true of the robots flying their spaceships to fight the Marauders until Buck Rogers showed them he could fight the Marauders better than the robots. Something to do with red dogging the quarterback and going with gut instincts that robots could not do.
There's a lot of hand-wavey wishful thinking about some innate capability humans have that robots/AI somehow will be unable to obtain in sci fi, that will semi-magically ensure we remain superior.
It's the same kind of blind-spot you run into if you try to get people to explain how free will could be possible and ask them to define it.
Depends how our social structures will morph to support a society where having a job is no longer the norm and most people are in fact jobless.
In our current societies the way things stand all these masses of people will be living in slums fighting for scraps while those elite who control the system live in their walled off mini-societies and palaces.
On the other hand, until that day arrives, we could take the technology into a direction that actually helps users/customers and software engineers communicate better. The software engineer could have the user feed requirements to a bot, and systematically identify and explain issues in the requirements, based on the bot's output.
I initially took this to mean that the AI learnt how to generate the source code which makes up its own program, a bit like a quine I guess.
This is more likely to vanish in the flood of AI-based applications, before reappearing as a tool for coders akin to code snippets plus, or boilerplate generation 2.0.
> and third, the neural network’s predictions are used to guide existing program synthesis systems.
DeepCoder works with a very simple functional-ish toy DSL to solve very simple toy problems. It doesn't copy code, because the DSL is unique - and it's so simple there's no need to copy code, and nowhere to copy code from.
What it actually does is use an RNN to speed up a dumb search through the space of all possible programs written in the DSL by "learning" which code constructs are most common.
This works surprisingly well, but it's not obvious the process is generalisable to code written in production languages to solve complex problems with explicit logic and possible thread timing issues.
(It may well be. Naively I would expect a level of complexity beyond which the improved search stops working and/or is too slow to be useful. But I may well be wrong about that.)
Anyway - it's very, very interesting research. The article doesn't come close to explaining it or doing it justice, so it's worth reading the source paper.
Oh dear New Scientist. _Steal_? What was wrong with the original article title?