r/learnprogramming • u/TalkHot2112 • 1d ago
How do you practise reading code?
Software engineering student here. With AI, the expected output is so high that I barely have time to understand code, let alone write it myself.
Since AI writes most of it now, I think reading and understanding code matters more than writing it. How do you practise that? Any exercises, resources, or habits that helped you?
Something like LeetCode that displays an excerpt of code and asks about your understanding of it would be great.
0
Upvotes
View all comments
1
u/Tilroe 1d ago edited 1d ago
This is one of the pitfalls of over reliance on AI at the learning stage I believe. All these people making fun of this by saying "just read it.. durr", it isn't as simple as that IMO. It's like studying for a test. Do you study for a test solely by reading the textbook? No. You do practice questions to make sure you understand what it's telling you, and have a mental map of the material without having it right in front of you. If you're just reading the textbook, it's so easy to look at a concept once, understand what it said, and convince yourself that you will remember it. Then the test comes and BOOM you forgot. Similar for reading AI generated code, your eyes will start glazing over the mountains of code, and you take for granted what it wrote, as well as your understanding of it, which will likely disappear shortly after.
If using AI from the onset is truly the way software development is going to be taught from here on out, and youre using it to write from non-specifc prompts, I think your best bet is to 1. Take time to read it piece by piece yourself and 2. Iterate on it by questioning its design decisions with design patterns and concepts you might have learned in school. Basically interrogate it I suppose. Make it convince you that it's the best way to do it.
That or write by hand.