> What about a library that doesn’t have any documentation or tutorials
This always sucks, but since it is something you have to deal with, the answer is "read the code." Hopefully the code has some test cases somewhere, and that is the best place to start. But if not, you unfortunately got to profile and trace the code yourself. It takes awhile, but you usually come out with a pretty good understanding (after A LOT of confusion) and can usually find some good things to fix.
How do you profile and trace it? A debugger is actually one of your best friends here. But this is also what things like cscope and tags (ctags) are for. I suggest becoming familiar with grep, find, sed, and awk as these will also greatly help. I strongly suggest also grabbing a pen and paper. You'll want to draw diagrams. It sucks, but it gets easier over time.
I'll also say that having to do this shitty task drills into you the importance of writing documentation, comments, and writing concise functions in your code. Only a psychopath could go through this trouble and think "fuck it, the next guy can do it too." Unfortunately there's lots of psychopaths lol. Remember, usually "the next guy" is you. You when you forget everything 6 months and 3 projects later. So document and comment while you trace. If your boss tells you not to worry, he's a psychopath too. Just wasting company money making it harder to onboard new employees. And in the worst/best case? Your documentation/commenting just makes the LLM better and more accurate. So there's really no good reason to not doc/comment other than excuses about moving fast. But remember, even though there's never time to do it right, there's always time to do it twice (when you fix what's wrong). And all this work reduces the tech debt and time everyone spends debugging. You have to invest in your work.
Yeah dude, I’ve got a wife, two young children and a full-time job in legal services. These are the side projects that LLMs give me the time and cognitive energies to work on.
Congratulations on having so much free time!
I do lot of data analysis so I am pretty familiar with awk, et. al. But you know, thanks for the condescending lecture, I guess?
How do you profile and trace it? A debugger is actually one of your best friends here. But this is also what things like cscope and tags (ctags) are for. I suggest becoming familiar with grep, find, sed, and awk as these will also greatly help. I strongly suggest also grabbing a pen and paper. You'll want to draw diagrams. It sucks, but it gets easier over time.
I'll also say that having to do this shitty task drills into you the importance of writing documentation, comments, and writing concise functions in your code. Only a psychopath could go through this trouble and think "fuck it, the next guy can do it too." Unfortunately there's lots of psychopaths lol. Remember, usually "the next guy" is you. You when you forget everything 6 months and 3 projects later. So document and comment while you trace. If your boss tells you not to worry, he's a psychopath too. Just wasting company money making it harder to onboard new employees. And in the worst/best case? Your documentation/commenting just makes the LLM better and more accurate. So there's really no good reason to not doc/comment other than excuses about moving fast. But remember, even though there's never time to do it right, there's always time to do it twice (when you fix what's wrong). And all this work reduces the tech debt and time everyone spends debugging. You have to invest in your work.