❔ beginner - restarting from scratch about C# some recommended reliable book/method?
Little resume, I code since VS2018 and .NET Framework 3.5 WinForms Apps using VB.NET writing really really trash code without even knowing OOP.
Now I want to switch to C#, I followed a course with 40 videos based on those arguments:
1) Syntax, Var & Constants, Data Type, Casting, Strings, Numbers, User Input, Try & Catch, Logical Operator and Comparator, If Else, Ternary Operator, Switch, For & Foreach, Break & Continue
2) Methods, Methods overload, Array, Multidimensional Array 2D 3D, Irregular Array, Arraylist, List, Hashtable, Dictionary, Stack, Queue
3) OOP, Class Constructor, Getters & Setters, static keyword, Hereditary, Virtual & Override meaning, Polymorifism
That was not enough for code seriously since it seems I miss a tooooons of notions.
All YT "Full" C# guides are like that, so they are not full, and I don't trust pay an IRL course since I think they only teach few basic notions with the only purpose to make money and give me a certification to add to my resume and make me happy, and all tutorials found on web threat some arguments but doesn't make me able to code, or interact on community like this understanding a total different code.
Basing on this I'm here for ask suggestions on how to restart from scratch and learn C# in a better way.
In most of cases I'm also able to code an app and solve my problem, or make automatons but in a super dirty way :/ writing in a thing what should be identified as monolithic structure app
24 Replies
I was suggested to try books also, there are free and paid, pay it's not the problem, the problem is that I find them very confusional starting from the cover, this is an example, the same author, the same argument, but three different books
You don't sound like a beginner programmer, so it seems you do have some understanding of the syntax and thought process. One thing that helps me improve now after 3.5 years of developing is actually asking for a task from some company that is searching for .NET devs and would overlook my code. I then complete the task and send it back and get a pretty good review of what I did well and what I did wrong. This doesn't happen often and it's best to do it when you actually want to get or change the job. Have a project you're passionate about and just try to develop your internal API + either a console app or a web app that consumes it idea with some up-to-date architecture like CQRS +MediatR. During the process you end up reading a lot about how the code should be written while following DRY/SOLID, writing unit tests, integration tests, logging, and handling exceptions. You don't need a large idea, a simple idea will also do. If that doesn't sound attractive, then you can do the advent of code tasks that are a lot smaller in scope but touch upon nice and useful algorithmic solutions that help you improve your thought process. _But I am talking from personal experience only of course. If we're talking about books, I recommend: R. C. Martin Clean Code; MSDN documentation; I was also recommended C# in depth by John Skeet, but it's a bit of a harder read. I haven't completed it myself yet.
I'm unable to define my programming level since someone expert should evaluate me, but I can say that every time I have a doubt and I ask a question on stackoverflow in 90% of cases I get incomprehensible answers.
Also when I google something I always skip microsoft documentation since I don't understand it, and when I get errors on VS, I'm not always able to understand that they says.
I could share my past projects to someone or tell how I would solve a problem maybe.
For example after the YT course I followed on YT, I asked something like that for make practice, then I was asked to realize an application that make an user "simply" create, read, update, or delete informations into a DB as my first exercise.
Well, my answer was: yes I think I can do it, I only have to see how to run a SQL Query through .NET and I'm done^^ I can: create, update, and delete through textboxs and a confirm button.
Finally I can read through a button that load all data into a DataGridView.
He's answer: maybe it will works and will make what requested but it will be dirty. don't create a WinForm, but create a WebAPI Restful, and don't write queryes into the code but use EntityFramework.
Finally for read, (but also for other 3 methods) don't use a DataGridView into a WinForm App but create another separated app called "Frontend" maybe in Angular, that will make the job.
That's what I mean when I say I'm beginner or any kind of low level and maybe I have to restart from 0.
I've updated my comment, hopeful it's a bit more helpful. But I totally get what you mean. I also got a lot of info from IAmTimCorey youtube channel
For example - Simple C# Data Access with Dapper - Minimal API video was a nice one for me, because I enjoy that architecture.
For example right now I am in the process of developing a simple app that is async in nature. every 30 seconds a call to an external API end point (WeatherAPI) is going to be made and data I got from it is going to be persistently saved in the database.
While at the same time I want to have the ability to query the data from the persistent database (MSSM) and get current weather.
this engages me to learn about concurrency (async/await) and a bunch of other stuff.
If this is overwhelming you can start off like I said, asking for a task from some local company that is searching for devs and look into what they're asking.
I like learning by doing a lot currently. But I end up reading a lot of blogs and Microsoft documentation. I kinda don't read books currently since I love doing stuff 😄
And don't give up on Microsoft documentation, try to crack it every time you delve into it. For me it's extremely helpful/.
Don't be scared to create a simple console app on the side to try out something that you're unsure about. Testing things as you go is nice on a smaller scale since it's easier to grasp then.
oh, and this -> https://github.com/jasontaylordev/CleanArchitecture
GitHub
GitHub - jasontaylordev/CleanArchitecture: Clean Architecture Solut...
Clean Architecture Solution Template for .NET 7. Contribute to jasontaylordev/CleanArchitecture development by creating an account on GitHub.
I think this is a nice resource as well.
I haven't explored it thoroughly myself, but I've heard its a nice thing to follow.
In bigger project I realized I wrote like 500-600 row of code into a unique class (Form1.vb)
Often I used WebBrowsers for WebBrowser1.Navigate(url) since I found hard to make HTTP requests
Often I also putted like 10 Timers into an app that start and stop each other, since I was unable to do it on other ways
That what I mean when I say that maybe I can get the solution but dirty.
So I need a sort of "upgrade" or "restart" but I currently have to find the best way to do it without waste time for nothing.
I hate school/university systems cause they take 10 years for teach you very few stuffs, and that's why I always avoided books, since I'm (in general) totally unable to learn something without making practice, not later, but starting directly with practice, and making questions on what I don't understand.
Consider I also made a lot of reverse engineering, cracking (for game/challenge) some important apps.
For this people thought I was a super expert, but facts says that I'm not able to code a decent app.
I wrote everything I think about learning when you know some or even none (then I'd start by doing tasks from advent of code page). IAmTimCorey has nice videos about SOLID as well. You can watch those.
having a class named Services and writing 1000 lines into it of unrelated methods, creating additional classes inside is a start, but if you understand that it's a bad practice, then you can start by googling "how to write cleaner classes" and you'll end up seeing (S) from SOLID -> Single responsibility principle. Applies to classes and methods.
It's nice to see that you know how to code and know that something is wrong. If you can recognize what is wrong, then you can start improving. First step is always noticing what is wrong or doesn't feel right.
Then googling a vague question or digging a bit deeper into what you feel doesn't feel right and finding out specifics and reading more about those.
This is how I learn.
Yes cause when I was unable to create an app, or when I just seen a well coded app, like bots for games, I was always curious, and in some cases I asked the project, in other cases I paid people to have it, and when I opened those projects thinking to be able to edit or write another like that I always failed and here I discovered that they code TOTALLY different than me, so I always knew that I had to improve + learn other
Yeah, I've got nothing else to say 😄
consider that till 7 days ago I didn't know concepct of classes, namespace, modifiers, passing parameters to a function, return, and tons of other basic stuffs
that's what I mean that I coded using an OOP language without knowing OOP
in winforms I just used to build the GUI, then double click on items, and write code into them
yeah.
How you can start is for example build some kind of little game like battleships on your own. A console app without using anything else.
and after check out github for battleship console app projects written in c#
for this I can't say if I am at some level or I'm near to 0
compare your codes
you can definitely go start doing Advent of code tasks
Reddit has a wall dedicated to it where people share their solutions
you can find a bunch of languages there, c# as well
yes!
cool^^
press on Events
It began on 2015
so there's a lot of material
this year was pretty hard compared to previous years
so I'd start from 2015
if I were you
yeah I think making practice is the best way in absolute ,that's why I asked an exercise to an expert, and he gave me this
yeah. it's something that I've mentioned as well if you want a bigger project
you know what a List is right?
this might be a bit too much to you, or it might not, but you can try to create your own List. Try to copy what a list does and how it manages resources inside to do what it does.
arrays don't have .Add method, nor .Count, nor .Remove, etc... And how come a list can be initiated without me saying what size it should be
you can improve by replicating what is already made for you
the fun fact is that I had this exercise to do, and I had also the solution with the exercise done.
and if I try to read the code of the sample I'm unable to understand it
in the process understanding how things work
Good luck! 😄
don't be lazy and don't give up when you encounter a problem, and everything will solve itself.
I
yeah luckily I have lot of time to spend in this, I don't go at schools/university/similar so I don't have to study for a century stuffs in which I'm not interested to
for this I want be sure I invest my time in a right way
I'll try solving calendar problems^^ and one of my targets is to realize WPF, since as I realized in those days, WinForm apps are really old, and WPF replacing them. and how I also understand that lof of apps I seen had a cool GUI
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.