I don't understand coding after hours of trying
Posted by Distinct-Goal-7382@reddit | learnprogramming | View on Reddit | 43 comments
Out of all my classes coding is by far the hardest one I just don't understand it we are studying Java and people always ask me what part , but the issue I just don't understand none of it , I've watched hours of tutorials and read loads about it from websites, when it comes to applying Java to solving a problem in class or programming something I just don't understand how I am meant to apply it so I can solve the problem
cimmic@reddit
What do you understand about Java? Do you know what a variable is and how to declare one?
skilljoy_dev@reddit
This is not "understanding"
Knowing what a variable is, and how to declare one, is simply performing a basic task off of memory.
This is not a useful comment.
OP should be thinking about "why" he has to declare a variable, and the reason for that is, he needs to reserve space for some data that will be stored later, such as reserving X amount of bits for a floating point.
Comments like this will only lead OP down a path of copy/paste, "I learned Java" (but just the syntax) and never actually getting an intuitive sense of programming as a whole.
larj_Brest@reddit
I don't think that is pedagogically pragmatic. If you force them to peel away the layers of abstraction too early without having a natural interest in it, it will drive them off. Let them achieve something first, however small, then when they've had the positive feedback of that success, they might naturally ask 'now why did I have to declare the variable first?"
We don't learn to drive by studying the engine. It might make you a better driver, but it can come later.
skilljoy_dev@reddit
You're assuming their motivation can be steered off course, which, is really up to an individual's willpower, rather than the method of learning
If they feel they don't understand it, which is what OP said in the post, then they'll need to find the way to do that.
Keep the context of my comment and the original post in the same container, rather than isolating my comment and replying to only that
If I was giving general advice to anyone, I'd agree with you, however, I formulated my comment to target the specific issue that OP is having
larj_Brest@reddit
Well the OP says a couple of things, what stands out to me are "I just don't understand none of it", and "when it comes to applying Java to solving a problem in class or programming something I just don't understand how I am meant to apply it so I can solve the problem".
The first of those is actually really vague, I think the top level reply was trying to establish just how far this lack of understanding goes.
The second makes me think they'd benefit from learning some kind of algorithmic thinking, how one can solve some problem with the standard tools of some language (an even higher level of abstraction).
In another reply to me you say these things are entry level CS considerations, I suspect someone for whom one course is coding is not studying CS. I think for someone approaching coding as a non CS student, start higher and work down as far as needed.
Our disagreement stems from vagueness around what "understanding" means. At almost every layer you could say that there is more to be understood by studying the next level down. What's a reasonable level of understanding for this beginner? That's what I think the first reply was trying to establish.
skilljoy_dev@reddit
Not much to add here, well said
skilljoy_dev@reddit
The "engine" in this case is equivalent to knowing how an address bus and cache + registers work, as well as instruction sets on different CPU architectures.
...Sorry, but... learning why you need to declare a variable is Intro to CS level material and you will and should learn it very early...
Analogy not fit for discussion
Crazy_Anywhere_4572@reddit
Yeah. I did a few projects in my first year of programming, and I probably can’t answer you why I need to declare a variable at that time, but I know I need to declare a variable to use it.
I need to do x + y, so I declare two variables, and add them together, done. This way I already know how to do a few complicated projects in C and python. OP doesn’t even know what he is learning, so it’s obviously a different problem.
tboneee97@reddit
If OP doesn't even know what a variable is, they definitely won't understand why they need to declare one.
skilljoy_dev@reddit
Who ever said they don't know what a variable is🤣
Conscious_Nobody9571@reddit
I don't know why you got downvoted.. you're right
skilljoy_dev@reddit
Its because of the tone, not the actual information
I've noticed people on Reddit tend to evaluate with emotions and tone of posts rather than what needs to be heard and will gear someone for success
cimmic@reddit
I guess it'd because they assumed I didn't make a distinction between understanding and knowing.
skilljoy_dev@reddit
Clearly OP has the ability to declare a variable, and knows what a variable is, because they've completed some portion of study material
Dear_Competition6369@reddit
U right. Always need to ask yourself why it’s important or necessary
soul4kills@reddit
From that statement, seems like he may be lacking basic concepts and fundamentals or even the ability to troubleshoot a problem. Wonder if he knows how to use a flow chart or a trace table. He's probably skipping lessons to keep up with the class.
Just the fact that he's not very specific in the post shows that he has a habit of rushing through things.
Fearless-Can-1634@reddit
Yes that’s my feeling as well. The fundamentals can be deceiving when you’re a beginner and watching someone else code them. They would appear easy to understand and can easily overlook practicing them. But they become tricky when put together to create an unfamiliar program.
ChanceArcher4485@reddit
I've been cosing for 7 years now. I love teaching. If you want I can tutor you dm me.
Hours is not a long time. Programming take along time to click keep at it!
pessimistic_eggroll@reddit
hello!! do you know c++? 🥹
ChanceArcher4485@reddit
This is one language I've never had to use. I mainly develop on web/mobile.
Akshy007@reddit
Sir I'm trying to learn python can you please help me with that
ComputerWhiz_@reddit
It takes way more than "hours" to learn and become good at any new skill.
Natural-Break-2734@reddit
Learn how computers work and coding is just talking to computers
Hunny_ImGay@reddit
I cannot relate more lol I've been in university for 4 years, about to graduate and still have no idea how did I even get here lol
TreatDazzling4877@reddit
If I read your "problem" right it is not actually Java you a problem with but how to solve the task. I do not think you have a problem with Java' s syntax or the coding. Critical thinking, thinking out of the box. Decide how you going to go from A to B, planning, do not sit down and start coding first do your planning, what you have and where it must go. What you need.
Simple example: swap to values a and b. OK I have to up a in b and b in a. How, good I going to store a in c temporary, then move b to a and c (a value) to b. Now I know declare three variables a, b, c. Write code to assign values. Write code to assign a to c, b to a and c to b. Print of whatever you was supposed to do with it.
I think planning is about 80% of coding.
Frockz551@reddit
Maybe try a different language. I had started with JavaScript and was completely lost even after a month and a half everyday practice.
Xavphon@reddit
Yeah it takes longer than that. lol
PM_AEROFOIL_PICS@reddit
Have you tried codecademy? They have a free beginner course
skilljoy_dev@reddit
I don't recommend Codeacademy for a total beginner.
I think they give you a terrible foundation of "why" and instead just hold your hand through syntax.
Conscious_Nobody9571@reddit
+1
I agree... for a total beginner... I'd personally recommend websites like w3schools, geeksforgeeks...
Tango_D@reddit
It took me months before it clicked. Don't worry, it takes time for your brain to build the connections from the ground up. Keep pushing, but give your brain breaks too.
I quit 3 times and the 4th time I came back to it, I could suddenly read and understand code.
skilljoy_dev@reddit
Think about "why"
"Why do we declare a variable?" "So we have space" "Why do we need to reserve space?" "Because we need to store something there" "Why do we need to store something" "So we can change it"
Programming is hardly any more than:
Look at a program as "data", and "changing data"
It becomes much simpler this way. Don't think about the "problem solving".
You're actually not solving a problem whatsoever when you're programming. (This sounds silly, but it isn't when you really think about it.)
Thats counterintuitive.
You're programming, and the computer does not understand the problem, and it doesn't understand you either.
You're creating functions that may or may not require data, and you're creating structures of data, such as "Person" with a "Name" and "Age".
Hopefully that helps, but if you don't understand I encourage you to ask a question about which part of my comment doesn't really "stick", rather than doomscrolling down the comments and looking for a magic "AH HAH" moment (because that won't happen)
And don't believe the people who tell you "Dude you just have to practice and eventually you'll get it."
Thats like saying "Bro just keep pushing the concrete block up the hill, you'll eventually make it to the top.".... Instead of finding the right way to think about the approach.
Don't be a "brute forcer" and just "grind" and "practice" without having the right mental approach.
kotlin_subroutine@reddit
Been programming for 12 years and this was a confusing
Any_Sense_2263@reddit
with programming is like with walking
first do something you know, like create main function with print and run your code
and add one new thing at time until you hit a wall. Then put a snippet here and ask more specific question
or even better, ask google, the skill of creating meaningful queries is the most important
UxBurn@reddit
You don't become a programmer in a day, and neither did I.
It takes time. It takes practice.
ToThePillory@reddit
Hours of trying.
This is a months/years thing, not an hours thing.
InviolateQuill7@reddit
You need to fail more before something clicks.
TommyV8008@reddit
Hours of trying sounds like too small of an effort. Can you name some other skill where mere hours of trying result in a strong level of skill and understanding?
While I’m sure it can be done, learning Java as your first programming language, there might be easier starting paths, such as python.
Have you tried talking to your professor about a path that might work better for you?
I personally took a much different road, many years ago, but that was long before these other languages became prevalent. I started with hardware design, assembly language, some machine language, taught myself C, then taught myself C++, and moved on from there into various other languages.
aqua_regis@reddit
Watching alone does not help. You need to actively do.
Do the MOOC Java Programming from the University of Helsinki. It is a free, textual, extremely practice oriented, proper University course, targeted at absolute beginners that makes you program and solve problems right from the start.
For additional practice, use Exercism - also free.
AncientAmbassador475@reddit
I dont understand spanish TV after hours of trying. Practice makes perfect
Fearless-Can-1634@reddit
Are you practicing enough on your own? Or just follow along the videos and don’t bother much after.
Main-Position-2007@reddit
please please please get the code snippets you don’t understand into your editor and put a lot of print statements inside it und look for every variable changing in the process.
also edit the code, if you think you got an understanding and try it in a different szenarios.
when you get all the basics like datatypes , if statements , loops , functions and classes it will be a lot easier
the best learning comes from doing and playing with it
Sparta_19@reddit
Do you know a hello world program? Do you know method calls?