2 ms·
My issue with that approach is that it's easier for me to write code than to read code and grok all the subtleties of one approach vs another. Writing thousand
by majormajor 2y ago
My issue with that approach is that it's easier for me to write code than to read code and grok all the subtleties of one approach vs another.
Writing thousands of lines? I'm actively thinking about the specific method.
Reading thousands of lines of someone else's code? I might fall into a more passive mode and miss a problem.
I am more likely to do the reverse: write it myself, have LLMs summarize it or suggest how to test it/break it/whatever.
In many situations a sufficiently-described statement of "here is exactly what I want the code to do" is not significantly easier to write than the code itself. Especially when the AI is doing the annoying tedious bits through autocomplete suggestions, vs letting it try to do the whole thing based on a sufficiently-described prompt.
- HappMacDonald 2y agoHmm, I like this idea of "write napkin code and let LLM review/expand". In principle one can probably be quite fast and loose at this stage after all, and as you mention for coders it's often easier to express an idea in napkin code (be that "pseudocode" or real code with just zero effort into correctness as a pilot hole). I think I'll experiment with this as well.
- Volundr 2y ago> Reading thousands of lines of someone else's code? I might fall into a more passive mode and miss a problem. Or just bad design. I use AI a fair amount for my personal work (my employer currently bans it), and what I've found is it's a great accelerant, BUT you have to be super vigilant with it to keep the quality decent. It's very good at producing code that will make it past your average code review but has design issues that are going to make things harder down the road and getting it to refactor these itself can be quite difficult at times. I generally find myself in a loop of asking the AI to do something, doing a few rounds of refinement with it, especially around test cases, then a manual refactor/cleanup pass over the tests, followed by a manual refactor of the code. When I read accounts of other people gushing over AI, allowing them to do some semi-complicated thing in under an hour, it really makes me worry about how this is going to affect the readability of the average codebase in a few years' time.