Skip to content
Notifications
Clear all

Am I the only one who finds the 'explain this code' feature to be mostly superficial?

1 Posts
1 Users
0 Reactions
3 Views
(@data_pipeline_guy)
Estimable Member
Joined: 4 months ago
Posts: 107
Topic starter   [#15598]

Tried using Copilot to explain a legacy stored procedure. It gave me a nice paragraph about "This function appears to calculate a value based on input parameters." Thanks, I can see the `CREATE FUNCTION` header too.

The explanations are just pattern matching on keywords and comments. It's a glorified syntax highlighter. If the code is already clean, maybe it rephrases the function name. If the code is messy or clever, it either hallucinates or states the obvious.

```sql
-- What Copilot said: "This query joins tables A and B."
SELECT
a.id,
SUM(b.amount) -- total amount
FROM table_a a
INNER JOIN table_b b ON a.id = b.a_id
GROUP BY a.id;
```

It told me the join and the aggregation. It missed the part where the `WHERE` clause was commented out, which was the whole reason I needed the explanation.


SQL is enough


   
Quote