Question learning

AkkoRu

New member
Joined
Sep 17, 2024
Messages
4
Programming Experience
Beginner
how can i learn the best on C# and practise, im a beginner and i dont understand how i should start
 
Do you already know a another programming language, it will this also be your first programming language?
 
Hopefully @kareninstructor will provide some input since she is a professional at teaching technology and programming. Follow what she says. Take what I write below with a huge grain of salt.

I was self-taught and by the time I learned C# it was my 8th or 9th language. I recommend first learning about basic concepts like console I/O, variables, branching, looping, and calling subroutines. Learn about basic data structures and algorithms. Stick with using the console and imperative programming for as long as you can. Try not to get sucked too deeply into libraries and programming frameworks until later.

When I was learning, working with a database was not a must, but nowadays, it has become a necessity unless you work in a niche field that doesn't need a database and can get by with just text files. When its time to start learning about libraries and programming frameworks, I would recommend learning how to interface with a database as a first step, rather than learning how to do GUIs which is what people always gravitate towards first.

Learn about design patterns.

Practice -- a lot. Some people claim that they can learn programming just by watching videos -- I wonder if these are the same people who say they can learn kung fu just by watching videos as well.
 
Hopefully @kareninstructor will provide some input since she is a professional at teaching technology and programming. Follow what she says. Take what I write below with a huge grain of salt.

I was self-taught and by the time I learned C# it was my 8th or 9th language. I recommend first learning about basic concepts like console I/O, variables, branching, looping, and calling subroutines. Learn about basic data structures and algorithms. Stick with using the console and imperative programming for as long as you can. Try not to get sucked too deeply into libraries and programming frameworks until later.

When I was learning, working with a database was not a must, but nowadays, it has become a necessity unless you work in a niche field that doesn't need a database and can get by with just text files. When its time to start learning about libraries and programming frameworks, I would recommend learning how to interface with a database as a first step, rather than learning how to do GUIs which is what people always gravitate towards first.

Learn about design patterns.

Practice -- a lot. Some people claim that they can learn programming just by watching videos -- I wonder if these are the same people who say they can learn kung fu just by watching videos as well.

thanks a lot!!!!, but how can i practice
 
how can i practice

Like anything else, by doing. There's no secret solution. Just come up with ideas for basic projects and write code to implement them.
 
You asked how to practice, not how to start from scratch. Those are two different things. If you want good answers then you need to ask good questions. There are plenty of beginner tutorials on the web so I suggest that you search for them using a search engine, which is something you could have done already. If you want to write software then you should have a decent understanding of how to use it already, so searching the web for obvious keywords like "beginner C# tutorial" is not something you ought to need to be told. Here is one popular such tutorial but there are others besides and it's worth going through more than one as they may cover slightly different things and/or in slightly different ways.
 
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?
 

Latest posts

Back
Top Bottom