How to get idea from other people's codes?

Posted by Popular_Camel8575@reddit | learnprogramming | View on Reddit | 7 comments

So I can write code just fine. The problem comes when there's a really complex problem that I can't figure out all by myself and have to resort to looking for solutions online. The hurdle I come across is reading other people's codes. It makes me want to give up. I cannot for the life of me figure out how they work or understand the system of their programs. Thus, I can't solve the problem in my code. What are your tips for understanding other people's codes? Do I have to go through the trouble of running their program just to see how it functions? Lemme know your tips and advice on how to handle this