4 ms·
[flagged]
by foobarbecue 1y ago
[flagged]
- Mallowram 1y ago[dead]
- BeetleB 1y ago> I bet you could replace your slop pile with a tenth of the lines of clean code, and chances are it'd be less work than you think. Actually, no. When LLMs produce good, working code, it also tends to be efficient (in terms of lines, etc). May vary with language and domain, though.
- stavros 1y agoEh, when is that, though? I'm always worrying about the bugs that I haven't noticed if I don't review the changes. The other day, I gave it a four-step algorithm to implement, and it skipped three of the steps because it didn't think they were necessary (they were).
- BeetleB 1y agoHmm... It may be the size of the changes you're asking for. I tend to micromanage it. I don't know your algorithm, but if it's complex enough, I may have done 4 separate prompts - one for each step.
- foobarbecue 1y agoIsn't it easier to just write the code???
- BeetleB 1y agoDepends on the algorithm. When you've been coding for a few decades, you really, really don't want to write yet another trivial algorithm you've written multiple tens of times in your life. There's no joy in it. Let the LLM do the boring stuff, and focus on writing the fun stuff. Also, setting up logging in Python is never fun.
- foobarbecue 1y agoRight-- it's only really capable of trivial code and boilerplate, which I usually just copy from one of my older programs, examples in docs, or a highly-ranked recent SO answer. Saves me from having to converse with an expensive chatbot, and I don't have to worry about random hallucinations. If it's a new, non-trivial algorithm, I enjoy writing it.
- BeetleB 1y agoFor me, it's a lot easier getting the LLM to do it than browsing through multiple SO answers, or even finding some old code of mine. Oh, and the chatbot is cheap. I pay for API usage. On average I'm paying less than $5 per month. > and I don't have to worry about random hallucinations. For boilerplate code, I don't think I've ever had to fix anything. It's always worked the first time. If it didn't, my prompt was at fault.
- Mallowram 1y ago[dead]
- a5c11 1y ago> Also, setting up logging in Python is never fun. import logging
- BeetleB 1y agoNot fun at all. Configuring it to produce useful stuff (e.g. timestamps, autologging exceptions, etc). Very boilerplate and tedious.
- stavros 1y agoIt was really simple, just traversing a list up and down twice. It just didn't see the reason why, so it skipped it all (the reason was to prevent race conditions).
- 1zael 1y agoCongratulations, you replace my pile of "slop" (which really is functional, tight code written by AI in 1/1000th of the time it would take me to write it) with your "shorter" code that has the exact same functionality and performance. Congrats? The reality is no one (except in the case of like competitive programming) cares about the length of your code so long as it's maintainable.
- foobarbecue 1y agoBut that's the thing -- because I WROTE my code, I know there's nothing bizarre in it. Your code is almost guaranteed to have something bizarre and unexpected in it, at least somewhere.
- PUSH_AX 1y agoClean code? Fewer lines? Found the intermediate.
- dang 1y agoThis is a belated reply, but you broke the site guidelines badly here. It's not ok to attack other users like this, no matter how right you are or feel you are. We ban accounts that do, so please don't do it again. It's fine, of course, to make your substantive points thoughtfully, but that is a very different kind of comment. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- foobarbecue 1y agoApologies, forgot to check my reaction.