Shanraq.org Shanraq.org

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.

Lessons: 60 · 284 min to read · 1200 min to practise

Every lesson is open: reading needs no account.

Start with lesson one →

  1. Before you begin

    A free course for a first-time programmer. One project grows from a printed message into a personal organizer.

    3 min to read

  2. What Rust is and why it exists

    Explain the choice of language without promising absolute safety.

    4 min to read · 20 min to practise

  3. The organizer we will build

    Distinguish the future demonstration from the program available now.

    4 min to read · 20 min to practise

  4. Files, folders and your workspace

    Find the saved file without confusing it with another copy.

    3 min to read · 20 min to practise

  5. Understanding the terminal

    Enter a folder whose name contains spaces.

    4 min to read · 20 min to practise

  6. Installing Rust and checking the tools

    Check the installation and distinguish the tools involved.

    5 min to read · 20 min to practise

  7. Your first Cargo project

    Distinguish checking, building and running.

    5 min to read · 20 min to practise

  8. Reading your first program

    Change the output and explain every line.

    3 min to read · 20 min to practise

  9. Using compiler diagnostics

    Separate a language-rule error from a mistake in your intention.

    3 min to read · 20 min to practise

  10. Variables, values and types

    Predict values and distinguish reassignment from a new binding.

    6 min to read · 20 min to practise

  11. Numbers and arithmetic

    Check calculations and the limits of numeric types.

    5 min to read · 20 min to practise

  12. Boolean values

    Lesson 11. Write and verify a rule for selecting tasks.

    4 min to read · 20 min to practise

  13. Branches and expressions

    Lesson 12. Choose a safe action and obtain a value from a block.

    6 min to read · 20 min to practise

  14. Repeating actions

    Lesson 13. Repeat work without missing boundaries or running forever.

    5 min to read · 20 min to practise

  15. Functions

    Lesson 14. Separate calculation from display and explain how values are passed.

    5 min to read · 20 min to practise

  16. Arrays

    Lesson 15. Process a fixed set of durations and check its boundaries.

    6 min to read · 20 min to practise

  17. Your first automated test

    Lesson 16. Make a calculation check itself against an expected result.

    4 min to read · 20 min to practise

  18. Practice: a small summary

    Lesson 17. Build and test a task summary independently using familiar syntax.

    3 min to read · 20 min to practise

  19. Values and memory

    Lesson 18. Distinguish a value, its owner, and the storage it may use.

    5 min to read · 20 min to practise

  20. Ownership and moves

    Lesson 19. Explain why an old name becomes unavailable after passing a String value.

    4 min to read · 20 min to practise

  21. Borrowing for reading

    Lesson 20. Let a function read a string while its owner keeps using it.

    4 min to read · 20 min to practise

  22. Mutable borrowing

    Lesson 21. Change a string through a function and explain when other access becomes available again.

    4 min to read · 20 min to practise

  23. String and &str: storing and reading

    Lesson 22. Choose an owned string for storage and a text view for reading.

    4 min to read · 20 min to practise

  24. Slices: part of data without a copy

    Lesson 23. Pass part of a numeric collection to a function without building another array.

    4 min to read · 20 min to practise

  25. A growable list: Vec

    Lesson 24. Add and remove task titles without fixing the number of slots in advance.

    4 min to read · 20 min to practise

  26. Text, UTF-8, and visible letters

    Lesson 25. Distinguish bytes, `char` values, and visible letters in a task title.

    5 min to read · 20 min to practise

  27. Tuples: two results from one function

    Lesson 26. Return a task title and its duration together without mixing up the values.

    5 min to read · 20 min to practise

  28. The Task struct: data with useful names

    Lesson 27. Put a task's title, duration and completion state into one type of your own.

    5 min to read · 20 min to practise

  29. Methods: actions beside Task

    Lesson 28. Create a task, read its state and finish it through methods.

    5 min to read · 20 min to practise

  30. Enums: one valid task state at a time

    Lesson 29. Represent a task's state with one named variant that may carry extra data.

    4 min to read · 20 min to practise

  31. match: handle every variant

    Lesson 30. Read a task state fully and catch a missing case before running the program.

    5 min to read · 20 min to practise

  32. Option: when a record might be absent

    Lesson 31. Look up a title by position without crashing when that position does not exist.

    4 min to read · 20 min to practise

  33. Result: explain a failed operation

    Lesson 32. Turn text into a number of minutes and explain invalid input without stopping the program.

    4 min to read · 20 min to practise

  34. The question mark: return an error to the caller

    Lesson 33. Parse minutes first, then check their meaning and return a useful error.

    4 min to read · 20 min to practise

  35. 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.

    4 min to read · 20 min to practise

  36. Launch arguments: a command and a title with spaces

    Lesson 35. Give the organizer an action and title when starting it from the terminal.

    5 min to read · 20 min to practise

  37. A command as a checked intention

    Lesson 36. Separate parsing launch words from acting on the organizer and explain each error.

    4 min to read · 20 min to practise

  38. Tasks in memory: add, rename, complete, remove

    Lesson 37. Carry out four task actions and see how removal shifts list positions.

    5 min to read · 20 min to practise

  39. Task IDs: numbers that do not shift

    Lesson 38. Give each task a stable ID and never reuse it after removal.

    6 min to read · 20 min to practise

  40. Scenarios: test a sequence of actions

    Lesson 39. Check consequences of several actions and errors that must leave data unchanged.

    5 min to read · 20 min to practise

  41. Checkpoint: an organizer in memory

    Lesson 40. Run an interactive organizer, perform several commands in one session, and handle invalid input.

    10 min to read · 20 min to practise

  42. Iterators: read, change, or transfer ownership

    Lesson 41. Choose how to visit tasks without losing access to them too early.

    4 min to read · 20 min to practise

  43. Closures: select the tasks you need

    Lesson 42. Search task titles and show matches in a stable order.

    4 min to read · 20 min to practise

  44. Map and set: count task tags

    Lesson 43. Build tag statistics without relying on storage order.

    4 min to read · 20 min to practise

  45. Modules: separate logic from startup

    Lesson 44. Split code into files and expose only the names callers need.

    4 min to read · 20 min to practise

  46. A generic type: one function for different lists

    Lesson 45. Read and write a function that works with different element types.

    4 min to read · 20 min to practise

  47. Traits: a shared behavior contract

    Lesson 46. Give two types a shared behavior and constrain a generic function.

    3 min to read · 20 min to practise

  48. Lifetimes: how references relate

    Lesson 47. Tell when a returned reference may point into an input.

    3 min to read · 20 min to practise

  49. External libraries and dependencies

    Lesson 48. Add a justified library and inspect what the project includes.

    4 min to read · 20 min to practise

  50. Paths and the file system

    Lesson 49. Choose an understandable data file location across systems.

    3 min to read · 20 min to practise

  51. Reading and writing files

    Lesson 50. Write text, read it back, and explain an input/output failure.

    4 min to read · 20 min to practise

  52. JSON format

    Lesson 51. Turn tasks into JSON and validate them after reading.

    5 min to read · 20 min to practise

  53. Saving without losing data

    Lesson 52. Write new data through a neighbouring temporary file and retain the old file on failure.

    4 min to read · 20 min to practise

  54. Backup copy

    Lesson 53. Validate a backup and recover its data into a separate file.

    6 min to read · 20 min to practise

  55. Useful commands

    Lesson 54. Provide clear help and distinguish normal output from errors.

    3 min to read · 20 min to practise

  56. Settings and documentation

    Lesson 55. Explain data-path selection and write instructions another person can follow.

    4 min to read · 20 min to practise

  57. A complete test set for the task file

    Lesson 56. Test saved tasks, damaged data, repeated reading, and text in different languages.

    6 min to read · 20 min to practise

  58. Automatic checks on three systems

    Lesson 57. Run formatting, Clippy, and tests whenever code is sent.

    4 min to read · 20 min to practise

  59. Building and sharing the program

    Lesson 58. Build for your OS, show a version, and hand over a clear archive.

    5 min to read · 20 min to practise

  60. Independent extension: task priority

    Lesson 59. Add priority while still reading old JSON and rejecting invalid values.

    5 min to read · 20 min to practise

  61. Releasing the console organizer

    Lesson 60. Combine familiar parts into a program another person can run and verify.

    18 min to read · 20 min to practise