Prerequisites
Install Microsoft
Visual Studio 2022 Community Edition rather than Microsoft Visual Studio Code. Visual Studio 2022 provides a better learning experience than Visual Studio Code.
Next, install a free 30 day trial of Jetbrain's
ReSharper extension for Visual Studio. Out of the box ReSharper will assist with doing things that will make learning C# easier and provides helpful refactoring of code. I guarantee after 30 days you will find ReSharper indispensable.
Something many novice developers miss is not using source control. Go to GitHub and create an
account. Next, read the following on using GitHub in Visual Studio 2022. What does using GitHub in Visual Studio give you? The ability to source code on the web as a public or private repository that ensures you have a backup of working code. Let's say you write code that works and then commit to a repository than later the code fails to work, you can than revert code from failed to working code again.
I can not stress the importance of understanding how to master using GitHub is but once you have failed/broken code and do not have GitHub setup than it will become clear the need for backup code.
Visual Studio Debugger
This is a must skill to master and one of the most powerful tools (
First look at the debugger) in Visual Studio 2022. When something does not go right using the debugger is invaluable rather than how many developer will write output to the screen (in console projects).
Baby steps learning to code (first milestone)
Resist the urge to create a web, desktop windows forms, WPF project that does something, I guarantee it will fail and frustrate you to no end.
Next up, forgo free courses to learn C#, get a subscription to either Linked-in learning or PluralSight. Both are invaluable resources and in both the authors are experts.
- Linked-in learning, set level option to Beginner
- PluralSight there is a free trial and what is known as Skill IQ, pick a C# and select Measure Now. Once done you will be presented with recommended courses.
As you are taking courses, take time to dig into items being taught, for instance, (and mentioned by Skydiver) variable, branching, loops to name a few.
Take time to go through Microsoft's
C# language documentation.
Connect the dots (second milestone)
Take what has been learned and start getting into separation of concerns. This means making use of
classes and
class projects.
Working with data (third milestone)
As the majority of applications, even small projects typically need a place to store and alter data. For this my recommendation is to use SQL-Server as a database.
Install
SSMS (SQL-Server Management Studio), learn to interact with databases, a great resource is
W3-schools. Many novice developers will try to interact with data by foregoing how to properly write SQL and is a huge mistake.
There are only two choices to work with data
- Microsoft EF Core with EF Power Tools. EF Core has everything needed to work with data and EF Power Tools will create code to work with a database in C#
- Dapper which unlike EF Core, the developer writes SQL. Before Dapper a developer would need to write say 20 lines of code to perform an update operations while with Dapper, two or three lines of code.
There are proponents for EF Core and Dapper. I recommend starting with Dapper to get acquainted with SQL so that in the next step, trying EF Core a developer is better versed with why EF Core does what it does.
Create a simple project (fourth milestone)
The objective, incorporate what has been learned with a console frontend project and one or two class projects where one of the class projects does nothing but data operations.
For many developers it is frustrating to properly work with console projects e.g. get information from user input for instance. Learn about
Spectre.Console for this.
A great idea for a first project (keep it simple), an address book which stores data in a database.
Epiphany (Fifth milestone)
Hey I feel confident to move from console projects to say WPF or web projects. Stop and reconsider and go with Window Forms and learn about things like
events. Master Window Forms, move on to WPF or web.
Both web and WPF will still be challenging unless you have mastered the basics.
If you are interested in being a professional developer, go in the direction of ASP.NET Core which means kind of starting over as the following must be learned
- CSS
- JavaScript (avoid jQuery)
- Dependency Injection
- Logging (SeriLog)
Validation
Validation can fit into third milestone onwards, recommend using
FluentValidation library. This is a critical aspect of learning to code.
Summary
There are no shortcuts to mastering becoming a developer. Lots of quality time is needed to become a developer which means at least once a week after learning the basics expand your skill set by learning something new and/or refining what has been learned.
At each milestone evaluate yourself, is the right for me?