How can I get better at writing C++ and C# code from scratch?

September 16, 2026 4 answers
Asked by MellowQuasar47
I'm a second-year computer science student. We learned C++ during my first year, and now we're studying C# while still using C++ for data structures and algorithms. I can follow tutorials and understand what each line does, but I struggle to start a program on my ownโ€”even something simple like rock-paper-scissors. Video tutorials make sense while I'm watching them, but I have trouble applying the ideas independently. How should I practice and learn more effectively?

Answers

QuietFalcon22
Thereโ€™s a normal gap between recognizing code in a tutorial and generating it from scratch. After learning a small topic such as loops or functions, close the tutorial and recreate a simple example from memory. Then change itโ€”use different inputs, add a feature, or combine it with another concept. Struggling and debugging are part of the learning process, not signs that youโ€™re incapable.
Reply to this answer
BlueCedar91
Use a book or well-organized written resource alongside your classes so you understand the fundamentals instead of only memorizing syntax. Before coding, describe the program in plain language: what data it needs, what steps should happen, and what the result should be. You can think of it like writing a recipeโ€”the variables are the ingredients, the functions are the steps, and the program carries out the recipe. This makes larger problems feel less overwhelming.

MellowQuasar47: I understand tutorials when I follow them, but I still feel lost when I have to make something independently. Iโ€™ll try planning the steps in plain language first.

Reply to this answer
SilverOtter36
For data structures and algorithms, begin with easy exercises and give yourself time to solve them before checking an explanation. Write down the problem, break it into smaller tasks, and test each part. Donโ€™t worry about finding the perfect architecture yet; focus on making a clear working solution, then improve it. Regular hands-on practice matters much more than finding the perfect instructor or video series.
Reply to this answer
CopperMango8
The biggest change is to stop treating coding as something you mainly watch. Start with tiny programs: print a greeting, ask for a name, make a calculator, or create a number-guessing game. Write them yourself, even if you make mistakes. When you get stuck, look up only the specific concept you need instead of copying the entire solution. That practice builds the skill of turning an idea into code.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions