3 ms·
Example (expanding on [1]): I want to design a strongly typed fluent API interface to some role/permissions based authorization engine functionality. Even knowi
by prmph 1y ago
Example (expanding on [1]): I want to design a strongly typed fluent API interface to some role/permissions based authorization engine functionality. Even knowing how to shape the fluent interface so that is powerful but intuitive, as strongly typed as possible but also and maintainable, is a deep art.
One reason I know LLM can't come close to my design is this: I've written something that works (that a typical senior engineer might write), but this not enough. I have evaluated it critically (drawing on my experience with long lived software), rewritten it again to better meet the targets above, and repeated this process several times. I don't know what would make an LLM go: now that kind of works, but is this the most intuitive, well typed, and maintainable design that there could be?
1. https://news.ycombinator.com/item?id=45728183 https://news.ycombinator.com/item?id=45728183
- simonw 1y agoFunny you should use role/permissions as an example here, I spent the weekend using Claude Code to rewrite my own permissions engine to a new design that uses SQL queries to solve the problem "list all of the resources that this actor can perform this action on". My previous design required looping through all known resources asking "can actor X action Y on this?". The new design gets to generate a very complex by thoroughly tested SQL query instead. Applying that new design and updating the hundred of related tests would have taken me weeks. I got it done in two days. Here's a diff that captures most of the work: https://github.com/simonw/datasette/compare/e951f7e81f038e43d34bacf9890683ee446bd327...b3721eaf507c6d8919b6e72779c1263f297d8c88 https://github.com/simonw/datasette/compare/e951f7e81f038e43...
- YZF 1y agoWhat % of the total amount of software (lessay lines of code or time invested) in the world is like that?
- realusername 1y agoWorking on permissions for a large saas app, I can also confirm that the best LLM of the market have maybe a 10% success rate writing code in this area.