Rust: from zero to your own organizer
All 60 lessons and the preface are available in the course contents. Build a personal console organizer with saved data and a backup from scratch. The entire course is free; reading needs no account.
·
Every lesson is open: reading needs no account.
-
Before you begin
A free course for a first-time programmer. One project grows from a printed message into a personal organizer.
-
What Rust is and why it exists
Explain the choice of language without promising absolute safety.
-
The organizer we will build
Distinguish the future demonstration from the program available now.
-
Files, folders and your workspace
Find the saved file without confusing it with another copy.
-
Understanding the terminal
Enter a folder whose name contains spaces.
-
Installing Rust and checking the tools
Check the installation and distinguish the tools involved.
-
Your first Cargo project
Distinguish checking, building and running.
-
Reading your first program
Change the output and explain every line.
-
Using compiler diagnostics
Separate a language-rule error from a mistake in your intention.
-
Variables, values and types
Predict values and distinguish reassignment from a new binding.
-
Numbers and arithmetic
Check calculations and the limits of numeric types.
-
Boolean values
Lesson 11. Write and verify a rule for selecting tasks.
-
Branches and expressions
Lesson 12. Choose a safe action and obtain a value from a block.
-
Repeating actions
Lesson 13. Repeat work without missing boundaries or running forever.
-
Functions
Lesson 14. Separate calculation from display and explain how values are passed.
-
Arrays
Lesson 15. Process a fixed set of durations and check its boundaries.
-
Your first automated test
Lesson 16. Make a calculation check itself against an expected result.
-
Practice: a small summary
Lesson 17. Build and test a task summary independently using familiar syntax.
-
Values and memory
Lesson 18. Distinguish a value, its owner, and the storage it may use.
-
Ownership and moves
Lesson 19. Explain why an old name becomes unavailable after passing a String value.
-
Borrowing for reading
Lesson 20. Let a function read a string while its owner keeps using it.
-
Mutable borrowing
Lesson 21. Change a string through a function and explain when other access becomes available again.
-
String and &str: storing and reading
Lesson 22. Choose an owned string for storage and a text view for reading.
-
Slices: part of data without a copy
Lesson 23. Pass part of a numeric collection to a function without building another array.
-
A growable list: Vec
Lesson 24. Add and remove task titles without fixing the number of slots in advance.
-
Text, UTF-8, and visible letters
Lesson 25. Distinguish bytes, `char` values, and visible letters in a task title.
-
Tuples: two results from one function
Lesson 26. Return a task title and its duration together without mixing up the values.
-
The Task struct: data with useful names
Lesson 27. Put a task's title, duration and completion state into one type of your own.
-
Methods: actions beside Task
Lesson 28. Create a task, read its state and finish it through methods.
-
Enums: one valid task state at a time
Lesson 29. Represent a task's state with one named variant that may carry extra data.
-
match: handle every variant
Lesson 30. Read a task state fully and catch a missing case before running the program.
-
Option: when a record might be absent
Lesson 31. Look up a title by position without crashing when that position does not exist.
-
Result: explain a failed operation
Lesson 32. Turn text into a number of minutes and explain invalid input without stopping the program.
-
The question mark: return an error to the caller
Lesson 33. Parse minutes first, then check their meaning and return a useful error.
-
Terminal input: a line, an empty answer and end of input
Lesson 34. Read a task title and distinguish a blank line, end of input and a read error.
-
Launch arguments: a command and a title with spaces
Lesson 35. Give the organizer an action and title when starting it from the terminal.
-
A command as a checked intention
Lesson 36. Separate parsing launch words from acting on the organizer and explain each error.
-
Tasks in memory: add, rename, complete, remove
Lesson 37. Carry out four task actions and see how removal shifts list positions.
-
Task IDs: numbers that do not shift
Lesson 38. Give each task a stable ID and never reuse it after removal.
-
Scenarios: test a sequence of actions
Lesson 39. Check consequences of several actions and errors that must leave data unchanged.
-
Checkpoint: an organizer in memory
Lesson 40. Run an interactive organizer, perform several commands in one session, and handle invalid input.
-
Iterators: read, change, or transfer ownership
Lesson 41. Choose how to visit tasks without losing access to them too early.
-
Closures: select the tasks you need
Lesson 42. Search task titles and show matches in a stable order.
-
Map and set: count task tags
Lesson 43. Build tag statistics without relying on storage order.
-
Modules: separate logic from startup
Lesson 44. Split code into files and expose only the names callers need.
-
A generic type: one function for different lists
Lesson 45. Read and write a function that works with different element types.
-
Traits: a shared behavior contract
Lesson 46. Give two types a shared behavior and constrain a generic function.
-
Lifetimes: how references relate
Lesson 47. Tell when a returned reference may point into an input.
-
External libraries and dependencies
Lesson 48. Add a justified library and inspect what the project includes.
-
Paths and the file system
Lesson 49. Choose an understandable data file location across systems.
-
Reading and writing files
Lesson 50. Write text, read it back, and explain an input/output failure.
-
JSON format
Lesson 51. Turn tasks into JSON and validate them after reading.
-
Saving without losing data
Lesson 52. Write new data through a neighbouring temporary file and retain the old file on failure.
-
Backup copy
Lesson 53. Validate a backup and recover its data into a separate file.
-
Useful commands
Lesson 54. Provide clear help and distinguish normal output from errors.
-
Settings and documentation
Lesson 55. Explain data-path selection and write instructions another person can follow.
-
A complete test set for the task file
Lesson 56. Test saved tasks, damaged data, repeated reading, and text in different languages.
-
Automatic checks on three systems
Lesson 57. Run formatting, Clippy, and tests whenever code is sent.
-
Building and sharing the program
Lesson 58. Build for your OS, show a version, and hand over a clear archive.
-
Independent extension: task priority
Lesson 59. Add priority while still reading old JSON and rejecting invalid values.
-
Releasing the console organizer
Lesson 60. Combine familiar parts into a program another person can run and verify.