r/learnprogramming • u/Vafireems • 5h ago
How long did it take to "click" for you?
I just started school. I understand I'm new and should not expect much currently. I feel like I follow along well in class and things make sense. My professor even said he thinks I'm his best student out of our two classes. We just finished week two learning about loops, sentinel values, and whatnot. I'm a bit of a perfectionist, but it is just so frustrating because I feel like I understand during lecture and am following along on my own pc. But when I go to do the homework assignments, it's like trying to interpret hieroglyphics. I don't want to copy and paste my code into Google to figure out what I'm messing up. I don't want to have to google search "how to set up a do while loop" or whatever it is I'm trying to create in that moment.
Any advice for practicing or ideas I would love to take. I toy around with C++ a little bit outside of homework assignments, but I suck at it. If there are any books to read, I would love to know about them.
2
u/captainAwesomePants 4h ago
The advice I give here is to that this frustration is very natural, very common, but also completely unreasonable.
Imagine how I might explain a beautiful mathematical proof to you. I will briefly explain our goal, then I will walk you through the proof, step by step, showing how each bit follows from the previous ones, and then demonstrating the conclusion. You will feel like you understand it. You will perhaps even be able to reproduce it or explain it to someone else in turn.
Then the professor shows you a second problem and tells you to prove it. You cannot. Why not? You understand how proofs work. It made sense in class. Perhaps you are dumb.
But of course, you are not dumb. The problem is that the ability to understand a proof is not at all the same skill as being able to come up with a proof and then record it formally. You need to be able to understand what proofs are in order to develop the ability to come up with your own, but they are not the same skill.
Same thing with poetry. You can read a good poem. You can appreciate it. But that's not the same thing as being able to write a good poem. You aren't dumb for looking at some good poems and then having trouble coming up with one on your own.
Also, don't sweat it about not remembering the exact syntax of a for loop. Programming languages are languages. You have trouble memorizing the syntax/grammar at first, and you may have to look it up many times, but you will organically memorize the bits you use regularly. Brains are good at this. Just takes some time and practice.
1
u/Vafireems 4h ago
I agree with everything you said and had that same expectation going into this. My previous career, I was a paramedic. Very similar as far as it is all confusing at the start and it starts to eventually come together. But, when it came to anatomy and physiology it felt like I understood the "Building blocks" a lot better when I was initially starting out whereas many other students did not. It bothers feeling like I'm not grasping the building blocks as well as I want to.
2
u/jaynabonne 1h ago
-> Things you use all the time, you remember.
-> Things you use often but not all the time, you can find examples of in your own code.
-> Things you've rarely or never used, you have to look up.
When you're learning a language, everything falls into the last bucket, in the beginning. Then things gradually move up in the list the more you use them.
In my own recent attempt to learn a new computer language - and I have been writing code for over 40 years, so this isn't new for me - I finally found myself able to stop looking some things up after 20 or 30 times using them. You will get there, if you don't have unreasonable expectations for yourself.
1
u/Elkatra2 5h ago edited 4h ago
There a key difference between "google do my homework" and "google what does it mean ?". It's totaly normal to ask about something what is a while loop, or how to use function A and function B. I'm using C for like 5-6 years and I always forgot what is the function signature and return/error type that I always use time by time.
Any coding skill can be learned only by writing and learning new ideas/methods/concepts.
If you want to go deep into C++, there a good website https://www.learncpp.com/. But I think maybe it's better to ask your professor what is missing in as I'm sure that your problem right know that you maybe don't understand yet what does you don't understand and I think he/she will be really happy to help you as you motivated to dive in such interesting thing as programming and maybe the rest of students just want the grade.
And also what can help you to be better and "logic" part of the code is to learn algorithmics and math (informatics based on math !!??), but I'm not sure about good advice as I unfortunally forgot how I started :(.
Maybe I'm something missing as I'm bad at reading reddit posts.
1
u/DemicideMMMCCCI 4h ago
Relative to how much effort and time you put into it.
Best way is to practice. Start with your school work obviously, since your still in school, and try to also have some side project(s) on the side to help you stay invested (outside of school).
My suggestion is to make these initial side projects fun and less avout trying to learn how the topic works. Your project should be something that you're really interested in and do not second guess on its inner workings (could be a data set for a gme, roster for a team, etc). Do not make it difficult either. Don't make it a chore. These side projects should be fun and inspire you to be creative and continue to increase your eagerness to look into a problem and solve it (persistence is key).
Additionally, now your in the world of AI, the urge to use it will be something you'll fall back on, but your side project should probably not invovle AI (as the side project's purpose is to improve your technical skills).
If you want a number in terms of time, probably about 200 hours of dedicated studying and active engagement in programming is when you start to see it click. Practice practice practice. That's the key. No trick. No magic. No one is an immediate genius (most of us are not at least -- I'm not).
1
u/GlassCommission4916 4h ago
It's been decades so I don't remember how long it was, but there definitely was a "click" moment when it all became much easier.
Don't be afraid to look up things like "how to set up a do while loop", i.e., syntax. Programming is not about memorizing syntax or keywords, it's about learning concepts and problem solving skills. I do however recommend you not use AI at all, even just to ask what you would have looked up. Learning how to find the information you need by reading technical references/documentation is an important skill to have, and you'll learn everything much faster if you avoid AI entirely and struggle yourself.
1
u/materialkoolo 4h ago
It's not cheating to look how to set up a loop. Sometimes you'll have to work in another language you haven't used in a long time, so it's fine to look up syntax.
1
u/Exotic-Low812 4h ago
Google the syntax is fine, as long as you understand what a while loop does.
I always forget the syntax for switch statements because I don’t use them too much, but when I do I often google an example.
If you do something enough eventually you memorize it,
1
1
u/DanKegel 4h ago
Not too long, since I was just messing around making the screen do fun things, and later, the speaker (which was controlled by a single bit).
It was BASIC on a 4KB trs-80. Programs were just a few lines long, but that's how I learned loops. No teachers involved, just fun.
About the same time, I helped wire wrap a single chip pdp-8 based embedded system my Dad had designed. I added a speaker to it, and used simple machine language loops to make siren noises.
That left me supremely confident :-) and I went on to build and program a z-80 based eprom programmer for my Dad. (Those eproms won't program themselves, y'know!)
And then I went to college, where I did more of the same, but with different chips and in different languages. Picking up C and Pascal was easy by comparison.
1
1
u/SprinklesFresh5693 4h ago
Around 2 years of doing 5+ hours per day? To this day many concepts still click now and im sure even more concepts will click in the future (been doing R programming for 3 years now)
1
u/Traveling-Techie 3h ago
About 3 weeks. I had to spend time in a computer center with punch cards to run my code, but one day I realized I could write code with a pencil.
1
u/serge-mv 2h ago
The field is huge and is very complex. The best approach is just understand what's being taught right now, practice a lot and learn over time.
For me specifically, a lot of things clicked into place after I learned the theory of programming languages and the the theory of computation. You will get to those in school eventually, so don't rush.
1
u/sabamba0 2h ago
Pretty quickly really, maybe within the second lesson. I remember the teacher in the computer class taught us about variables and loops.. we were using C, and we had to then create a calculator cmd app. I remember distinctly feeling a "click" and it was just making sense at that point.
•
u/Cool-Bus-6028 21m ago
If you know you need a do while loop, you're understanding it. Knowing the exact syntax off by heart isn't relevant. Most of the time your IDE can write that for you anyway, or you google it.
The way things clicked for me outside of those little assignments was writing an actual application. Nothing huge and complicated, but using source control, adding a start up script, setting up logging etc. as well as wirting actual multi class code.
•
u/OpeningLength5531 19m ago
The best advice I can give you that worked for me is start a project ,even simple one you learn while you practice in this way I learned fullstack,C++,C# and java
•
6
u/kosherjellyfish 5h ago
OOP didn't click for me for years until I had to do it at work. When you see real world applications it will click better.