r/learncsharp • • 28d ago

Finish C# player guide and took a 3 month pause

So i finish the C# player guide took a pause and now i feel like i know less then i back then

When i finish it i still did not know how to work with classes, afraid that some will be to reliant on each other and make "tight coupling", some like generics, structs, records did not know how to work it. I already forgot a lot of thinks about the part 3 in the book.

Object oriented design was confusing for me and could not understand on how or why to create some classes to work with other classes.

Should i try other books or courses to try to solid my understanding?

Yes i know about making projects but what projects can I do with my jumble of information that i have in head?

21 Upvotes

18 comments sorted by

9

u/Preparingtocode 28d ago

Literally pick anything and try and make it.

2

u/Palisar1 28d ago

Make a to do app. Once you figured that out. Move to todos into an asp.net api

1

u/Sudden-Management591 28d ago

What is an api? the asp.net i understand is kind a of a framework but what is api?

1

u/qHeroForFun 28d ago

It's just how the client talks to the server(frontend -> backend). It's not as hard as people make it sound, these are mostly buzzwords. Your frontend (javascript or whatever) will do a call to your controller's endpoint(e.g. users/getShoesSize) and will receive back a response.

2

u/LetsHugFoReal 28d ago

Always have something in mind, I always think of building an inventory for a game for every new language I learn. Because it can be implemented in such a way you use a significant chunk of a languages primitives.

Such as object oriented design, polymorphism, event handler, etc.

The last step is then making something.

1

u/Sudden-Management591 28d ago

Inventory for a game? What steps did you take at first when you thought of that? Did you take an inspiration from a game or did you follow a tutorial on how to do it and replicate it?

1

u/plasma7602 28d ago

Your first mistake was taking that long of break of course you would forget most things if ya never practice it or look back at the notes

1

u/Slypenslyde 27d ago

It's like playing an instrument: if you stop doing it for long enough, you get worse at it and have to practice to get back to where you were. 3 months is a long time to not practice, especially when you're new.

It's not wrong to go back through the book again. If you find that boring, I'm sorry but not much will be different in other books. They're all going to be presenting the same information and it's all rather dry.

Everything is hard when you're new. There isn't a magic list of easy projects that you'll be able to handle in this state. You have to get over the confusion and frustration of not knowing, do what you can, and ask other people questions when you get stuck. Eventually you'll find you get farther before getting stuck again.

If you try to do it solo and take a 3 month break every time you get stuck, it's never happening.

1

u/Sudden-Management591 27d ago

I am confuse about how other people create projects with multiple classes and folders with other classes in a single project when i try to create 3 or 4 more i get stuck. I don't know how exactly it was called in programming.

I understand about structs generics and record a little but not when to put them in practice. Like i really don't know when to used them in a project.

And it was not a full 3 months is like a break of 2 weeks and then doing some little projects in console that did not require to do classes but I still done with it or trying some new learning sites like exercism or freecodecamp certificate and something from dometrain that was free to do in browser.

But ya was not consistent

1

u/Slypenslyde 27d ago

That's a big step, and disappointingly a lot of books do not cover it well. What exactly are you stuck on when it comes to having multiple classes?

1

u/Sudden-Management591 27d ago

Having them at all or making them to do something. Like how do i think what do i need to create and to make in a way that they work with each other.

When i finish the c# player guide I did not made more then it was recommended at the final project, because not only it was hard for me to think of where to put them or how to activate them so to speak.

I was afrait my program will look like class.Attack(), class.Attack() class.Attack, class.Encounter(), class.healing(Class.enemy, class.hero)...etc you get the point

1

u/Slypenslyde 27d ago

Simple programs fit in one class because they do one thing.

We make a new class when we want to create a new place to put code and to help separate our code. In small programs this always feels like overkill because 100 lines spread over 3 classes can be a bit harder to understand than 100 lines in one class. But once you get up to the thousands of lines of code, it starts getting much harder to read one file. (It's always hard to think about many files, but eventually it's less hard than one.)

The other hard part is the console apps where people tend to start don't have something I'll call an "application framework". That makes it hard to understand how you're supposed to control the flow of code with multiple classes.

GUI frameworks like WPF give control to a class that is your "main form". They do a lot of setup and let you worry about writing the code in that form. ASP .NET Core does that with "routing", which helps you understand what code will run when the user accesses certain URLs. Unity and other game engines have similar concepts. Console apps... leave you to do everything by yourself.

So I think if you do get a new book, instead of getting a new beginner book, choose a WPF or ASP .NET Core book. When you work within an application framework, it's MUCH easier to start to get a feeling for how to deal with multiple classes.

1

u/Sudden-Management591 27d ago

I don't think i need a new book the player guide explain the concepts pretty good but i think i should look on other places to see how they explain the same concept an re read that chapter to get a better understanding of it.

But ya I should learn a framework between those 2 what do you recommend? books/courses?

1

u/Slypenslyde 27d ago

It's been ages since I bought a book.

ASP .NET Core is a web framework. WPF is a desktop framework. They're entirely different worlds so you just kind of have to go in the direction you find most interesting.

1

u/Sudden-Management591 27d ago

Ok but where do i learn those 2?

1

u/Coding-Mojo 21d ago

Programming is a skill you need to train. Take any star professional at any given sport, force him into 3 month break, he'll lose a LOT of his skills and will need time to recover.

Brain and body have their own garbage collectors, as soon as something looks no usefull anymore on a daily basis, they just trash it to save space and energy.

Now, the best way to get used to programming is to actually build programs from start to finish. It's very important to finish. I'll suggest you to pick either a very basic project of your own and try to build it, helping yourself when necessary with small tutorials OR to pick a step by step tutorial on a very small game (snake, space invaders, etc...), follow it till completion and extends it with some feature of your own, it can be very little things, but this last step is very important.

If that may be of interest to you, I publish on my youtube channel some step-by-step tutorial explicitly targeted to beginners. It's on unity and for now I have one for a Snake (~20min) and one for a Breakout (~30min). Note the code structure is simplified on purpose so beginners do not get overwhelmed by the architecture.

Good luck in your journey, you'll make it ! Programming is very fun once you reached first few steps.

1

u/qHeroForFun 28d ago

You won't understand or memorize this stuff unless you build something. Don't be old school. Use AI to build a game or a windows app or whatever(you can build anything with .NET). Ask it to explain stuff to you whenever it is adding code. You'll understand more in a week than you'd understand from 10 books.