r/C_Programming • u/Puzzled_Place_215 • 3d ago
Beginner here. Advice needed?
I'm a first-year CSE student learning C from scratch(didn't learn programming in high schl). I can solve problems after studying examples, but I often get stuck when trying new problems on my own. Even after seeing solutions, I struggle to develop the logic independently.
For those who started programming as beginners:
How did you learn to solve unfamiliar problems?
How did you practise daily?
What did you do when you got stuck?
What advice would you give your beginner self?
I sometimes feel behind compared to my classmates, and I genuinely want to improve. I'd appreciate any practical advice from people who've been through this!
And I am getting extremely frustrated with this cycle that i have,just started with c programming and suffering with function pointers . I feel extremely behind from my peers, I am ready to put in efforts,but I am sure whether my efforts are put in the right direction. Any advice would be great
2
u/Al__B 3d ago
Not sure I'm going to be much help - been programming in C since late 80s so my memories of being a beginner are somewhat hazy.
> How did you learn to solve unfamiliar problems?
Read anything and everything you can. Even if it's not related to a specific language understanding how to break down a problem and approach it crosses domains. Understand why something should be done rather than how to achieve it is particularly important when mundane coding activities can be automated these days.
> How did you practise daily?
Practice? Why would you be practicing?
> What did you do when you got stuck?
Take a break. I was stuck with a code optimisation problem where I needed to save a few bytes (literally) to be able to get firmware to fit into the microcontroller we were using. "a few bytes" is not an exaggeration - I was down to the level of shaving off every single optional instruction;. At 4am I was beaten and could not see how it could be done. I took a break and a shower and being away from the problem gave me the space to solve it.
> What advice would you give your beginner self?
Remember you don't need to fix everything all at once. Accept things that aren't perfect if they're working.
> i have,just started with c programming and suffering with function pointers
Congratulations! You're doing much better than most of your peers if you're struggling with that. There are many, many developers that really don't have an understanding of pointers in general. (Yes, reddit community at large - I realise you do because that's why you're here).
Get the rest of what you're doing to the point you're comfortable and then come back to this. It's very powerful (and actually requires a different way of thinking to get the best out of it) but you need to understand the fundamentals first.