As I have described in the title I’m a total beginner in programming. I chose C sharp as it seemed simpler when compared to C and C++.
I have been learning C sharp and it’s basics for the past week. And these are the topics I’ve covered:
• working with – strings, int, double, bool • Getting User input • Arrays • Methods/functions • return statments • if statement • Switch statement • While loops • 2d arrays • Exception handling • Classes and objects • constructors •Object Methods
These are the concepts I’ve covered so far. I want to be confident in using the above concepts for performing tasks that require them with confidence. So I’d like suggestions on how I can go about improving my basics and also further my coding skills. Is it possible for me to start with a small project or any exercises??
Any help would be much appreciated!! Please don’t mind if I’ve got any terms wrong, do feel free to correct me.
Thank you.
ok, now work on File IO. Build a console program that displays every 5th line from a long text file. Learn how to move, save and delete files and directories from within you application. Next, Learn how to connect to SQL Server and query a database for something, and display in a console. You are at the beginning of a very long and fun journey.
Thanks for the advice. I’ve been worried about how to improve and what to start off with. This will help me get to the starting line.
Write an application that actually does something as opposed to something for the sake of something.
A popular first choice for many developers (myself included) is a text adventure.
You’ll have lots of interesting questions to answer, like choosing data structures for the map, handling the scoping of the inventory, handling saving the game and reloading it.
All of these questions have solutions that have facets that will be the same irrespective of whether you’re writing a simple application or an enterprise program so the lessons you encounter will be forever useful.
Hey this sounds interesting and useful. Thanks for suggestion.
Look into the four pillars of Object Oriented Programming and the SOLID principles is all I’ll say. They’ll help you write clean and flexible code
Thank you!!
I recommend choosing a page that displays data about anything you like. Download that data to a file and then transform the data to information
My first project was scraping a game wiki that allowed me to know how much money I could spend per killing a monster while still making a profit
You learn a lot of stuff and yet is still pretty easy so a beginner can do it
Hey thanks for the suggestion. I too have been looking for game based projects.
Stick with Console apps while you focus on the language, OO techniques and the SOLID principles, and the .NET Framework.
Invest some time in really learning how to use the debugger. Learn all the features that the debugger offers. Debugging skills are essential, even for the very beginning programmer.
Dress up the console by learning how to set the foreground and background colors, and how to set the cursor position. Now you can program anything from a text adventure to the game Snake.
Add file I/O and reading/writing JSON files to your skill set. That way you can save learning SQL databases for later, as that is a very large topic itself.
Stick with the above and you have an excellent platform to did deeply into C#.
ASP.NET is awesome but leave that for later because there is so much outside of C# that you need to know: HTTP networking, HTML, CSS, JavaScript and JavaScript frameworks, and a whole lot more.
WPF is dead as everyone else has said, and it sucks to work with.
Hey this helps..thanks for charting it down!!!
Don’t learn WPF. Go with a asp.net core project
Okay since I’m totally new to this I don’t really understand the pros and cons on which is more suitable. I’d like to begin with something that could set my foundation right and also boost my confidence to learn more.
Don’t learn WPF. In this day and age when desktop apps as a whole are mostly dead, WPF is doubly dead.
As someone who is about to roll out a new WPF application … Guess I’mma die 🤷♂️
Then what do you suggest to start off with?
Small projects are definitely a good way to learn. I personally like games. A few ideas, in increasing order of complexity:
War (the card game)
Blackjack
Tic-tac-toe
Checkers
Yahtzee
A simple roguelike
Maybe try these in order to build your skills gradually? 🙂
Hey thanks for the suggestion. Yes…I’ll definitely take this into consideration.
C# devs
null reference exceptions