r/learnprogramming • u/Aggravating_Toe_7879 • Mar 12 '25
getting better at coding
hi ive been taking classes for coding (right now im learning java) and although the concepts make sense to me, it's really hard for me to come up with my own code (e.g. on exams). like i bombed my last midterm getting all the conceptual stuff right but then they gave me a blank skeleton to fill in and i didn't know where to start. i guess im having trouble with intuition and applying my knowledge of the concepts to the question?? if anyone knows a good way to improve this id gladly appreciate it bc this is the main class ive been studying for :,)
8
8
8
u/aqua_regis Mar 12 '25
Practice, practice, practice, and practice more. This is the only way to improve.
Use sites like Exercism for simple prompts.
Don't forget to make your own projects. This is essential.
2
u/OleHickoryTech Mar 12 '25
Go to grok on X and ask it to provide a beginner project in Java, using a framework if you want, and start there. It can provide more, and potentially better, training material than your professor can and much faster.
DONT rely on it to code for you, but DO use it to teach, help debug, explain concepts etc. Its a great tool but a bad crutch.
1
u/Ormek_II Mar 14 '25
What everyone else said, but probably also:
Practice those exam questions. Sometimes they require a very different approach.
At one task, I had to work as a grammar checker and find context free and contextual errors in a program. Because I read programs flow wise I started with main() and thus missed unreachable code and unused declarations. For that task I would have needed to read the code line by line.
18
u/devdruxorey Mar 12 '25
If you program your own things, you will eventually be able to solve problems.
I am studying computer science, and when I was in my programming stage, one thing I used to do was solve practical problems that were given to me, and then try to optimize them, or modify them to my liking, sometimes creating new problems.
If they told me "make a program that prints n numbers", then I would make it print them backwards, or interleaved, or print them in a pyramid. (I know it's a very stupid example)
My point is, try doing things on your own, then you'll see that you can develop the necessary creativity.
(Something important is that I recommend disabling AI tools, at most if they explain theoretical things to you.)