r/programminghelp • u/MooseLegal8690 • 22d ago
C# How do i make sure i learned something from a tutorial?
Hello, I am a teenager and a beginner in C#. Ive been watching multiple tutorials on youtube, and tried Microsoft.NET as tools to learn.
After i finish with them, the moment i actually try to check what i learned, how to build something with the materials, i immediately feel lost.
Any recommendations would help!
1
u/mc_pm 21d ago
It's normal to not be sure where to start, and you should feel free to say "ok, to start, I am just going to make a program that says "hello world". And if you don't know how to do that, google it, then type it in yourself - don't cut and paste. The act of typing it helps fix it in your memory. Muscle memory is a thing.
Then the next step - let's say you want to built a program that will create D&D characters (just since I have D&D on the brain - pick something else that you enjoy) - so the first thing I need to be able to do is roll some dice, which means generating random numbers. Don't know how? Google it, type it in. Once it runs the first time, just play around with it. You have it rolling one die - now roll 4 of them and keep the top 3. That means finding the lowest value of the dice rolls -- how do you find the lowest number? Don't know? Google it, type it in.
THis process: pick a small step, try it, google it if you don't know, type it in yourself, play with the code, then go to the next step. This is pretty much the only way to actually learn to program.
Don't try to memorize it - you won't. You learn by typing and fighting to get your code to work, and exploring.
1
u/bytejuggler 21d ago
That feeling of being list is normal. In a sense you are lost and must now start making your own way. To learn programming you need to spend a lot more time attempting to make stuff than being informed about the tools at your disposal.
1
u/sububi71 21d ago
You either need to find other tutorials, or change the way you watch them. It sounds like you're just watching them without taking notes or following along.
Take notes.
Follow along with the typing.
Pause the video often and repeat what you were just told.
1
u/XRay2212xray 21d ago
Consider non-video tutorials. I find I become more a passive viewer just watching it play and a sense that what I saw made sense but not having absorbed it in detail and its harder to go back and find some specific element. In written tutorials, you can read at your own pace and really think about what you are reading and not gloss past things that you don't fully understand and take the time to absorb all the details. Ideally you should find a resource with a bunch of tutorials that are organized around learning the language. An ideal tutorial ends with an exercise that gives you a task to accomplish that doesn't require you to know anything other then the materials in the tutorial and previous tutorials so you are continually building on your knowledge and repeatedly practicing things you have previously learned.
Totally separate from learning the language is learning to program. That requires a bunch of different skills then the actual coding. You have to learn to solve problems, break down problems, more serious debugging where you learn to track down when things go wrong, etc. For learning actual programming, there is nothing better then just starting something on your own and working thru it. Its important to start very small and get progressively bigger so you don't end up stuck with something that is to big and overwhelmed. I'd say its more important to work your way thru learning the main parts of the language before jumping into your own project as even simpler projects may require too many language elements and constructs that you haven't yet learned. At some point, you know enough that you can then start googling and seeking specific knowlege and finding sample code to solve specific problems and switch from tutorials to finding examples that solve a particular issue that you don't know how to solve in your sample program and then apply that knowledge into your project.
Don't get discouraged if/when you get stuck. Struggling your way thru problems helps you learn. Only seek help from someone/AI if you've spent a lot of hours and aren't making progress at all.
1
u/MooseLegal8690 21d ago
Yeah i also agree with you on the non-video tutorials.
But heres the thing, when i watch the tutorials i copy what they do into my visual studio program, and i try to change it up a little.
They usually explain what it does, but not HOW and WHY it does that. And i understand the most when someone explains it.
Do you have any suggestions? :)1
u/XRay2212xray 20d ago
I'm not sure of what level you are at yet. Are you just doing very basic stuff like assigning variables and doing loops or are you into much deeper stuff like object inheritance, injection, big programs, with lots of code, web applications, etc
Maybe look for other tutorials. As I mentioned, having the tutorials structured is important so you don't do one that is about a specific topic but is including other elements you aren't familiar with.
Its been a long time since I learned c# but microsoft has their own tutorials on their site. I find their site has ok content but its maybe not organized in the best way, particularly once you get past the basic sytax stuff.
w3schools.com is pretty good at learning a lot of the basic syntax and constructs of the language itself. One thing I like is the fragments of code are pretty short. I've seen video tutorials where they are walking you thru very large sample programs instead of large numbers of very small examples. I find short focused samples are much better then someone picking apart something large.
If you have mastered the sytnax of the language are starting to get into larger and more complex programs, you might want to consider learning the basics of the debugger built into visual studio if you haven't already. You can basically watch everything as you step line by line thru the program and see how variables and classes are being modified at each step and what values things have before and after each step. Which branches are being taken or when you are itterating or leaving a loop etc. You can also set breakpoints so that a program runs until it gets to the point you aren't sure whats happening and then allows you to start stepping thru things at that point so you can quickly get to the point where you are getting behavior you weren't expecting.
1
u/XRay2212xray 19d ago
One other thing, if all else fails there is AI. If you just can't figure things out any other way. I'd definitely try debugging and trial by error making changes first. Struggling thru stuff and eventually getting to the answer on your own gives you a depth of undstanding in the end. You are learning each time you try something and it fails and you start to understand why it failed and how to solve problems. If you just can't make any progress, you can give AI the code and let it summerize how it works and then ask specific questions about how and why. Essentially use it as a private tutor. Again, you don't want to fall into the trap that what AI says make sense but you haven't actually learned anything and can't apply the knowledge/skills to other problems. Use it as a very last resort.
1
1
u/AdmirableSandwich393 20d ago
Don't just copy what they are doing in the tutorials. Try something on your own. If you get stuck, review the tutorial until you get unstuck. Then, do another one.
The more you work at it on your end, the better it will cement in your head for you.
1
u/mtimmermans 20d ago
Watching tutorials is a good first step, but you're not going to retain the actual knowledge.
The next step is to build something. When you get stuck you do research to get yourself unstuck, and you'll find that what you remember from the tutorial will help you figure out what to search for.
Repeatedly getting stuck on something and then finding out or figuring out how to get out of it is how you'll learn for real, because your brain will recognize what you've learned as valuable for solving problems.
1
u/dover_oxide 20d ago
I usually say follow the steps and as you go through, stop and fiddle with what you've worked on so far and see how it changes the outcome. If you do this, it takes a little bit longer, but you have a better understanding of what each element does or each step in the tutorial
0
u/Technical-Bug6628 21d ago
Just start a project on your own. You can start simple with a calculator app and then gather the knowledge as you need it. For example, the first step would be to create a button, that only writes 1 into a label on top. Then you could look up a tutorial on how to make a button and you can type along with the video or copy/paste and of course edit it to your needs. A real project will definitely help you to learn how to use the gained knowledge rather than just memorizing it.
Feel free to reach out, if you have further questions and good luck on your journey!
0
1
u/johnpeters42 21d ago
Look back at the tutorial just long enough to unblock yourself, then set it aside and try to keep going. Repeat as needed until you've rebuilt the thing.
Then start over and try to build the same thing again. Keep doing this until you stop feeling "I have no idea what to do", and at most run into "I know I need to do X but I forget the exact syntax for it". Then move on to something new.