Beginner path
Learn to program, step by step
It's not too late. This path goes in order, from what programming is to design patterns, with examples in C#.
Part 0 · Before you start
Chapter 0 · 6 min read
It's Not Too Late to Learn to Code
If you think you missed your chance to learn programming, this chapter is for you. Why it isn't too late, what programming really is, and how to follow this path from zero.
Part 1 · Fundamentals
Chapter 1 · 8 min read
Your Environment: Install .NET and VS Code, Run Your First Program
We install .NET 10 and Visual Studio Code on Windows or macOS, create a console project and run it. Then we break the program on purpose to learn how to read a compiler error.
Chapter 2 · 11 min read
Variables and data types: how a program remembers things
We learn how to store data in variables, pick the right type for each value and do math with them. At the end you read what the user types and build a tip calculator.
Chapter 3 · 10 min read
Decisions: if, switch and operators
Your program learns to choose: we compare values, combine conditions with &&, || and !, and use if, else and switch. We also read numbers from the user with int.TryParse so a bad answer doesn't crash the program.
Chapter 4 · 11 min read
Repetition: loops with while, do-while and for
We learn to repeat instructions without copy and paste, using while, do-while and for in C#. We cover break and continue, how to avoid an infinite loop, and finish with a guess-the-number game.
Chapter 5 · 10 min read
Collections: arrays, lists and dictionaries
Learn to keep many values in a single variable with arrays, List<T> and Dictionary<TKey, TValue>, and to walk through them with foreach. We finish with a word counter.
Chapter 6 · 11 min read
Methods: Split the Problem into Pieces
We learn to write functions in C# so we stop repeating code and a program reads like a list of steps. We cover parameters, return values, void, naming and scope, and then reorganize the guess-the-number game.
Chapter 7 · 11 min read
Errors and debugging: read the message before you change the code
We learn to tell a compiler error from an exception, read a stack trace, and use try/catch and TryParse. We also use the VS Code debugger to watch the program line by line while it runs.
Part 2 · Object-oriented programming
Chapter 8 · 4 min read
Object-Oriented Programming
A clear explanation of OOP without complicated jargon
Chapter 9 · 12 min read
Classes and Objects in C#: Write Your First Class
We go from the idea to the practice: a C# Product class with properties, a constructor and methods. We cover what new does, what this is, why two variables can point to the same object and when to use static.
Chapter 10 · 11 min read
Encapsulation, Inheritance, Polymorphism and Interfaces in C#
Chapter 8's concepts, now with code. We make Product reject invalid values, build a child class with override, loop over different objects with a single list, and see why an interface is usually a better choice than inheritance.
Chapter 11 · 3 min read
Object-Oriented Programming done wrong
Common OOP mistakes I see every day
Part 3 · Software design
Chapter 12 · 10 min read
SOLID for beginners: five rules for code that survives change
A short before and after C# example for each SOLID principle, using a corner store as the running thread. We also cover when not to apply them.
Chapter 13 · 6 min read
Design patterns: names for solutions that already exist
What design patterns are, why they exist, and why you should recognize the problem before reaching for one. We preview the five coming next: Factory, Strategy, Observer, Singleton and Repository.
Chapter 14 · 7 min read
Factory: stop scattering `new` across your code
The Factory pattern puts the decision of which object to create in one place. We use the corner store's notifications: first the code with a repeated `switch`, then the version with a factory.
Chapter 15 · 8 min read
Strategy: change the algorithm without touching the rest of the program
The Strategy pattern turns a giant `if` or `switch` that picks how to calculate something into interchangeable pieces behind an interface. We apply it to the corner store's discounts and look at when it is not worth it.
Chapter 16 · 10 min read
Observer: tell whoever cares when something happens
The Observer pattern lets one object notify several interested parties when something changes, without knowing them. We look at `event` and `Action` in C#, the interface version, and why you have to unsubscribe.
Chapter 17 · 9 min read
Singleton: One Object and the Traps It Brings
We look at the Singleton pattern in C#, the simple version and the Lazy<T> version. Then we see why it is almost always better to create one object and pass it to whoever needs it.
Chapter 18 · 8 min read
Repository: Hide Where Your Data Lives
We learn the Repository pattern in C# with an interface and an in-memory implementation. The rest of the program depends on the interface, so changing where the data is stored does not break everything else.
Part 4 · What nobody tells you
Chapter 19 · 9 min read
Git and GitHub: save your code with history and share it
We learn the Git commands you use every day: init, status, add, commit, branch and merge. Each step is shown in the terminal and in VS Code's Source Control view, and at the end we push the project to GitHub.
Chapter 20 · 11 min read
How to read documentation: find the answer yourself
We learn how the .NET documentation on learn.microsoft.com is organized and how to read an API reference page: signature, parameters, return value, exceptions and examples. We use List<T>.Add and int.TryParse as real cases.
Chapter 21 · 8 min read
How to ask for help so people actually help
Asking for help is a skill you can learn. How to search the exact error, build a minimal example, and write a question someone can answer without guessing.
Chapter 22 · 8 min read
Using AI without skipping the learning
AI can be the best tutor you've had or the fastest way to learn nothing. Concrete rules for using it well, examples of good and bad prompts, and what to build now that you've finished the path.