Site

Tutorial Index — Code Workshop

Introduction to available tutorials by language

About These Tutorials

Tutorials are short, focused examples with explanations. Each covers one topic and includes compilable code. They supplement the language Stories and Bites found in the main site tracks.

Rust

Twenty-one tutorials covering Rust from first program through standard library, concurrency, and test organization.

Foundations

#TutorialTopic
1HelloYour first Rust program and the Cargo toolchain
2ToolsRust development toolchain setup
3VariablesBindings, mutability, shadowing, and types
4FunctionsDefinitions, parameters, and return values
5Control Flowif, loop, while, and for
6OwnershipMove semantics and memory safety
7StructsData grouping and methods
8EnumsAlgebraic types and pattern matching
9IteratorsThe iterator pattern and adaptor chains
10TestingUnit and integration tests

Standard Library

#TutorialTopic
S1StringsString and &str — ownership and slices
S2Vec<T>Growable arrays and iteration
S3HashMap<K,V>Hash maps and entry API
S4Result<T,E>Error handling and propagation
S5File I/OReading and writing files
S6TraitsShared behavior and polymorphism
S7ClosuresAnonymous functions and capture
S8Smart PointersBox, Rc, and RefCell
S9ThreadsConcurrency and message passing
S10FormattingDisplay, Debug, and format strings

Demonstrations

DemonstrationsUsing the examples/ folder in a Cargo workspace

C++

Twenty-two tutorials covering C++ from first program through standard library, concurrency, and text formatting.

Foundations

#TutorialTopic
1HelloYour first C++ program and build commands
2Toolsg++, clang++, MSVC, and CMake
3VariablesTypes, initialization, const, constexpr, auto
4FunctionsDefinitions, overloading, and parameter passing
5Control Flowif, switch, while, for, range-for
6ClassesData grouping, constructors, RAII, destructors
7RelationshipsInheritance, composition, aggregation, using
8EnumsPlain enum and scoped enum class
9MemoryStack, heap, pointers, references, RAII
10TemplatesGeneric programming and type constraints
11TestingUnit testing without a framework

Standard Library

#TutorialTopic
S1Stringsstd::string and string_view
S2Vectorstd::vector — growable arrays
S3Mapstd::unordered_map and std::map
S4Exceptionstry, catch, throw, and exception hierarchy
S5File I/Ofstream — reading and writing files
S6AlgorithmsSTL algorithms and the iterator range model
S7LambdasAnonymous functions and capture modes
S8Smart Pointersunique_ptr, shared_ptr, and weak_ptr
S9Threadsstd::thread, mutex, and lock_guard
S10Formattingstd::format and ostream manipulators

Demonstrations

DemonstrationsBuilding demo executables with CMake using a shared static library

C#

Twenty-one tutorials covering C# from first program through standard library, LINQ, async/await, and records.

Foundations

#TutorialTopic
1HelloYour first C# program and the dotnet toolchain
2Toolsdotnet CLI, project files, and IDE setup
3VariablesTypes, var, const, nullable, and type inference
4FunctionsMethods, overloading, optional parameters, and local functions
5Control Flowif, switch, while, for, and foreach
6ClassesFields, properties, constructors, and inheritance
7InterfacesContracts, multiple interface implementation, and BCL interfaces
8EnumsEnum values, [Flags], and switch expressions
9GenericsGeneric methods, classes, and type constraints
10TestingxUnit, [Fact], [Theory], and Assert

Standard Library

#TutorialTopic
S1StringsString immutability, interpolation, and StringBuilder
S2List<T>Growable lists, LINQ preview, and slicing
S3Dictionary<K,V>Hash maps, TryGetValue, and concurrent access
S4Exceptionstry/catch/finally, custom exceptions, and filters
S5File I/OFile, StreamReader, Path, and binary I/O
S6LINQWhere, Select, GroupBy, and deferred execution
S7DelegatesAction, Func, lambda expressions, and closures
S8AsyncTask, async/await, WhenAll, and CancellationToken
S9FormattingInterpolation, format specifiers, and IFormattable
S10RecordsRecord types, with-expressions, and init-only properties

Demonstrations

DemonstrationsBuilding demo projects in a dotnet solution referencing a shared class library

Python

Twenty-one tutorials covering Python from first program through standard library, itertools, threading, and dataclasses.

Foundations

#TutorialTopic
1HelloYour first Python program and running scripts
2ToolsPython installation, venv, and pip
3VariablesDynamic typing, type hints, and built-in types
4Functionsdef, default arguments, *args, **kwargs, and type hints
5Control Flowif, while, for, comprehensions, and match
6Classesclass, __init__, self, inheritance, and dunder methods
7ModulesModules, packages, __init__.py, and the stdlib
8EnumsEnum, IntEnum, Flag, and the match statement
9Testingpytest, fixtures, parametrize, and assertions
10ComprehensionsList, dict, set comprehensions, and generator expressions

Standard Library

#TutorialTopic
S1StringsImmutability, slicing, methods, and f-strings
S2ListsIndexing, slicing, sort, and copy semantics
S3Dictsdict, get(), defaultdict, and Counter
S4Exceptionstry/except/finally, raise, and context managers
S5File I/Oopen(), pathlib.Path, and directory operations
S6IteratorsIterator protocol, generators, and itertools
S7ClosuresFirst-class functions, closures, and decorators
S8Threadsthreading, Lock, Queue, and the GIL
S9Formattingf-strings, format spec mini-language, and Decimal
S10Dataclasses@dataclass, field(), frozen, and slots

Demonstrations

DemonstrationsRunning demo scripts from a package using python -m

AI / LLMs

Twenty-one tutorials covering how to build console and web applications that use large language models. Examples use the Anthropic Python SDK and Flask.

Foundations

#TutorialTopic
1HelloYour first LLM API call and reading the response
2ToolsSDK setup, virtual environments, and API key management
3MessagesThe messages list, roles, and multi-turn conversations
4TokensTokens, context windows, and request cost
5PromptingEffective prompts for code generation and explanation
6System PromptsControlling model behavior with system instructions
7StreamingReal-time token streaming with the stream context manager
8ModelsHaiku, Sonnet, and Opus - choosing by task and cost
9ErrorsAPI error types, retry logic, and exponential backoff
10TestingStructural and semantic evaluation of AI-generated code

Applications

#TutorialTopic
A1Chat LoopInteractive console chat with persistent conversation history
A2Code ExplainerCLI tool that reads a file and streams an explanation
A3Code ReviewAutomated code review across bug, security, and style categories
A4Test GeneratorGenerate and run pytest tests for a Python module
A5Diff ReviewerUnified diff analysis and risk assessment for code changes
A6Web ChatFlask + JavaScript browser chat with server-side history
A7Web Code ReviewStateless web form that submits code and returns a review
A8Web StreamingServer-Sent Events for real-time token streaming in the browser
A9Tool UseFunction calling - letting the model invoke Python functions
A10Simple AgentAgent loop with read_file and list_files tools

Demonstrations

DemonstrationsA complete code-helper CLI combining explanation, review, and test generation