4 ms·
I've been working on generating a large code base for the last couple of weeks. Finally got around to generating a sort of code-duplication report and have spen
by breadzeppelin__ 1mo ago
I've been working on generating a large code base for the last couple of weeks. Finally got around to generating a sort of code-duplication report and have spent the last week just having it de-duplicating logic that had been strewn all over the place (eg 11 different functions all doing date math to add x days to a date). dozens of items that had each been similar functions duplicated numerous times. crazy. (opus-5-utracode)
- greazy 1mo agoCan LLMs not do this for you? Or would they go too far?
- chrz 1mo agoThey add and add new code to the point when adding more is going to become very messy and then spagetti
- greazy 1mo agoWhat I was suggesting is to ask the LLM to compare function usage across files to identify overlap/redundancy. The idea is to use the LLM to analyse the code base first before taking any action. I think I'm suggesting a centaur approach.
- nomel 1mo agoNo, the problem is they're still really dumb, and lack the ability to make logical connections that are obvious to us. "should I walk or drive to the carwash" being a very recent example of the larger problem.
- greazy 1mo agoBut they are very good at identifying patterns though. This task requires little logic IMO. So why not leverage LLM to perform redundancy analysis?
- vatsachak 1mo agoLLMs love duplicating logic. Unfortunately they are not formal systems so we actually have to read their output