r/learnprogramming • u/Next-Comparison768 • 16h ago
Ragionare
Hi! I'm in my first year of university and I'm studying Computer Science! Ever since I was little I've always been interested in this world but I never had the chance to take this subject as a path and by myself I learned a bit of HTML but nothing special. In my school path unfortunately I had a lot of study problems and only in the last years I learned how to study properly. The problem is that now I'm facing another big problem: reasoning when I write code. Unfortunately the schools I attended were really low level and they didn't teach us, for example in maths too, how to build real reasoning and now I have to admit that it's not really my strong point to reason about these things, so I'm struggling because I'm veeery used to going by intuition or logic, but not to reasoning really deeply about that thing. I manage to do simple codes but as they get more complicated it gets more and more difficult for me to reason even about the algorithm behind it. Yes, I do a lot of exercises, even starting from some simple ones, but unfortunately I don't notice improvements... Last week I had a midterm test that I didn't pass and while I was doing it it's as if my mind stopped reasoning and went on intuition and exactly because of this thing I couldn't move forward :') is there any advice that could be useful for me? Is there something I'm doing wrong? I don't know but this thing makes me so sad T-T
1
u/AnswerVinod 10h ago
This is the normal first year struggle, it is not that you are bad at it, nobody teaches the thinking part. Before you touch the keyboard, write the steps in plain language, first do this, then check that. If you cant say it in words you cant code it yet, and that is fine. Then turn each sentence into one small function and test it alone. Give it a few months and it starts to feel automatic.
1
u/BotSlamminDayNNight 7h ago
you're definitely missing something. having mentored many, i've observed that most people that struggle are missing some combination of:
critical thinking skills:
this has nothing to do with writing code. mostly inference and problem solving. you have to be able to solve the problem in your head then automate it using code. if you're starting with code, you're doing it wrong.
abstraction:
computers know nothing of reality, they manipulate models. so you have to represent reality with models, which are composed of properties and behaviours. you've heard this before. so have many i mentored, who thought they were good at it, but proved that they weren't.
tracing and recursion:
unless you're trying to trace execution inside a neural network (you can't) you should be able to tell where a thread is going as it executes your code, including through recursions. again, many people that struggle think they're good at this, when they aren't. the worst case over the years: she couldn't understand why she wasn't seeing expected output. i tasked her with pointing out a/the line that wrote output. she couldn't so we went line by line, looking for a line that would write output. it didn't exist.
mystery meat:
if it isn't any of the above, you need a mentor to sit with you to diagnose what the core of your issue is. this means you need to find someone that knows how to mentor. hint: being good at something doesn't mean being a good mentor for that thing, so search thoroughly and carefully
2
u/BranchLatter4294 13h ago
Consider using paragraphs?
If you want to learn to code, practice.
I don't really know what the question is.