Adding tons of code without understanding why...
If you’re trying to learn how to build an ASP.NET Core application, there are no end of tutorials which promise to help you out and show you a path forward.
But why is it, when you start following one of these tutorials, you so often end up typing tons of code without really understanding what it’s there for or why you need it?
As it turns out, just copying someone else’s code isn’t really a great way to learn.
A better alternative#
Now, before you deride all tutorials as worthless and go off on a hunt for something else…
Tutorials, when used properly, can be a great way to learn. They’re just not very good if you use them as an alternative to thinking for yourself.
If you want to learn ASP.NET Core MVC (or anything else for that matter) I would highly recommend following some tutorials, or screencasts but in case it helps, here’s my approach for getting the most out of them.
- Start with a problem you’re looking to solve
You may have noticed the Internet is quite, well, big! There are endless tutorials and learning resources to choose from.
To make the needle slightly larger (or the haystack smaller if you prefer) I find it helps to be specific about what I’m trying to learn.
Specific means I have a task I need to achieve. Ideally this task is one small step and I just need to know how to take that step.
So, not “ASP.NET Core MVC” (broad subject). But, “How to submit data using forms with ASP.NET MVC Core”.
Now “ASP.NET Core Validation”. But “How to validate my posted form data using ASP.NET Core MVC.
To get specific means having a problem you need to solve and this is where side projects come into their own.