Learning Resources

Programming Exercises

Practice with real problems and instant feedback.

5 / 6

intermediatepython

Python Collections Counter

Use Python collections.Counter for efficient frequency counting, most common elements, and arithmetic operations.

intermediatepython

Custom Context Manager

Implement a custom context manager using __enter__ and __exit__ for resource management.

advancedpython

Python Coroutine Pipeline

Build a data processing pipeline using Python coroutines with send() for streaming data transformation.

intermediatepython

Dataclass with Validation

Use Python dataclasses with __post_init__ for automatic field validation and default factories.

intermediatepython

Python Datetime Arithmetic

Use Python datetime module to perform date arithmetic, calculate differences, and handle timezone-aware operations.

intermediatepython

Decorator with LRU Cache

Combine custom decorators with functools.lru_cache for memoized function calls.

intermediatepython

Python Decorator Pattern

Implement a Python decorator that measures and logs function execution time using functools.wraps for metadata preservation.

advancedpython

Python Descriptor Protocol

Implement a Python descriptor using __get__ and __set__ to create a validated attribute that enforces type constraints.

basicpython

Dictionary Merge and Update

Merge dictionaries using Python 3.9+ merge operator and update method with conflict resolution.

basicpython

Python Dictionary Operations

Perform common dictionary operations including merging, filtering, and transforming values in Python.

advancedpython

Python LCS Dynamic Programming

Implement the longest common subsequence algorithm using dynamic programming with a 2D table.

basicpython

Python Exception Handling

Use Python try-except-else-finally blocks to handle different exception types and ensure cleanup code runs.

basicpython

Python File Reading

Read a text file line by line in Python, processing each line and handling file not found errors gracefully.

basicpython

Python Default Arguments

Use Python default parameter values and keyword arguments to create flexible and configurable functions.

intermediatepython

Python Generator Functions

Use Python generator functions with yield to create memory-efficient lazy sequences for large data processing.

intermediatepython

Generator Functions with Yield

Create generator functions using yield for memory-efficient lazy evaluation of large sequences.

advancedpython

Python Dijkstra Shortest Path

Implement Dijkstra algorithm for finding shortest paths in a weighted graph using a priority queue.

intermediatepython

Python Itertools Chains

Use Python itertools module to chain, slice, and group iterables for efficient lazy data processing.

basicpython

List Comprehension Patterns

Use Python list comprehensions with conditions and nested loops for concise data transformation.

basicpython

Python Loop Patterns

Use Python enumerate, zip, and range patterns for common iteration tasks with proper unpacking.

intermediatepython

Memoized Fibonacci

Implement memoized Fibonacci using functools.lru_cache for O(n) time complexity instead of exponential.

advancedpython

Python Metaclass Basics

Implement a custom metaclass that automatically adds validation methods to classes based on their field definitions.

intermediatepython

Python NamedTuple Usage

Use Python namedtuple for creating lightweight immutable record types with named field access.

advancedpython

Python Recursive Descent Parser

Implement a recursive descent parser for simple arithmetic expressions with operator precedence and parentheses.

basicpython

Regex Named Groups

Use Python regex named groups for extracting structured data from text patterns.

intermediatepython

Python Regex Substitution

Use Python re module for pattern matching and substitution with capture groups and replacement functions.

basicpython

Python Set Operations

Use Python set operations (union, intersection, difference) to compare and manipulate collections of unique elements.

intermediatepython

Python Sorted with Key Function

Use Python sorted() with custom key functions for multi-criteria sorting and complex comparison logic.

basicpython

SQL Parameterized Queries

Use parameterized queries with sqlite3 to prevent SQL injection and safely pass user input.

basicpython

Python String Formatting

Use Python f-strings and format methods to create formatted output with variables, alignment, and number precision.

basicpython

Python String Methods

Use Python string methods (split, join, strip, replace, find) for common text processing tasks.

basicpython

Python Tuple Unpacking

Use Python tuple unpacking and the star expression to extract values from tuples of varying structures.

intermediatepython

TypedDict for Structured Dicts

Use TypedDict to create type-checked dictionary structures with mypy static analysis.

advancedrust

Rust Async/Await

