Recent submissions

Comment · 1 month ago
Did I even tried to pretend the article wasn't generated with Claude's help?

I even shared the initial prompt in some comment in this thread. I don't understand what is the matter with also using AI help with generating articles. I still reviewed the article and put all the ideas I wanted to discuss in that article. I don't see why people are often complaining about this. The article content is much more important than how it was generated.

Comment · 1 month ago
As long as you're working alone, that makes sense. Otherwise, some team will have to review all your refactoring PRs...
Comment · 1 month ago
The prompt was actually huge, containing all the central ideas of the articles in details. I actually found my first prompt in case you're curious:

---

Human contexts are way more limited compared to computers. We can't reason about complex software when they go through many branches with so many implications. It's just too hard for humans to keep track of all interconnected pieces. So humans have historically split the system parts into manageable modules that can be understood in isolation and then we spend some time connecting those parts. That's how we can keep the context reasonable for human understanding.

So, when senior engineers found themselves lost while trying to debug an issue in a complex system they would naturally decide to pause and rewrite or refactoring the confusing piece of the system to make it manageable so developers can easily understand what's going on and review future changes.

Usually a system doesn't start that confusing. But as requirements change developers add additional branches and code until the code is no longer manageable. Sometimes the requirements changed significantly since the code was first written and all we have in the code are exceptions rather than the rule. That's usually when historically senior developers would take the time to rewrite that part of the system so they can reason about it.

But AI agents are not as limited as humans context-wise and they can reason about those confusing (to humans) systems and make sense of it. So they simply keep adding additional branches to the existing mess without ever suggesting a major refactoring like a senior developer would do in those cases, unless there's specific harness to tell agents to act like that.

This article is about bringing this into attention so that developers can policy themselves and keep asking themselves whether it's time for a major refactoring instead of relying on the AI agents and trust them because they no longer understand the code because it's too complex for humans to follow. Can you draft an article focused on this concern?

Comment · 1 month ago
Yes, of course, they're limited, but it doesn't compare to the limit humans face. We can't hold a lot of context on our minds when investigating a bug when the code is too complex with huge methods, lots of branches, several callers and so on. It doesn't mean agents are perfect but they don't care as much as humans if the code is a mess because they can find logic in mess, we can't.
Comment · 1 month ago
But the part that agents don't get lost is actually part of the prompt, not something Opus wrote on its own. Of course they get lost sometimes but the idea of the article is to explain that agents can often make more sense of tangled code than humans when the bounds are not well defined.
Comment · 1 month ago
I think I used Opus actually. But my prompt was huge, basically the article content. I told Opus what I wanted to approach in the article with all the relevant details I wanted to include and it created the article. Then I reviewed it.
Comment · 1 month ago
I feel your pain, that's what I've been doing for the past whole week. I'm trying to fix some ancient bugs (there are lots of them in this codebase) but each Claude review detects so many issues that might happen on some rare cases that it takes days until it stops complaining and I can get some peer approval to get the fix merged.
Comment · 1 month ago
Yes, I've also noticed a few occasions when Claude would get it wrong, but in most cases it's able to find issues I didn't even consider because of a very deep analysis in a confusing (to humans) code. It detects some rare situations where a defect could exist. This happens when I explicitly ask Opus to review a PR and there's some harness around this ability, but I'm really impressed at how deep their analysis can be and correct as well. Of course, sometimes they're going to fail, but I don't see them getting lost often.
Comment · 9 years ago
Awesome, good to hear that :-)

Fixed or not, PG is awesome anyway. Thanks for helping to make it the best database I've worked with so far :-)

Comment · 9 years ago
Yes, that could be an option if this was supposed to be a permanent script. However, I was trying very hard to finish the migration of the deals to the new template and the script was quite big and complex. I didn't talk about the script so that I could focus on this specific part that affected it, but the way some people are judging it's like I had put a lot of thoughts in this part of script. It wasn't the case. This was a minor part of the script. I hadn't thought about using nextval() to create the mapping table when I first wrote the script, so it looked like adding a temporary column to store the old id would be the simplest solution for the mapping problem. I had that gut feeling telling me it wasn't the right thing but as long as it worked, for a one-off script, I didn't really care if it allowed me to finish the porting earlier. Writing a trigger would take more time and code than adding a temporary column, just like using nextval() to create the temp table is less work than writing the trigger. Most people seem to ignore that this was a one-off script that won't ever be used again.

I don't actually regret my approach. It allowed me to deliver the first version for testing earlier and I was able to fix the script later in less than an hour once the problem happened. Maybe other parts of the script were not ideal either, but the migration was successful and this is what really matter to me. It would be a completely different situation if I was writing a permanent code. In those cases I write the code way more carefully and give it quite a lot of thoughts on the future implications.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton