News for hackers. Stuff that matters.

fzaninotto

Trending idea! On the same subject, but aimed at compatibility with TypeScript, I just discovered Code Contracts.

https://code-contracts.cc/

I would love to follow this advice, expect there is no proof that it leads to better results. Maybe it’s only better on Anthropic codebases (e.g., Bun). Or maybe it’s only marginally better but substantially more expensive.

Other comments in this thread show that your mileage may vary. But we spend so much money on Claude Code and give it so many responsibilities that we deserve at least some undeniable proof that it’s bringing value.

Where is the evidence that this new type of prompting is better on real life examples?

Re:Claude Opus 4.7 on Thursday April 16, 2026 @01:49PM (#47797005)
I had the same problem. Restarted Claude Code after an update, and now it has disappeared.
Re:Claude Opus 4.7 on Thursday April 16, 2026 @01:24PM (#47796659)
To reduce token count on command outputs you can also use RTK [0]

[0]: https://github.com/rtk-ai/rtk

Re:Claude Opus 4.7 on Thursday April 16, 2026 @01:22PM (#47796629)
Just before the end is this one-liner:

> the same input can map to more tokens—roughly 1.0–1.35× depending on the content type

Does this mean that we get a 35% price increase for a 5% efficiency gain? I'm not sure that's worth it.

Re:The Git Commands I Run Before Reading Any Code on Wednesday April 08, 2026 @08:08AM (#47689082)
Instead of focusing on the top 20 files, you can map the entire codebase with data taken from git log using ArcheoloGit [1].

[1]: https://github.com/marmelab/ArcheoloGit

Show HN: UX Quest

https://marmelab.com/ux-quest/

Developers sometimes struggle to identify UX problems in their own work. The problem is becoming more pressing as coding agents take on more of the implementation work, but fail to address usability issues.A long time ago, I stumbled upon Can't Unsee, an in-browser design problem detection game. I found it was a fun way to improve my design skills. I imagined a similar game for UX, where user...

( Read More... | no comments | 3 points | on HN )
Re:Agentic Engineering Patterns on Wednesday March 04, 2026 @10:44AM (#47249176)
Is "Agentic Engineering" is the new name for "Agent Experience"? If so, and even though I love Simon's contributions, there are many other guides to making codebases more welcoming to agents...

Shameless plug: I wrote one. https://marmelab.com/blog/2026/01/21/agent-experience.html

Re:My journey to the microwave alternate timeline on Monday February 23, 2026 @02:13AM (#47119073)
Thanks Hacker News for surfacing such jewels, and kudos to the author for such a great piece.

Although I will never use anything of what I learned from this article, I feel a better person since I’ve read it.

In one of the alternate universe I like to imagine, AI slop doesn’t exist and the Internet is filled with gorgeous pieces like this one.

Re:AI is going to kill app subscriptions on Sunday February 15, 2026 @12:03PM (#47025307)
I don't agree with the premise that we pay a subscription because there is no better and cheaper alternative. We pay Slack subscriptions but we could get IRC for free. We pay Google Drive subscription but we could get rsync for free.

The reason we pay a subscription is because the company that built the software knows our business, knows how to get in touch with the decision maker, and knows how to market their product as something desirable. The actual software has little influence in that decision.

On the contrary, I think the price of SaaS subscriptions will go up as a result of AI. Because the only customers who will switch to a cheaper (or home made) alternative are the ones for whom the software is a commodity. These customers used to form the long tail of subscriptions, usually on the lower tier. When the entry pricer disappears, and the software editor has to generate a high return for their investors, the only way to keep profitability is to increase the price for the other tiers.

Re:Ghostty's AI Policy on Friday January 23, 2026 @10:01AM (#46733280)
I agree this could be a template that services like GitHub should propose, the same way as they suggest contributing and code of conduct templates.
Re:MCP is a fad on Friday January 09, 2026 @07:32AM (#46553190)
I think this article misses the most important point of MCP: Authentication. Granted, it wasn't in the initial spec, but it is now, and it really opens interoperability without compromising on security.

Think about how to provide your SaaS service to users of ChatGPT or Claude.ai (not only coding tools like VSCode). At one time, the user will need to allow the SaaS service to interact with their agent, and will have to authenticate in the SaaS service so that the agent can act on their behalf. This is all baked in the MCP spec (through OAuth) [1], and scripting can't beat that.

That's why the Extensions/Applications marketplaces of consumer AI assistants like ChatGPT Apps [2] are a thin layer on top of MCP.

Another domain where MCP is required is for Generative UI. We need a standard that allows third-party apps to return more sophisticated content than just text The MCP spec now encloses the MCP Apps specification [3], which is exactly that: a specification for how third-party apps can generate UI components in their response. On the other hand, scripting will only let you return text.

[1]: https://modelcontextprotocol.io/specification/2025-03-26/bas... [2]: https://help.openai.com/en/articles/11487775-apps-in-chatgpt [3]: https://github.com/modelcontextprotocol/ext-apps

Re:AI has a deep understanding of how this code works on Tuesday November 25, 2025 @07:20AM (#46045133)
I've closed my share of AI-generated PRs on some OSS repositories I maintain. These contributors seem to jump from one project to another, until their contribution is accepted (recognized ?).

I wonder how long the open-source ecosystem will be able to resist this wave. The burden of reviewing AI-generated PRs is already not sustainable for maintainers, and the number of real open-source contributors is decreasing.

Side note: discovering the discussions in this PR is exactly why I love HN. It's like witnessing the changes in our trade in real time.

Re:Spec-Driven Development: The Waterfall Strikes Back on Sunday November 16, 2025 @10:52AM (#45945971)
Hi, author here.

I love reading the posts in this thread. It seems the waterfall vs Agile debate is still vivid in the HN community, which surprises me.

I know that developers have different experiences with SDD, and there is no one-size-fits-all methodology anyway. It's interesting to read the feedback of people who really like it, especially when they describe their background and the type of project they use it for.

In my experience, SDD doesn't bring any value as I'm already using Plan mode before going to implementation. I have also never seen instances of a coding agent doing exactly what I had in mind in the first try (except for very simple cases), so there must be iterations, which defeats the purpose of the Big Design Up Front.

Finally, I really think coding agents pave the path for a new way to develop digital products, more productive and closer to the users' expectations. But I doubt that SDD lies anywhere in this path.

Re:Using LLMs to classify unstructured listings on Monday October 20, 2025 @04:32AM (#45641302)
Great feedback from the Etsy team about a real-world LLM usage that proved efficient.
Re:Microsoft Introduces 'Copilot Mode' in Edge on Tuesday July 29, 2025 @12:26PM (#44725338)
This new browser mode is a robot that replaces visitors on websites. It can't be good news for website editors...

Should we (developers) start building websites for robots?

Re:XMLUI on Sunday July 20, 2025 @02:41PM (#44628033)
This looks similar to React application frameworks like react-admin [1] or Refine [2]:

    const App = () => (
      <Admin dataProvider={dataProvider}>
         <Resource name="posts" list={PostList} />
      </Admin>
    )
    
    const PostList = () => (
      <List>
        <DataTable>
          <DataTable.Col source="date" />
          <DataTable.Col source="title />
          <DataTable.Col source="author" />
        </DataTable>
      </List>
    );
The article mentions XML, but the true revolution is JSX itself, which lets you describe any piece of logic as a React element. This opens the possibility to create DSL for everything, just like in Python.

[1]: https://github.com/marmelab/react-admin [2]: https://github.com/refinedev/refine

Congrats! Now you need an entire datacenter to visualize a web page.
This is nice, but I wonder about the actual use cases of such a service, given the very loose permissions:

1. Anyone can subscribe to a channel 2. Any registered user can publish to a channel 3. Only registered users can publish to their personal channel (@username)

The second point in particular is problematic. I don't want to add notifications to my app, only to have a script kiddie use is to spam my users.

Re:AI, but at What Cost? Breakdown of AI's Carbon Footprint on Tuesday January 28, 2025 @10:58AM (#42853782)
OP is making a decision about a complex problem using only back of the envelope calculation and without looking for scientific studies on the matter. We’re not obliged to take their advice. Typing “AI Carbon Footprint” on Google Scholar brings much better info than this post.
Re:OpenAI Eval on Thursday October 03, 2024 @12:35AM (#41727418)
Evaluating the quality of the responses of AI agents used to be tricky. It required knowledge of eval criteria as well as third-party tools like promptfoo, ragas or prometheus. Now openAI makes it ridiculously easy with a new API endpoint. It can grade a completion against a reference response, assess its format and tone, and you can even promt the eval to add your own criteria.
Re:Learning to Reason with LLMs on Thursday September 12, 2024 @03:53PM (#41524807)
It seems to be unable to solve hard sudokus, like the following one where it gave 2 wrong answers before abandoning.

+-------+-------+-------+ | 6 . . | 9 1 . | . . . | | 2 . 5 | . . . | 1 . 7 | | . 3 . | . 2 7 | 5 . . | +-------+-------+-------+ | 3 . 4 | . . 1 | . 2 . | | . 6 . | 3 . . | . . . | | . . 9 | . 5 . | . 7 . | +-------+-------+-------+ | . . . | 7 . . | 2 1 . | | . . . | . 9 . | 7 . 4 | | 4 . . | . . . | 6 8 5 | +-------+-------+-------+

So we're safe for another few months.

Older »