Use Rust async/await with tokio runtime for concurrent asynchronous operations and task spawning.

intermediaterust

Closures and Capture

Use Rust closures with move semantics and Fn, FnMut, FnOnce traits for captured variables.

intermediaterust

Rust Closures and Capture

Use Rust closures with different capture modes (by reference, by mutable reference, by value) and the move keyword.

basicrust

HashMap Operations

Use Rust HashMap for key-value storage with insertion, lookup, and iteration patterns.

advancedrust

Thread Spawning with Channels

Use std::thread and mpsc channels for safe message passing between Rust threads.

intermediaterust

Result Type Error Handling

Use Rust Result type for explicit error handling without exceptions using match and ? operator.

advancedrust

Rust Generic Traits

Define and implement generic traits in Rust with associated types and generic methods.

intermediaterust

Rust Iterator Adapters

Chain Rust iterator adapters like map, filter, enumerate, and collect for functional data transformation.

basicrust

Iterator Map and Filter

Use Rust iterator adaptors map, filter, and collect for functional data transformation.

intermediaterust

Rust Lifetime Annotations

Use Rust lifetime annotations to express relationships between references in function signatures.

advancedrust

Explicit Lifetime Annotations

Use explicit lifetime annotations to tell the borrow checker about reference relationships.

advancedrust

Rust Declarative Macros

Write Rust declarative macros with macro_rules! for code generation and pattern-based syntax extension.

basicrust

Ownership and Move Semantics

Demonstrate Rust ownership rules with move semantics and borrowing to prevent data races.

basicrust

Rust Ownership Transfer

Learn Rust ownership rules by transferring ownership between functions and using references to borrow values.

basicrust

Pattern Matching with Enums

Use Rust pattern matching on enums with exhaustive match arms and guard clauses.

intermediaterust

Rust Pattern Matching

Use Rust match expressions with destructuring, guards, and binding for comprehensive pattern matching.

intermediaterust

Smart Pointers Box and Rc

Use Box for heap allocation and Rc for reference counting in Rust programs.

basicrust

Rust String Slices

Use Rust string slices (&str) for efficient substring access without copying string data.

basicrust

Rust Struct Basics

Define Rust structs with fields, implement methods, and use derive macros for common traits.

intermediaterust

Rust Trait Bounds

Use Rust trait bounds on generic functions to constrain type parameters to types implementing specific traits.

intermediaterust

Traits with Generic Bounds

Define and implement traits with generic type bounds for polymorphic behavior in Rust.

advancedrust

Rust Unsafe and FFI

Use Rust unsafe blocks for raw pointer dereferencing and FFI to call C functions safely.

basicrust

Rust Vector Iteration

Iterate over Rust vectors using various patterns: by value, by reference, and with iterator adaptors.

intermediatesql

SQL CASE Expressions

Use SQL CASE expressions for conditional logic and value transformation within queries.

advancedsql

Recursive CTE for Hierarchy

Use recursive common table expressions to traverse hierarchical data like org charts.

intermediatesql

SQL Common Table Expressions

Use SQL CTEs (WITH clause) for readable query decomposition and reusable intermediate result sets.

basicsql

Date Truncation for Grouping

Use date_trunc and extract functions to group time series data by various time periods.

intermediatesql

EXISTS vs IN Subqueries

Compare EXISTS and IN subquery performance and use appropriate pattern for each case.

basicsql

SQL GROUP BY with Aggregates

Use SQL GROUP BY with aggregate functions like COUNT, SUM, AVG, MIN, and MAX for data summarization.

intermediatesql

SQL HAVING Clause

Use SQL HAVING clause to filter groups after aggregation, complementing WHERE for pre-aggregation filtering.

basicsql

SQL INSERT and UPDATE

Use SQL INSERT to add rows and UPDATE to modify existing rows with WHERE conditions.

basicsql

Join with Aggregation

Combine table joins with GROUP BY aggregation for reporting queries with multiple tables.

basicsql

SQL INNER JOIN

Use SQL INNER JOIN to combine rows from two tables based on a related column between them.

advancedsql

JSON Data Querying

Query and extract data from JSON columns using PostgreSQL JSON operators and functions.

basicsql

NULL Handling with COALESCE

