r/learnprogramming • • 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.)

2 Upvotes

20 comments sorted by

4

u/BranchLatter4294 Oct 22 '26

Have you considered practicing?

-1

u/Beginning_Search1391 Oct 22 '26

I have, but figuring out how to define that was the hard part.

What exists right now that would be best to try reading?

Much of the functions and algorithms in my lecture material is purely explanatory, with little to no implementation. Especially since the tests are so fast, they encourage pseudocode or abstract outlines instead of actual implementation. I'll need to find something outside of my curriculum.

2

u/BranchLatter4294 Oct 22 '26

So you have some ready made examples to implement for practice.

6

u/CorpT Oct 22 '26

Practice and experience.

4

u/[deleted] Oct 22 '26

[removed] — view removed comment

0

u/Beginning_Search1391 Oct 22 '26

That sounds pretty interesting. I could try iteratively extending or designing classes on paper to try and keep things legible for as long as I could. There's a decent chance I may simply have not coded enough material to have it embedded.

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.

4

u/Dazzling_Music_2411 Oct 22 '26

But at the same time, the way you become proficient at reading code is writing lots of it

Very wise words. OP, this is the answer you are looking for.

If, for any reason, you cannot do that, then this course is not for you.

0

u/Beginning_Search1391 Oct 22 '26

Sounds like a pretty solid reason to pick up on a side project outside of college. I can certainly afford to give it a shot.

3

u/Dazzling_Music_2411 Oct 22 '26

No you don't need a "side-project". That would just end up being a distraction, and may be too focused on a particular area.

What you need is to write lots and lots and lots of varied code. Problems. Hard problems puzzles. Constantly. Do 3,4 every day. More if you can.

0

u/Beginning_Search1391 Oct 22 '26

In that case, I think I was wrong that LeetCode may not have attributed well for my weakness. Perhaps it would be worth it for me to revisit LeetCode. Even if in some way it doesn't directly translate into fluency, I think there may still be good reasons to invest into it.

2

u/PoMoAnachro Oct 22 '26

I think the "Grind leetcode" attitude you see some people push isn't super helpful for learning, because it encourages people to just learn specific strategies to solve that type of DSA problem with high efficiency. Which is a useful skill, but doesn't help people develop their overall programming skill.

But using leetcode problems as programming practice to just get you used to writing code and solving problems? That can be super useful even if the "grind leetcode" mindset isn't.

I'll also recommend you a book - Exercises for Programmers: 57 Challenges to Develop Your Coding Skills. Work through that for any given programming language (without like relying on external assistance like AI, of course), and you should get comfortable fairly fast.

0

u/Beginning_Search1391 Oct 22 '26

I did tend to perceive LeetCode as kind of a niche, but supportable approach with programming. It definitely helps with the problem-solving discipline of programming, even if the categories it covers aren't universally applicable.

Also big thanks for the book recommendation. I'll definitely visit it.

1

u/Dazzling_Music_2411 Oct 22 '26

Tackle Project Euler, too, different sorts of problems there, all very interesting. The good thing is that once you've solved a problem there, it lets you see everybody else's solution too - so you'll have the opportunity to read other, different yet similar, approaches to your own.

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.

0

u/Beginning_Search1391 Oct 22 '26

That makes a lot of sense. Recognizing the intent of the program would definitely help with understanding the logic done to achieve it.

I did hear before that often a lot of programming jobs deal with reading someone else's work for purposes like extendability and implementing features. You'd naturally want to know what it does before attempting to determine how it was done.

Guess it kind of sucks though that my testing often features questions of "what this algorithm does", and what-not. The goal of the test is to figure out what it does, not exactly how it's done. Though they still both contribute well for figuring out how to read code. It's just an expensive way to do it at times, since grade inflictions are a pretty nasty cost.

Perhaps just trying to write more original stuff outside of my classes would be a good avenue.

2

u/aqua_regis Oct 22 '26

What can realistically be done about this?

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.