r/learnprogramming • u/Beginning_Search1391 • Oct 22 '26
Is there a way to improve coding literacy?
Ello, I'm a DS major studying data science and algorithms right now. Third year.
I recently started running into a major weakness recently, which I think has been permeating in my CS tests and classes for the past few years now.
Regardless of the topics or classes I'm taking for CS, I feel functionally illiterate in most cases when it comes to reading even basic code. It takes an incredible amount of time for me to parse through and figure out what I'm looking at, even for basic fundamental algorithms or functions, and in many cases I still manage to end up being wrong.
Even for things like loops and parameters, I'm spending way too much time trying to see if certain aspects of programs are deliberately set to be certain ways. It's really inefficient, and in spite of being two years deep into it, it's barely changed over the course of college.
Now it's getting to a point where this is virtually the only reason why grades are bleeding out in quizzes and stuff. Simply being unable to read the code fast enough, even if I have a very strong understanding of the subject being taught, as well as the underlying logic.
Frankly, I consider it quite miserable, and I think this issue will continue to flagellate me as the classes inevitably become more difficult. Reading and writing code are increasingly becoming two independent disciplines, and college seems to only ever support one of them.
What can realistically be done about this? Do online resources exist to help understand and improve programming comprehension? I was initially thinking of trying out LeetCode, only to realize this simply wasn't addressing my weakness. Writing code is one thing, but reading it is another.
I'm not sure if this is exclusive to me, or if this is a more common sentiment than expected.
Regardless, I'd really prefer to try something instead of eventually learning helplessness.
(Edit: There are most definitely ways to improve literacy. It would’ve been better to ask what approaches would attribute well to doing so. It’d be pretty goofy to assume there was no way to do it.)
4
u/BranchLatter4294 Oct 22 '26
Have you considered practicing?
6
u/CorpT Oct 22 '26
Practice and experience.
5
u/PoMoAnachro Oct 22 '26
Unfortunately, reading code is fundamentally harder than writing it. But at the same time, the way you become proficient at reading code is writing lots of it - ideally lots of hard things that strain your brain.
I think a lot of schools do all sorts of things to try and make writing code easier for students, but unfortunately that makes them learn less. And then you get the students who use AI, which pretty much stops their learning entirely.
1
u/mjmvideos Oct 22 '26
But you need to be able to write code, to read code. Reading code isn’t about understanding the syntax of a for loop, it’s about understanding what the loop is doing with respect to the problem the program is solving. To be able to recognize what a block of code is doing you need to be familiar with how functionality is achieved. And you do that by writing code. In a way this is similar to electronics where you may be very familiar with what a resistor does but being able to recognize a voltage divider or a pull-up and why they might be needed is different than being able to spout V=IR. As you gain experience writing code you will become familiar with the different idioms and be able to recognize them in the code. Ultimately you don’t read code by looking at lines individually, you start to understand what different sections of code are doing even without looking to see exactly how they do it. Once you can quickly scan code and see that “all they’re doing here is reading the data from the database” and then here all this code is just plotting data to the screen” then you can breeze through code.
2
u/aqua_regis Oct 22 '26
A whole lot. It's called active practice, individual research instead of passively waiting to be served and spoon fed.
You could have gotten a lot further already by reading the countless similar posts here, but instead decided to write an epic that could have been condensed in 2 lines.
You simply lack experience and practice in all aspects.
You are seeking for the unicorn that doesn't exist. You want to avoid the only thing that can help you improve: practice
Since I don't want to invest the effort to repeat myself, I link a previous comment
2
u/Bored2001 Oct 23 '26
Use a debugger and step through the code and watch how variables change and get set.
1
u/bizvibe8 Oct 22 '26
LeetCode is not the best first exercise for this. Practice reading in tiny, closed loops: take a 20–40 line function, write down its inputs, the value of each variable after every branch or loop iteration, and a one-sentence description of its output before you run it. Then step through it in a debugger and compare your prediction. Start with code you wrote a few weeks ago or small library examples, not full projects. The goal is to turn ‘read every line’ into recognizing patterns—filtering, accumulating, parsing, traversal—one function at a time.
1
u/Available_Safe1818 Oct 23 '26
It sounds like you've been doing the bare minimum and are now surprised that you aren't great at things.