2 ms·
Today, I needed to write a proxy[0] that wraps an object and log all method calls recursively. I asked claude to write the initial version. It came up with a c
by cmdtab 2y ago
Today, I needed to write a proxy[0] that wraps an object and log all method calls recursively.
I asked claude to write the initial version. It came up with a complicated class based solution. I spent more than 30 minutes getting a good abstract to come out. I was copy pasting typescript errors and applying fixes it suggested without thinking much.
In the end, I gave up and wrote what I wanted myself in 5 minutes.
0] https://github.com/cloudycotton/browser-operator/blob/main/src/proxies.ts https://github.com/cloudycotton/browser-operator/blob/main/s...
- dambi0 2y agoWould you have written it in five minutes has you not just spent 30 minutes ruling out wrong solutions?
- cmdtab 2y agoYes. I wrote how to do it technically. Claude was able to come up with a solution that worked on second attempt. The problem was it didn’t work with typescript nicely. The approach overcomplicated anything that depended on this class.
- deleted 2y ago[deleted]