Forgot your password?
typodupeerror

Comment Agents are good at finding bugs, not writing code (Score 1) 32

I've had no success getting Agents to help write code for SQLite. All the code I've asked Claude to write for me is slop that didn't work or worked poorly and never got committed. On the flip side, I do ask Claude to review the code that I write prior to committing, and it is good at that, often finding serious oversights that I had missed.

This observation, that agents are good at code review but bad at writing original code, seems to carry through into AI-generated bug reports coming into SQLite from third parties. The bug reports are generally good, but the suggested fixes not so much.

One report from about a month ago illustrates this. The median() aggregate function in SQLite is implemented by collecting the input values into an array of doubles, using quicksort to put them in order, and return the one in the middle. The bug report showed a carefully devised sequence of 1 million inputs that caused pathological O(N*N) behavior in the quicksort algorithm, which caused recursion to go too deep and blow out the CPU stack. The AI's suggested fix: Add a depth parameter to the quicksort algorithm and fail over to a slower sorting algorithm if the recursion goes too deep. The correct solution (originally recognized in the 1975 by Robert Sedgewick, but unknown to me before this issue arose) was to only call quicksort recursively on the smaller of the two partitions, and sort the larger partition using a loop (tail recursion). If recursion only occurs on a partition that is half the size of the original or smaller, recursion depth is limited to LogN. That turned out to be trivial to implement, and is faster and uses less code than the AI-suggested approach. Furthermore, after seeing Sedgewick's tail recursion idea, Dan Kennedy recognized that we don't actually need to sort both partitions at each step of the algorithm, but only the partition that contains the median. Dan's observation more than doubled performance. Hence by ignoring the AI's suggested fix, we more than doubled the performance of the median() function in SQLite.

Before you ask: The median() function did originally use the standard library qsort(), but I changed that into a hand-coded quicksort some time ago because the hand-written variant did not require a callback for each comparison, and was thus way faster.

Comment Stupid headline and stupid statistics (Score 5, Insightful) 19

36.1% pass would be worrying if this was a qualification test of things it needs to be able to do. It's not. This is a benchmark, and it SHOULD have a low pass rate. That's how you know if you're making improvements.

We could quite easily create a different benchmark where it passes 99.9%. That wouldn't mean the device being tested is good. It would just mean we have a useless benchmark.

I have no opinion on whether AI is good or bad for this use case. I just hate when statistics are used to mislead people.

Comment Re: Of course not! (Score 0) 122

The modern democratic party is quite right of center, and that's a problem. The Democratic party is an enormous fan of corporate welfare and subsidies for industries that are aligned with their talking points. There are still a few firebrands in the party, mostly centrists like AOC and Elizabeth Warren and possibly Bernie Sanders and Ilhan Omar, but they took suck at the teat of irresistible corruption.

And this is not a both sides argument. For there to be a both sides argument, there have to be two sides in opposition, and the truth is that there aren't.

Comment Re:Are there people in the government (Score 2) 77

my posts don't have signatures and I don't see any in the other posts

https://slashdot.org/prefs => Discussions => uncheck "Disable Sigs"

Your sig is currently '"Even if you don't have a Tesla, your children still walk in the footpath." - Lukasz Krupski (ex-Tesla employee)'. You can change it on the User tab in prefs.

Submission + - Fox to buy streaming device maker Roku for $22 billion (cnbc.com) 1

schwit1 writes: The combination will merge Fox’s sports and news networks, as well as its free ad-supported streamer Tubi, with Roku, which makes streaming devices and has The Roku Channel.

The deal is expected to close in the first half of 2027.

Comment Re: Only if you're rich (Score 1) 85

I burned my entire Max 20x quota with one prompt this morning. Of course, number of prompts isn't the metric. It's what you ask it to do. Fable5 + ultracode "do a code review of this codebase against mainstream coding standards, focus on security, deduplication, and opportunities to improve architecture" is vague enough to run up a $100K bill.

Slashdot Top Deals

No directory.

Working...