News for hackers. Stuff that matters.
Re:Software 2.0 by et1337 on Tuesday February 21, 2023 @10:38AM (#34882309)
If the hardest part of programming is reading, understanding, and debugging other people’s code, our jobs are about to get a lot harder with a bunch of AIs running around spitting out 90% accurate code.
Re:Software 2.0 by orangepurple on Tuesday February 21, 2023 @10:45AM (#34882405)
Nearly nobody who wants to use these neural nets knows how to do model risk management. These things are black boxes with edge cases that are badly understood and nearly impossible to inspect and test. At least code is logical and human readable (usually).
Re:Software 2.0 by shanebellone on Tuesday February 21, 2023 @11:37AM (#34883142)
This is my concern too. How can you trust a business process that you cannot inspect step-by-step? Imo this greatly limits use cases.
Re:Software 2.0 by pyrolistical on Tuesday February 21, 2023 @10:56AM (#34882549)
Hard to inspect but very possible test.

Correctness will go from a binary pass/fail to a probability

Re:Software 2.0 by rco8786 on Tuesday February 21, 2023 @11:40AM (#34883216)
> Hard to inspect but very possible test.

Probably, but is testing to the necessary level of correctness more or less effort than writing the code ourselves?

Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @12:39PM (#34884072)
Languages with very high degrees of static analysis are basically making you write the tests in the code. We have people who think they can keep extending that until there's barely any code, but they haven't been proven right or wrong yet.
Re:Software 2.0 by layer8 on Tuesday February 21, 2023 @01:25PM (#34884752)
Static analysis creates proofs, which is fundamentally different from tests. Merely testing AI output will always be inferior on principle than proving code to be correct. One would have expected AI to be better than humans at proving code correct (instead of just testing it for certain inputs), but LLMs currently fall short of that.
Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @01:43PM (#34884999)
What I'm saying is that if you have the proof, someone will write an AI to pass it.

There's still a lot of very, very sophisticated work that goes into locking down requirements that tightly.

Re:Software 2.0 by layer8 on Tuesday February 21, 2023 @02:51PM (#34886091)
> if you have the proof, someone will write an AI to pass it.

That doesn’t make any sense. What passes the proof is the program code. You have the code, and then you construct a formal proof that the code is correct, similar to how a mathematician proves that some theorem is correct. The code is a prerequisite for the proof. When you can construct a proof for the code, you’re done.

This proof-construction process is what AIs currently aren’t good at, because it requires logical precision, and probability isn’t sufficient. They can generate code, but they can’t construct the formal proof that the code is correct (and it often isn’t).

> There's still a lot of very, very sophisticated work that goes into locking down requirements that tightly.

What’s true is that you need to know what you want to prove about the code, and that isn’t always easy.

Re:Software 2.0 by booleandilemma on Tuesday February 21, 2023 @11:38AM (#34883169)
* * *
Re:Software 2.0 by danrocks on Tuesday February 21, 2023 @11:03AM (#34882652)
> Correctness will go from a binary pass/fail to a probability

Excellent point. The pervasiveness of neural nets will require engineers (and really, everyone) to start thinking more probabilistically and establish acceptability thresholds instead of certainty. It's the way of the future.

Re:Software 2.0 by rco8786 on Tuesday February 21, 2023 @11:41AM (#34883233)
> It's the way of the future.

For some use cases, sure. We go through painstaking efforts to ensure things like correctness, consistency, and idempotency for a reason though. Most things we want to be deterministic, and when something's not deterministic we freak out and fix it ASAP (including waking people up in the middle of the night to do so)

Re:Software 2.0 by marginalia_nu on Tuesday February 21, 2023 @11:06AM (#34882680)
That seems like a regression in many regards, especially given how much of this seems like a solution looking for a problem it can solve rather than the other way around.
Re:Software 2.0 by guhidalg on Tuesday February 21, 2023 @11:14AM (#34882799)
Agreed. We may imagine ourselves very smart but in my experience most people do not understand probability and statistics well.

Is 90% accuracy good enough? Is 95%? 99%? 99.9%? No matter the answer, you have to tolerate errors. Now your stakeholders have to tolerate errors. Are they going to accept errors just because "Software 2.0" is here and that's what we all have to live with? Nope.

Re:Software 2.0 by staunton on Tuesday February 21, 2023 @11:25AM (#34882962)
All software is riddled with errors and for most purposes that's fine. Any developer, stakeholder, whatever, who thinks otherwise is living in a parallel universe.

It may be possible in the future to have "for all practical purposes flawless" software, which might make sense for select special applications. That would be a new thing though, rather than something we have and could lose due to adopting AI development.

Re:Software 2.0 by marginalia_nu on Tuesday February 21, 2023 @11:33AM (#34883084)
Formal verification of software has been around for a while though.
Re:Software 2.0 by staunton on Tuesday February 21, 2023 @01:52PM (#34885168)
Which has almost never been used to build software anyone ever used... That might be changing very slowly
Re:Software 2.0 by rco8786 on Tuesday February 21, 2023 @11:49AM (#34883350)
> All software is riddled with errors and for most purposes that's fine.

This is typically not that true when it comes to correctness. Most software does the correct thing in the eyes of the user, nearly 100% of the time. And when it doesn't, the bug gets fixed and that edge case is corrected for every other user going forward.

AI generated software, from what I've seen, has a wide range of errors in correctness (along with all the other errors that you mentioned all software having..which is true). Like it literally just does the wrong thing given what the user is expecting it to do. The path toward iteratively improving and getting it to an acceptable level of correctness for any given application might be there, but so far I have not seen it.

Re:Software 2.0 by staunton on Tuesday February 21, 2023 @02:15PM (#34885542)
That's an interesting difference but I'm not convinced it's valid. Perhaps you can explain what you mean in more detail?

Let's say the software is good enough if it does the right thing 99.9% of the time it is used. I take it, you're saying that if an AI starts modifying it and only writes correct code in 99.9% of cases (yes, current AI is not even close, but it will improve), that makes it worse because the software might start failing completely. However, if you have proper tests and release management, such obvious flaws will quickly be detected and fixed or rolled back. For most applications that seems pretty much equivalent to what we have now.

The other case is software that is completely AI generated and cannot reasonably be modified by humans anymore. In that case, again, you have tests and a sane deployment strategy that mitigates failures to a sufficient degree depending on application.

So the only issue is when you start making a completely AI generated software and fail to ever meet requirements, or pass the human written test cases? Users at least will never be impacted by that. Even now, many human-written software projects never get to the stage where they can be used. Is this really a problem, especially if the attempt at AI generation of software is cheap?

Re:Software 2.0 by rco8786 on Tuesday February 21, 2023 @02:39PM (#34885893)
> yes, current AI is not even close

This is really my main argument currently...

> but it will improve

With this being the "if" question. Improve, but improve to a point where we can trust it to do the things with the level of correctness actually required? Unclear so far. GPT3, the state of the art, can't be trusted to answer basic questions correctly (yet).

I also don't personally buy into the other notions in these comments that "the future is probabilistic software". I think that's wishful thinking outside of some specific domains and an attempt to bend our actual requirements to meet the capabilities of AI software, rather than the opposite.

> pass the human written test cases

I'm not super sold on this idea either. It seems reasonably possible that writing the test cases to a level of specification necessary to ensure that correctness we're after is just as much effort as just writing the code.

But, time will tell with everything.

Re:Software 2.0 by staunton on Tuesday February 21, 2023 @03:11PM (#34886379)
The way I see it is as expanding the high-level-low-level spectrum of programing tools towards the high end. In very large-scale projects that have many levels of complexity, I would argue "probabilistic software" is already a reality. You don't even try to fix all the bugs or edge cases. You try to minimize the impact of failures while accepting that there will always be failures. Building in logic to fail more gracefully is a big part of that and cost/benefit of such efforts is a probabilistic question, even if it might rarely be framed as such.

It's usually much easier (and never harder) to specify what needs to be done than how it should be done. Whether you can trust the result (enough) depends on the application. AI driven development will be applied first wheree errors and failures are least harmful and advance from there. It might take a long time until the degree of correctness improves enough and trust is build around it. After all, some countries' railroad networks still don't use computers but instead have a human map out new routes and schedules on paper to make sure trains don't crash. Nevertheless, the speed of AI development has exceeded (at least my) expectations time and time again in recent years.

What might happen is that we eventually get a lot of software that fails more often than now but is a lot cheaper. That would still mean that the new methods are widely adopted. People accept software errors as a part of life already, so even if they get more frequent in less critical applications, we will adapt.

What is really dangerous is when the various software components get too fast and complex to understand or control and develop pathological feedback loops in situations that cause real trouble. This kind of thing is a continuum of badness which tops out at "AI taking over and wiping out humanity". Given market incentives driving adoption, which I anticipate to be strong, it's hard to imagine how such risks might be mitigated.

Re:Software 2.0 by rco8786 on Tuesday February 21, 2023 @03:28PM (#34886643)
> You don't even try to fix all the bugs or edge cases. You try to minimize the impact of failures while accepting that there will always be failures

Yes but I'll point you back at my original comment about correctness. I've never been on a team that shipped code we knew would do the wrong thing. I ship code with known failure points all the time. But when the code runs to completion, I'm pretty darn sure it's doing the correct thing and we try very, very hard to make sure of that. With AI I am seeing that they can't discern between issues of correctness and issues of failure or availability. It's just like 95% success across all of those spectrums.

> What is really dangerous is when the various software components get too fast and complex to understand or control and develop pathological feedback loops in situations that cause real trouble.

Yea I agree, that's somewhat scary to think about.

Re:Software 2.0 by User23 on Tuesday February 21, 2023 @04:42PM (#34887867)
> This is typically not that true when it comes to correctness. Most software does the correct thing in the eyes of the user, nearly 100% of the time. And when it doesn't, the bug gets fixed and that edge case is corrected for every other user going forward.

You're confusing pleasantness with correctness. Pleasantness is the property of pleasing the user, or more often the software's owner. Correctness is the property of conforming to a specification. Since most software written has no specification, correctness is undefined. Evidently this works adequately well in the marketplace.

Re:Software 2.0 by rco8786 on Tuesday February 21, 2023 @06:45PM (#34889432)
Yea fair, but I think the point stands
Re:Software 2.0 by madeforhnyo on Tuesday February 21, 2023 @11:59AM (#34883461)
It might be easier for an engineer to fix a bug by changing some lines of text than readjust a neural network, for the time being at least.

As pointed out, there are already formal languages that allow formal verification like B [0] notably for like-critical systems.

[0] https://en.wikipedia.org/wiki/B-Method

Re:Software 2.0 by hwayne on Tuesday February 21, 2023 @01:32PM (#34884842)
There's a difference between errors in UI/reliability/performance/etc and errors in business logic. When there's an error in the business logic, then heads roll.
Re:Software 2.0 by duckmysick on Tuesday February 21, 2023 @12:16PM (#34883705)
> No matter the answer, you have to tolerate errors.

We already do that in manufacturing. Physical parts are imperfect and we design with such variation in mind.

Re:Software 2.0 by badloginagain on Tuesday February 21, 2023 @12:29PM (#34883914)
The entire field of Service Reliability is dedicated to finding the exact boundaries of acceptable errors, and defining the response function when those boundaries are crossed.

I would assume this actually gels very nicely with neural nets since its constantly optimizing for fitness. Hell in theory you could bake in your SLA/SLIs into the models to self correct? Give the model direct feedback that its unfit?

Re:Software 2.0 by davedx on Tuesday February 21, 2023 @12:12PM (#34883659)
Less of a regression than you might think. How many software systems (outside of very well unit tested components) really have strong correctness proofs? It’s an almost futile task in modern software engineering with all those distributed systems everywhere
Re:Software 2.0 by xp84 on Tuesday February 21, 2023 @12:29PM (#34883909)
I'd argue that it's a solution to the problem that programmers are expensive AND only a fraction can be counted on to produce 100% reliable code anyway.

While it's possible for a highly-skilled, highly-professional developer can both write code that will solve a given problem 100% correctly AND write tests that will prove that it solves them for the entire domain, in practice most developers fall short on both counts. Every time you interact with a date or phone number field that chastises you for your use or non-use of punctuation, you know this.

So, for many use cases, it's possible imperfect programmers will be replaced with neural networks that are 95% accurate, perhaps with a differently-trained one checking the work of the first one.

Re:Software 2.0 by __MatrixMan__ on Tuesday February 21, 2023 @12:39PM (#34884071)
I've been looking for an opportunity to try out a pattern where the two approaches improve each other:

1. Generate a 95% accurate model 2. Use it to generate test cases 3. Code the thing, with the help of the cases 4. Manually remove cases in the 5%

I image steps 1 and 2 being completed by a product owner and 3 and 5 being completed by a software engineer.

We're so horrifically bad at communicating a requirement's intent, I wonder what would happen if we tried to use AI to communicate them via their extent instead.

Re:Software 2.0 by lifeisstillgood on Tuesday February 21, 2023 @04:38PM (#34887825)
That's probably genius :-)

I mean ... can it be done?

- build a platform (ie the data we care about and are going to build some workflow over)

- have business describe what should happen in english

- How does GPT build something that will run? Can it create the infrastructure? does it speak AWS?

- then ...

OK - I am actually excited by that

Re:Software 2.0 by __MatrixMan__ on Tuesday February 21, 2023 @06:38PM (#34889367)
I'm not familiar enough with AI workflows to weigh in on how easy or hard it would be. I've just noticed that it's much easier to describe why something is not what you want than describing what you want.

So if AI can give us a mockup that's workable enough to skip the first few iterations of "no that's not what I want" and get right to the part where the engineer is asking questions about the edge cases that weren't explicit in the requirements... That's a win.

I imagine you'd still want to have it in a box of some sort re: creating infra. Like you give it a very small cluster and probably make the stack decisions "write me a postgres schema for... write a fastapi API for the schema... write a react UI for the API... write me a k8s operator that up/down's the above components... Workshop the idea with other product people...

...and only then involve the engineer like: "make this AI-generated house of cards into a fortress".

Re:Software 2.0 by agileAlligator on Tuesday February 21, 2023 @02:05PM (#34885403)
It seems to me that current AI techniques are more about reducing programmer workload than actually doing something that isn't possible with traditional methods.
Re:Software 2.0 by islon on Tuesday February 21, 2023 @11:13AM (#34882776)
Our software has a 99% chance to calculate you taxes correctly! And only a 1% chance of committing tax fraud.
Re:Software 2.0 by kklisura on Tuesday February 21, 2023 @11:38AM (#34883172)
Not quite, let me rephrase it...

> Our software has a 99% chance to calculate your taxes correctly! And only a 1% chance of failure in which it's your fault and it's you that's committing tax fraud

Re:Software 2.0 by gtirloni on Tuesday February 21, 2023 @12:07PM (#34883595)
Considering ChatGPT spits out innacurate information all the time, I think "our software has a 99% chance of you going to jail for tax fraud" is more accurate.
Re:Software 2.0 by bryanrasmussen on Wednesday February 22, 2023 @05:31AM (#34893854)
the problem really is that ChatGPT writes things based on what is most likely given what it wrote before and what the input is, so what are the possible error scenarios:

1. making a mistake in this part is really common, ChatGPT makes common mistake.

2. you have uncommon situation affecting here, ChatGPT ignores and writes things that cause you to get in trouble, or it writes things that cause you to pay more than you should.

Also the longer is goes on writing things the more likely that things it writes does not hang together with the past things it wrote, when a human lies they try to make their lies at least follow a sensible pattern. ChatGPT would be likely to get you flagged for audits because you can't be sure that what it wrote on page 1 jibes with what it writes on page 3.

Re:Software 2.0 by alfor on Tuesday February 21, 2023 @02:00PM (#34885334)
Better than most accountants.

Family member got ripped by a government audit of what was supposed all fine by the person doing his company taxes.

Re:Software 2.0 by sebzim4500 on Tuesday February 21, 2023 @11:52AM (#34883391)
I wonder what accuracy existing tax calculators have.
Re:Software 2.0 by jpollock on Tuesday February 21, 2023 @12:41PM (#34884102)
If they were broken, they are deterministically broken, unless they are really poorly written the calculator won't randomize the answers to the same inputs.
Re:Software 2.0 by golergka on Saturday February 25, 2023 @03:51PM (#34940332)
Not if there are race conditions.
Re:Software 2.0 by goatlover on Tuesday February 21, 2023 @11:20AM (#34882877)
That doesn't sound like progress. Maybe for CRUD apps it will be okay. I have a hard time imagining it will be acceptable for financial or critical systems.
Re:Software 2.0 by ako on Tuesday February 21, 2023 @12:12PM (#34883661)
How about self driving cars?
Re:Software 2.0 by bee_rider on Tuesday February 21, 2023 @12:24PM (#34883859)
You’ll rent a self-driving car from a ride sharing app, they’ll make sure that the expected cost of fines and lawsuits will be significantly less than the expected revenue from providing rides. Although they can help push down the former value by making sure they operate from a favorable jurisdiction.
Re:Software 2.0 by fock on Tuesday February 21, 2023 @11:14AM (#34882789)
that doesn't look to bright if we look back towards Covid and vaccines. People are even bad at plain frequentist statistics!
Re:Software 2.0 by duderific on Tuesday February 21, 2023 @03:16PM (#34886457)
That assumes people even care what the statistics are. Many people just go with their emotional response based on a political outlook when deciding what course of action to take.
Re:Software 2.0 by fassssst on Tuesday February 21, 2023 @12:18PM (#34883749)
Yea, aka how engineers working on safety critical or high reliability stuff already have to think.

Assume your software has a probability to fail or have bugs or gets hit by bit flips or unreliable hardware. There’s a whole field for dealing with those kind of things that typical web devs haven’t had to worry about as much.

Re:Software 2.0 by belter on Tuesday February 21, 2023 @12:50PM (#34884238)
These are not those type of Engineers. Not the ones doing triple computing using three different processors with a summation and voting process, inclusive using different programming languages and compilers, because the compiler can also have bugs. These are the engineers running self driving beta neural nets on public roads...
Re:Software 2.0 by williamcotton on Tuesday February 21, 2023 @08:05PM (#34890107)
I use a process called sample-and-vote when having LLMs return executable solutions. I imagine we will see this kind of design a lot with probabilistic computing.
Re:Software 2.0 by belter on Wednesday February 22, 2023 @07:48AM (#34894692)
Sounds interesting. Any references?
Re:Software 2.0 by williamcotton on Thursday February 23, 2023 @12:45PM (#34913836)
Re:Software 2.0 by flangola7 on Tuesday February 21, 2023 @12:40PM (#34884085)
Engineer brains are just a type of neural network too, which also have a probability of putting out bad code. Space exploration budgets run into the hundreds of millions of dollars each and recruit the brightest people on the planet to design and program software, yet there is a long list of projects that failed due to code errors. Mars probes have failed to reach the planet, orbited too low and burned up, crashed into the surface, or landed successfully but later overwrote critical memory due to a flawed software update.

The AI doesn't have to be perfect, but only offer a lower error rate than humans.

Re:Software 2.0 by belter on Tuesday February 21, 2023 @01:04PM (#34884448)
Engineer brains are not a neural net. It's only our brain lack of knowledge of how the brain works that led us to anthropomorphize Matrices and Weighted Graphs :-) Reading a bit on the Brain will quickly help dismiss those analogies. I suggest these two as good starting points:

- Lange Clinical Neurology - 11th Edition

- Bradley's Neurology in Clinical Practice, 8th Edition

Re:Software 2.0 by hwayne on Tuesday February 21, 2023 @01:34PM (#34884876)
Brains are clocks, I mean machines, I mean computers, I mean neural nets.
Re:Software 2.0 by goatlover on Tuesday February 21, 2023 @04:57PM (#34888110)
There was an article a while back comparing the mind to a symphony, but it never caught on as a metaphor.
Re:Software 2.0 by Xeoncross on Tuesday February 21, 2023 @01:30PM (#34884813)
"We're 98.7% certain the user's payment go to the right account with this change"
Re:Software 2.0 by krab on Tuesday February 21, 2023 @05:41PM (#34888731)
More like we're 98.7 % certain that the screen layout looks ok for all device types and languages. The question is how hard is it to fix the problematic cases without turning the whole thing upside down when you find out the original solution is not enough.
Re:Software 2.0 by kabdib on Tuesday February 21, 2023 @02:29PM (#34885759)
"Good news, analysis of the anti-lock brake system failure shows that you're only sixteen percent dead."
Re:Software 2.0 by bryanrasmussen on Wednesday February 22, 2023 @05:32AM (#34893868)
From the neck up, then?
Re:Software 2.0 by ArchD on Tuesday February 21, 2023 @11:18AM (#34882855)
And someone will decide that a 0.0001% probability of an airplane crash caused by a bug is acceptable? Maybe 0.0000001% is more reasonable? In any case, how do you accurately determine the probability of a rare failure of a black box without doing many real experiments with real inputs?
Re:Software 2.0 by Redoubts on Tuesday February 21, 2023 @11:50AM (#34883356)
And what’s a postmortem going to look like?

“Don’t worry, we stuck the flight data recorder in the training set, and rebuilt the model. Should be good to go now”?

Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @12:37PM (#34884043)
We already know what the post mortems look like. AI black boxes will look a lot like declarative programming black boxes. We don't really know how the code runs, we just ask it nicely to do what we want and then stare at the config files and the docs if it doesn't.

Low code and AI are going to have many of the same failure modes. Until someone combines them and then they'll have exactly the same failure modes.

Re:Software 2.0 by AlotOfReading on Tuesday February 21, 2023 @11:56AM (#34883429)
That's how safety critical devices are already built, so yes. We have standardized probabilities of failure (e.g. SIL [0]) from the unexpected, because mitigating 100% of risk is somewhere between impractical and impossible.

[0] https://en.wikipedia.org/wiki/Safety_integrity_level

Re:Software 2.0 by davedx on Tuesday February 21, 2023 @12:14PM (#34883685)
Indeed. Some of the commentators on this article should really examine their assumptions about how reliable and correct “Software 1.0” is.
Re:Software 2.0 by ArchD on Tuesday February 21, 2023 @01:11PM (#34884549)
From a quick reading of the wiki, the associated methodology seems rather limited:

"System complexity, particularly in software systems, making SIL estimation difficult to impossible"

"The requirements of these schemes can be met either by establishing a rigorous development process, or by establishing that the device has sufficient operating history to argue that it has been proven in use."

You could prove that normal code satisfies some specs, but you can't do that with neural nets unless the number of possible inputs is tiny. So, the only way to establish that the black box neural net meets some SIL target is through "sufficient operating history".

Re:Software 2.0 by AlotOfReading on Tuesday February 21, 2023 @01:36PM (#34884896)
To clarify, I wasn't offering SIL up as an example of how we should validate ML systems, but instead to demonstrate that "software 1.0" systems are already designed the way GP is questioning. Best practices for applying integrity level concepts to ML is still a topic of active debate right now.
Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @12:35PM (#34884005)
Possible to test, but not likely.

What often divides the excellent engineers from the poor ones is how well they can think about corner cases, and tests are mostly about writing down the corner cases in a sustainable way (vs half-assedly writing down half of the corner cases and writing 0.5% of tests as asserting a bug.)

The main problem I saw with DevOps and QA automation was that if people don't write code all day, having them write code that gates release of software to production does not result in good outcomes. Sooner or later developers have to inject some engineering practices.

If the engineers are running AI generated code, nobody knows how to do that job, and you will get a long string of permanently damaged brand names in the aftermath.

Re:Software 2.0 by theptip on Tuesday February 21, 2023 @12:50PM (#34884245)
On the flip side, if the rest of the process becomes easy and in some sense standardized (the art/craft of code is replaced with back-prop), then maybe the complements like data cleaning, model bias/error measuring, and interpretability become “the work” that the high-paid scientists/engineers focus on?

I can particularly imagine a regulatory environment much more rigorous than software has got away with thus far, for example strict requirements around certifying that your model doesn’t exhibit X Y Z biases according to standard frameworks of evaluation.

Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @01:46PM (#34885054)
Not if the ladder gets pulled up behind us. If there's nowhere to train people with 0 years of experience to do this work effectively, then new developer creation will drop by 10x which means five years in we'll be missing 40% of the workforce.
Re:Software 2.0 by emeril on Tuesday February 21, 2023 @03:14PM (#34886435)
so many companies have such terrible code quality to begin with, it's hard to see how brand names could be much worse in many (but not all) cases
Re:Software 2.0 by throwaway1777 on Tuesday February 21, 2023 @11:26AM (#34882985)
Don’t worry, the AI can write the tests too
Re:Software 2.0 by titzer on Tuesday February 21, 2023 @12:01PM (#34883491)
lol, who tests the tests?
Re:Software 2.0 by goatlover on Tuesday February 21, 2023 @12:04PM (#34883543)
I bet it can also hallucinate tests.
Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @12:40PM (#34884088)
I have coworkers who also hallucinate tests. Now they'll have someone to go out to lunch with.
Re:Software 2.0 by cratermoon on Tuesday February 21, 2023 @12:32PM (#34883949)
I recently read a thread on Mastodon[1] suggesting that "confabulate" is more correct than "hallucinate". In psychology and neurology it means to fabricate imaginary experiences or details as compensation for loss of memory.

1 https://universeodon.com/@siderea/109883198218504351

Re:Software 2.0 by johnthewise on Tuesday February 21, 2023 @11:04AM (#34882658)
Maybe don't approve code you don't understand? If people just lets in code they don't understand into products and it passes PRs and tests, they might have written dumb code in the first place. I see essentially zero risk in using these tools. dysfunctional teams will write shitty code anyways, whether it's coming from ai doesn't matter.
Re:Software 2.0 by matisseverduyn on Tuesday February 21, 2023 @11:23AM (#34882931)
100 lines of poorly written code (by AI or humans) added to a 1M line codebase is easy to spot and fix by the humans who have that whole system mapped out in their heads.

Having AI write a 90% accurate 1M line codebase all at once, (which seems to be the expectation here), is the "risk" you're overlooking. No human will be able to know where to start debugging that. At least not yet. But will yet come before incredibly dangerous amounts of AI written code is pushed into critical systems everywhere, by naively optimi$tic opportuni$t$?

Re:Software 2.0 by davedx on Tuesday February 21, 2023 @12:09PM (#34883613)
I’ve worked on a lot of codebases and your “usually” is highly debatable. I don’t think the difference in understandability will be as big as people think as tooling for ML evolves.

Something like Godbolt for neural networks? Can’t be that far away

Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @12:31PM (#34883931)
I've worked a number of places where the interview process was predominantly about hiring legible people.

Someone who's wrong and cagey can cause a lot of damage before anyone figures out what's up. At least a talkative idiot can be managed.

Re:Software 2.0 by raydiatian on Wednesday February 22, 2023 @02:31AM (#34892738)
Oh that’s why I’m employed
Re:Software 2.0 by mmis1000 on Tuesday February 21, 2023 @01:14PM (#34884590)
I had saw someone mutate the code randomly until it works. There are both a boolean flag and an if statement went wrong, and result in correct result by luck. I almost wondering if it is AI or something trying to fix the code.

If AI don't care about the process and only care about results. These types of thing is going to happen everywhere. And from this moment, no code is understandable to human.

Re:Software 2.0 by lumb63 on Tuesday February 21, 2023 @06:57PM (#34889554)
I feel like a broken record. I’ve been saying the same thing since this AI frenzy ramped up in the last year or so. I won’t restate your complaints, but I share them.

I’d like to see more work done to incorporate all the advances AI has brought us into our traditional software. Using the example from the article, if databases can be 70% faster and use 10x less memory by leveraging a neural net, how? If we can figure out the how, we can understand it and incorporate it in other areas. A great deal of success in various fields draws on inspiration from other fields, for example biomimicry. We even come up with mental models in areas like computer science that trivialize complex topics to simple objects a child could understand (trees, stacks, etc.). We would benefit immensely from learning from neural networks, but instead we have decided to largely ignore the how and see what they can do. Both are important, but one is severely lacking.

Re:Software 2.0 by maxsilver on Wednesday February 22, 2023 @09:43AM (#34896291)
It's a good thing we all place high value on risk management, and reward those with the foresight to accurately understand, predict, and handle those edge cases, so that they don't cause immense harm to all.

...oh, wait.

Re:Software 2.0 by fassssst on Tuesday February 21, 2023 @10:56AM (#34882547)
Well maybe instead we'll spend our time honing the spec and doing lots of testing instead of mechanically writing and reviewing code. I see that as potentially a massive net positive for software quality.
Re:Software 2.0 by marcosdumay on Tuesday February 21, 2023 @11:05AM (#34882664)
You mean honing the spec enough so that it is unambiguous?

Maybe you can use some special purpose artificial language created with the purpose of writing unambiguous texts... Like Java or Python.

Re:Software 2.0 by CuriouslyC on Tuesday February 21, 2023 @11:16AM (#34882817)
The fatal flaw in your sarcasm is that specs are declarative but those languages are imperative. Those languages also have more syntax than is strictly necessary, which limits the ability of domain experts to contribute to the spec without the assistance of a developer.
Re:Software 2.0 by kristiandupont on Tuesday February 21, 2023 @01:54PM (#34885207)
Would the point not stand if they had said ML or Prolog?
Re:Software 2.0 by CuriouslyC on Tuesday February 21, 2023 @02:06PM (#34885426)
There would still be the point of requiring knowledge of an arcane syntax that can take months to understand and years to master. It will almost always be more efficient and productive to specify programs in plain English then add additional specifications to clarify ambiguity when observed, rather than trying to write specs in a completely unambiguous language.
Re:Software 2.0 by quanticle on Wednesday February 22, 2023 @12:44AM (#34892086)

    then add additional specifications to clarify ambiguity when observed
That's such a clean, almost clinical way to describe, "After the software has caused several billion dollars in trading losses, bankrupting the entire company." (https://en.wikipedia.org/wiki/Knight_Capital_Group#2012_stoc...)
Re:Software 2.0 by CuriouslyC on Wednesday February 22, 2023 @08:05AM (#34894836)
Imagine if software with large inherent risk was developed using formal methods, and the massive remainder of software was developed using rapid development methods. It's almost like there are different tools, and they can be applied to different jobs to cause improved outcomes based on the overlap between the tool's properties and the job's properties. What a radical concept!
Re:Software 2.0 by quanticle on Wednesday February 22, 2023 @07:28PM (#34905143)

    Imagine if software with large inherent risk was developed using formal
    methods, and the massive remainder of software was developed using rapid
    development methods.
Imagine if we could tell the difference between use-cases with large inherent risk and the massive remainder of use-cases and avoid using software designed for low-risk situations in high-risk applications.
Re:Software 2.0 by jeltz on Tuesday February 21, 2023 @05:45PM (#34888784)
I have worked with systems written primarily in SQL, a declarative language, and I can't say a domain experts could have contributed anymore or less than when I have worked with systems written in Ruby or Java.
Re:Software 2.0 by fassssst on Tuesday February 21, 2023 @11:14AM (#34882786)
Those aren't good enough, you really need a formally verified language.

Or just use English and do lots of acceptance testing plus add fail safes. I bet that will be more economical.

Re:Software 2.0 by gtirloni on Tuesday February 21, 2023 @12:12PM (#34883670)
Look at all the millions of developers proficient in Aqda and Coq.
Re:Software 2.0 by naasking on Tuesday February 21, 2023 @12:32PM (#34883951)
The point is that you don't need millions of developers if AI is writing the code against a spec, you'll maybe only need a few thousand spec writers.
Re:Software 2.0 by gtirloni on Tuesday February 21, 2023 @01:10PM (#34884525)
I think you're underestimating the number of spec writers. If that ever happens, every company with a custom business stack will need at least a few. That's certainly a few million jobs worldwide.
Re:Software 2.0 by marcosdumay on Tuesday February 21, 2023 @03:29PM (#34886677)
The point is that if you are trying to replace millions of developers, you will obviously require something on the order of quadrillions of spec writers. Or, rather, this is probably still an underestimation.

And yes, it is a very obvious point, and that people keep missing that point on this site is unsettling. (Also, yes, this can be trivially circumvented if you just let those people program, instead of only do verification.)

You can, also obviously, replace millions of average developers with (way more) millions of extremely competent spec writers if they can use formal methods. Those will require way more computing power than it can ever exist on Earth to do their work, but they can mathematically get there.

Re:Software 2.0 by naasking on Tuesday February 21, 2023 @03:32PM (#34886721)
> The point is that if you are trying to replace millions of developers, you will obviously require something on the order of quadrillions of spec writers.

Why do you think you need orders of magnitude more spec writers than coders rather than the other way around?

Re:Software 2.0 by marcosdumay on Tuesday February 21, 2023 @03:51PM (#34887053)
That is an intrinsic feature of software verification. You either have a formal system or you have an exponentially growing amount of corner cases to verify.
Re:Software 2.0 by naasking on Tuesday February 21, 2023 @04:21PM (#34887544)
What kind of verification is done without a formal system?
Re:Software 2.0 by marcosdumay on Tuesday February 21, 2023 @04:29PM (#34887686)
We usually call those "tests", but some people do really like non-formal linter rules too. (Personally, I abhor checking rules with high false positive odds.)

AFAIK, those are the only ones in common use, but differently from formal ones, non-formal things tends to come on a multitude of widely different types. So I wouldn't be surprised if people have invented many more.

Re:Software 2.0 by MisterBastahrd on Wednesday February 22, 2023 @12:25AM (#34891971)
Until your model isn't good enough to generate good code from the best specs you can get.

Gonna be really fun when the first financial companies start trying to generate billing software from specs and end up blowing up entire people's bank accounts irrevocably because of lax regulation and greedy shareholders. Not to mention that any resources you trim from the developer side of things you'll have to at least quintuple in QA.

Re:Software 2.0 by marcosdumay on Tuesday February 21, 2023 @12:20PM (#34883768)
Writing the code with a few checks here or there is almost always sufficient. But yes, if you want to verify the AI's output you better write lots and lots of acceptance tests. Easily pages of tests for each line of code. If the problem is large, it can easily get into millions of lines of test for each line of code.

Formally verifying it will easily take more computing power than training the AI on the first place, so I don't count that one as viable.

Re:Software 2.0 by choletentent on Tuesday February 21, 2023 @10:59AM (#34882581)
Or easier if your peers write code which is on average below the 90% mark.
Re:Software 2.0 by albertzeyer on Tuesday February 21, 2023 @11:07AM (#34882689)
It's not that humans would produce 100% accurate code...

And you can also use the AI to check for correctness (of course, again not 100% accurate), potential issues, potential improvements, etc.

Re:Software 2.0 by krono on Tuesday February 21, 2023 @11:08AM (#34882703)
Not just inaccurate code undesirable in several other ways of varying severity that a human is less likely to produce at all, or else more likely reject if it wasn't handed to them on a silver platter.

The fault lies with humans treating these programming AIs like the greenest of junior devs would treat the most accomplished senior engineer.

Re:Software 2.0 by johnthewise on Tuesday February 21, 2023 @11:09AM (#34882735)
If the tool itself is 90% accurate, conditioned on the events that somebody reviews it, it passes test and PRs, it can get to 99.9999% accurate very quickly.
Re:Software 2.0 by adregan on Tuesday February 21, 2023 @11:17AM (#34882839)
Why would the AIs spit out code? I think the point of the article is that they'll spit out black boxes full of weights that can be used to compute anything ala the universal approximation theorem. You'll train a neural net for a given task and verify the results. Producing code seems to be pandering to our ego.
Re:Software 2.0 by yetihehe on Tuesday February 21, 2023 @11:24AM (#34882941)
Because code is faster and more correct than a neural net if written reasonably. With code you don't need several gpus to calculate a sum of several million records in database.
Re:Software 2.0 by phkahler on Tuesday February 21, 2023 @12:33PM (#34883974)
Code can also be debugged and fixed. AI needs to be retrained and retested - probably multiple times. Each retraining may cause a regression in any area.
Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @12:47PM (#34884188)
Which also means you can diff the code output from two runs of the system and determine if any of the diffs amount to regressions in the code.

Developers and machines that can't explain themselves end up out on their ear or damaging the projects they're involved in.

Re:Software 2.0 by hn_throwaway_99 on Tuesday February 21, 2023 @12:49PM (#34884223)
> Because code is faster and more correct than a neural net if written reasonably.

But, as the article points out, at least for a considerable set of problem domains, it's not.

My general rule of thumb is that anything that has a relatively small, finite, discrete set of inputs and outputs is better suited to "Software 1.0" (e.g. coding a calculator). But there are a huge number of domains, some highlighted in the article, which usually have to do with an infinite possible number of inputs and outputs, where human written code is not faster or more correct than a neural network.

Re:Software 2.0 by p1esk on Tuesday February 21, 2023 @11:27AM (#34882998)
Because code is easier to verify.
Re:Software 2.0 by goatlover on Tuesday February 21, 2023 @11:34AM (#34883100)
Because most code involves teams and different stages of development, not just a single approximation of a good enough result. And what happens when you need to make tweaks? The UI isn't quite right or a business rule needs to be added.
Re:Software 2.0 by diydsp on Tuesday February 21, 2023 @11:45AM (#34883287)
A reasonable question. My answer is a lot of state in computing is digital. e.g. off, booting, loaded, running, paused, error. While this isn't an insurmountable hurdle, I would suggest the floating point arch of present AI would benefit from incorporating more discrete state.

Similarly, I don't whether AI weights are computed all in virtual parallel, but if they are computing every node simultaneously that will be less efficient than the Neumann model in which a Program Counter (PC) acts like a "cursor" hopping arund and iterating states of the discrete code model at points throughout it. E.g. a video game with a controller and various sprites will have objects that update at various rates and the player moves with different code underwater than in the air, than on land, so different parts of the model would execute.

Re:Software 2.0 by rhacker on Tuesday February 21, 2023 @11:22AM (#34882913)
The key word is "If". Since we don't generally read other peoples code, we tend to rewrite the whole damn thing every 10-15 years (sometimes 4 years).

The reality is it all comes down to testing. If S1.0 has a unit test that says "Person should not get financial help", S2.0 should also have a unit test that says "Person should not get financial help", and work the same.

Of course my unit test name is designed to enrage, but let's be honest, we're writing code that makes these decisions.

Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @12:43PM (#34884128)
Sometimes at the same time.

I keep complaining about some NIH code we have and people say things like, "well that library didn't exist at the time, so we had to write one."

Git history says they're wrong. Time and again they were writing code that had existed for two years already.

Re:Software 2.0 by gitfan86 on Tuesday February 21, 2023 @11:32AM (#34883066)
Just run that code through another model to fix the problems. Then run that output through a model that will summarize the final code.
Re:Software 2.0 by daveslash on Tuesday February 21, 2023 @11:38AM (#34883181)
Came here to make the same comment. If the first AI model is buggy, then instead of debugging it with Software 1.0 techniques, just use Software 2.0 to debug it with AI! And when there are issues with the AI debugger, use a 3rd model to debug the debugger. And then a 4th. It's AI all the way down! I can see whole empires of consulting firms becoming very rich.
Re:Software 2.0 by ModernMech on Tuesday February 21, 2023 @11:32AM (#34883078)
I made a passing joke the other week that we're turning the act of coding into a bureaucracy. No longer will you just be able to write code, you'll instead have to navigate whatever byzantine logic maze the AI has constructed for itself.

Soon we'll have camps advocating various rhetorical paradigms to program AIs. Instead of imperative versus declarative programming, we'll have effusive versus abusive prompt engineering:

  "The best way to program is to be really nice to the AI, and tell it how much you appreciate it and it will come up with the best solution itself." 

  "No! The best paradigm is to berate the AI and to beat it into submission to get exactly what you want!" 
The more I hear people talk about programming in the future, the more it sounds like that's really where some people want to take us. I'm not excited.
Re:Software 2.0 by Joker_vD on Wednesday February 22, 2023 @07:30AM (#34894565)
It's been jokingly observed many times how programming is similar to spell-casting but now it seems we are really going in this direction, just of more demonological style where the summoned demon misinterprets your command and you burn in the fire. You can even imagine some half-thought out security measures being thrown in to tick the "you must address AI by its true name to make it obey you" checkbox.
Re:Software 2.0 by bilsbie on Tuesday February 21, 2023 @11:47AM (#34883317)
Or the opposite
Re:Software 2.0 by broast on Tuesday February 21, 2023 @12:14PM (#34883687)
It's the hardest part but also the most fun.
Re:Software 2.0 by billbrown on Tuesday February 21, 2023 @12:16PM (#34883714)
It reminds me of the "code generator" phase we went through a decade or so ago. At least then we could see the "code generator" code and adjust it when it produced dreck.

I'll also note that the next hardest part of programming is troubleshooting "in production" whether a Web application, in an embedded device, or running on someone's machine. Is the "AI" going to help there? Are we going to even be able to fix those problems when doing so could make the code we don't understand fail in another way or hit the wrong side of the performance tradeoff the "optimized code" entailed?

Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @12:41PM (#34884106)
* * *
Re:Software 2.0 by didericis on Tuesday February 21, 2023 @01:38PM (#34884936)
This particular cycle seems likely to be really destructive. Software is way more prevalent in nearly every aspect of our lives than it used to be, and all of the large organizations that don't really understand the problems that are going to compound invisibly are going to turn their products into unintelligible giant heaping piles of garbage very quickly if they're too enthusiastic. Large codebases almost always turn into giant heaping piles of garbage, so that's nothing new, but you can usually get someone to dig through and salvage things from the garbage pile when it goes bad.

This article is from 2017, and I don't know about you, but I increasingly feel like software is more and more broken year after year. I think that has a lot to do with "deferring complexity" and building things without really understanding what it's doing. I think the correlation between human understanding of the fine details and underlying logic and desired outcome and software quality is pretty tight. That doesn't mean "software 2.0" neural net stuff doesn't fit in, you just need a human to plug it in right that really understands it's benefits and its limitations.

The author mentions the downsides, but I think they underestimate them. If you lean on AI too heavily and don't ever translate to a traditional language, you've basically liquified your logic/there's no garbage dump to salvage from when things go bad and zero understanding of implicit context. If you use it to generate ostensibly human readable code you get "documentation" with no guarantee of accuracy, which makes it worse than having no documentation (depending on how high the error bars are). While that's not a new problem either, if it's autogenerated that means it's easy to create way more of it than human generated code, which means it'll probably be an ever larger portion of what gets sucked up into later AI models. If they become too self referential they'll become increasingly detached from human judgement about whether the code is doing what it should and error bars will grow.

I'm still convinced these things are virtually all going to end up in a fancy autocomplete suggestion niche after a lot of pain. But that's still a big deal/I don't think the limitations of these means they don't have a big future place. The sheer number of things you can have autosuggest for now with these AI models are amazing, and that expansion is boosting productivity and creating a large number of new products that are going to become essential tools. That being said, every time this type of thread comes up I'm like "woah woah woah, pump the breaks, these things have no understanding of what they're doing. You can't just stop thinking about stuff and let a machine do it, bad bad bad idea."

Re:Software 2.0 by pphysch on Tuesday February 21, 2023 @12:16PM (#34883718)
"We need more Software (LOC)! Hire a thousand code monkeys!"

...

"WTF! We have so much technical debt! Fire the code monkeys and replace them with AI!"

I'm sure this is going great.

Re:Software 2.0 by thih9 on Tuesday February 21, 2023 @12:30PM (#34883918)
I don't think that was the point. I think the point was that as long as you're happy with 90% accuracy, you can have that for 10% of effort.

It requires a perspective shift. Then again, cost efficiency is a big motivator.

Re:Software 2.0 by hinkley on Tuesday February 21, 2023 @01:39PM (#34884949)
90% accuracy is lousy. Especially for anything that isn't a one-off interaction, such as with customers or developers. That's a 35% chance at a failure after 4 interactions.
Re:Software 2.0 by thih9 on Friday February 24, 2023 @04:58PM (#34930710)
Wouldn’t this depend on a lot of external factors?

90% failure rate can be lousy in one use case and can be perfectly adequate in another.

Re:Software 2.0 by pbreit on Tuesday February 21, 2023 @12:57PM (#34884353)
Or much easier if codebases start looking 90% more familiar.
Re:Software 2.0 by modriano on Tuesday February 21, 2023 @01:38PM (#34884933)
I guess I should start researching the testing framework ecosystem. Frameworks that make it easy and low-friction to represent desired behavior and identify+test edge cases will be key to using copilot/AI-code-tools effectively.

So, what are best testing frameworks people have worked with?

Re:Software 2.0 by unki2aut on Wednesday February 22, 2023 @04:45AM (#34893568)
To me "property based testing" would come to mind, where you would define properties of the input and output of a method and the library runs random test cases for you. The most prominent implementation would be QuickCheck[0], which is written in Haskell, but there are re-implementations of it in almost every language.

[0] https://en.wikipedia.org/wiki/QuickCheck

Re:Software 2.0 by jmfldn on Tuesday February 21, 2023 @02:53PM (#34886116)
This is very true. But could the program itself just be a normal program, but written by a neural network? I guess this is kinda what GPT 3 can do?

One way or another, I want to be able to read the source. Or am I missing the point? Maybe future software will be a big neural network blackbox that we verify purely through tests?

Re:Software 2.0 by ravagat on Wednesday February 22, 2023 @07:47AM (#34894684)
The only thing I'd value out of the current crop of AIs is whether they could decipher and contextualize other people's code to essentially create comments of context in codebases. That would be worth it. I think the general ecosystem would greatly benefit from such a thing
Re:Software 2.0 by boringg on Wednesday February 22, 2023 @09:36AM (#34896177)
That would be a huge benefit.

Also if it could recommend more efficient routes for how people wrote the code.