Use COALESCE, NULLIF, and IS NULL for robust NULL value handling in SQL queries.

basicsql

SQL ORDER BY and LIMIT

Use SQL ORDER BY for sorting and LIMIT/OFFSET for pagination to control result set size and order.

intermediatesql

Pivot Data with CASE

Transform rows to columns using CASE expressions for pivot-style data reshaping in SQL.

advancedsql

SQL Recursive CTE

Use SQL recursive CTEs to traverse hierarchical data like org charts, trees, and graph structures.

basicsql

SQL SELECT with WHERE

Write SQL SELECT queries with WHERE clauses to filter rows by various conditions and comparison operators.

intermediatesql

SQL Subqueries

Use SQL subqueries in WHERE, FROM, and SELECT clauses for nested data retrieval and filtering.

intermediatesql

SQL UNION and UNION ALL

Use SQL UNION and UNION ALL to combine result sets from multiple queries into a single result.

intermediatesql

UPSERT with ON CONFLICT

Use INSERT ON CONFLICT for atomic upsert operations in PostgreSQL with comprehensive examples and best practices for production use.

intermediatesql

SQL Window Functions

Use SQL window functions like ROW_NUMBER, RANK, and LAG for analytics without collapsing rows.

intermediatesql

Window Function Ranking

Use SQL window functions with RANK, DENSE_RANK, and ROW_NUMBER for analytical queries.

intermediatesql

Running Total with Window

Calculate running totals and moving averages using SQL window functions with frame clauses.

basictypescript

Typed Array Map Operation

Use the Array.map method with proper TypeScript generics to transform an array of numbers into an array of strings.

intermediatetypescript

Async/Await Error Handling

Write an async function with proper TypeScript error handling using try-catch and typed error responses.

advancedtypescript

Async Iterable Class

Implement an async iterable class using Symbol.asyncIterator for streaming data processing.

basictypescript

TypeScript Basic Type Annotations

Practice declaring variables with explicit TypeScript type annotations for numbers, strings, and booleans.

advancedtypescript

Branded Types for Nominal Typing

Implement branded types to achieve nominal typing in TypeScript structural type system for safer domain types.

intermediatetypescript

Type-Safe Builder Pattern

Implement a type-safe builder pattern using method chaining with TypeScript return types.

advancedtypescript

Conditional Types

Use conditional types to create type-level logic that selects types based on conditions.

advancedtypescript

Generic Curried Function Types

Create a fully typed curry function with TypeScript generics that preserves parameter types through partial application.

intermediatetypescript

Method Decorator Logging

Implement a method decorator that logs function calls with arguments and return values for debugging purposes.

advancedtypescript

Method Decorators

Implement method decorators for logging, timing, and access control in TypeScript classes.

intermediatetypescript

Discriminated Union Patterns

Use discriminated unions to model different action types with exhaustive switch handling in a reducer pattern.

advancedtypescript

Distributive Conditional Types

Explore distributive conditional types that distribute over union types for type-level computations.

basictypescript

Enum Iteration and Reverse Mapping

Iterate over TypeScript enum values and handle reverse mapping for numeric enums.

basictypescript

Enum Type Usage

Define and use a TypeScript enum to represent order status values with a function to check if an order is complete.

basictypescript

Function Overload Signatures

Use TypeScript function overload signatures to provide different return types based on input parameter types.

intermediatetypescript

Generic Stack Class

Implement a type-safe generic stack class in TypeScript with push, pop, and peek methods.

intermediatetypescript

Generic Type Inference

Write a generic identity function and a generic pair factory, demonstrating TypeScript automatic type inference.

advancedtypescript

Type Inference in Conditional Types

Use the infer keyword in conditional types to extract and manipulate types from complex generic structures.

basictypescript

Interface Definition Basics

Define a TypeScript interface for a User object with required and optional properties, then create a function to display user info.

intermediatetypescript

Iterator Protocol Implementation

Implement a custom iterator using the Symbol.iterator protocol for a range class that yields numbers.

advancedtypescript

Mapped Types

Create mapped types that transform existing type properties into new type structures.

advancedtypescript

Phantom Types for Safety

Use phantom types to create type-level tags that distinguish values at compile time without runtime overhead.