Practice Exercises
Comprehensive tutorials and examples for mastering Go programming
Section Progress
Fundamentals
Practice core Go language concepts and basic patterns
15 exercises1. Slice Operations Master
Practice essential slice manipulation patterns including deduplication, chunking, flattening, and filtering routines.
2. Map Explorer
Explore Go map fundamentals with merging, key extraction, inversion, and filtering helpers.
3. String Builder
Build efficient string utilities covering Unicode-safe reversal, camel casing, and practical text analysis tools.
4. File Reader
Implement file reading helpers for line processing, statistics, and simple search operations.
5. JSON Handler
Manage JSON-encoded user data with struct tags, persistence, and flexible query helpers.
6. Time Calculator
Work with time calculations, business day helpers, and flexible date parsing utilities.
7. Map Concurrency
Build thread-safe map abstractions using mutexes, sync.Map, and race-free access patterns.
8. Simple HTTP Client
Build a small HTTP client wrapper that handles common verbs, JSON payloads, headers, and timeouts.
9. Channel Basics
Explore fundamental channel patterns including generators, pipelines, fan-out, fan-in, and timeout handling.
10. Interface Primer
Use Go interfaces to model polymorphic shapes, type assertions, and composed behaviors.
11. Control Flow Mastery
Master Go's control flow structures including loops, conditionals, and switch statements
12. Package Explorer
Master Go package organization, imports, and module management
13. Pointer Puzzles
Master Go pointers, memory addresses, and pointer operations
14. Method Sets
Master Go methods, receivers, and method sets for types
15. Type Assertions
Master Go interface type assertions and type switches
Intermediate
Build real-world patterns and production-ready code
28 exercises16. Message Queue
Implement an in-memory message queue supporting topics, consumer groups, retries, and dead-letter routing.
17. SQL Query Builder
Build a fluent SQL query builder
18. Context Manager
Master context cancellation utilities with retries, deadlines, timeouts, and coordinated parallel work.
19. Custom HTTP Server
Build an HTTP server framework featuring routers, middleware, logging, auth, CORS, and graceful shutdown.
20. Connection Pool
Implement a reusable connection pool with health checks, timeouts, and concurrency-safe acquisition.
21. Rate Limiter
Create flexible token-bucket and sliding-window rate limiters with per-key quotas and backoff support.
22. WebSocket Handler
Build real-time WebSocket servers and clients for bidirectional communication
23. Service Discovery Patterns
Apply service discovery patterns using the distributed systems implementations from the core tutorial.
24. TCP Connection Manager
Implement connection pooling for TCP clients
25. Finite State Machine
Implement a configurable state machine
26. Pub/Sub Message Broker
Build an in-memory pub/sub system
27. Reflection Toolkit
Master Go's reflect package for runtime type inspection and manipulation
28. Metrics Collector
Collect counters, gauges, and histograms with labeling, aggregation, and Prometheus-style export.
29. Concurrent Web Crawler
Build a concurrent web crawler with goroutines and channels
30. Generic Collections
Master Go generics to build type-safe, reusable data structures
31. Regular Expression Processor
Master Go's regexp package for pattern matching and text processing
32. Multi-Level Cache Hierarchy
Implement a hierarchical caching system with automatic promotion and TTL management
33. Cryptography Basics
Master Go's crypto package for encryption, hashing, and secure operations
34. Retry Mechanism with Exponential Backoff
Implement sophisticated retry logic with exponential backoff and jitter
35. Compression Utility
Master file compression and decompression with gzip, zlib, and tar
36. API Versioning Strategies
Implement comprehensive API versioning with backward compatibility
37. Database Migrations
Build a database migration system for schema versioning and management
38. Production-Ready Error Handling
Master advanced error handling patterns including structured errors, error contexts, retry mechanisms, and observability
39. Feature Flags System
Build a dynamic feature flag system with rules and targeting
40. Security Hardening for Go Applications
Implement comprehensive security measures including input validation, secrets management, rate limiting, and security headers
41. Template Engine
Master Go's text/template and html/template for dynamic content generation
42. Advanced Concurrency Patterns
Master advanced Go concurrency patterns including fan-in/fan-out, worker pools, pipelines, and cancellation
43. Generics in Practice
Master Go generics by building type-safe data structures, algorithms, and utilities for real-world applications
Advanced
Master complex systems and distributed architectures
29 exercises44. Distributed Lock
Implement a Redis-backed distributed lock with renewals, fencing tokens, and failure-safe release semantics.
45. Load Balancer
Build a production-ready reverse proxy supporting multiple load-balancing strategies and health checks.
46. Circuit Breaker Patterns
Apply circuit breaker patterns using the distributed systems implementations from the core tutorial.
47. Raft Consensus
Implement the core Raft consensus workflow with leader election, log replication, and snapshotting.
48. Memory Allocator
Create arena, pool, and slab allocators managing memory manually for high-performance workloads.
49. Compiler Plugin
Write a go/analysis static analyzer that reports common mistakes and offers automated fixes.
50. Code Generator
Generate boilerplate code from struct definitions using the Go AST, templates, and go generate.
51. Profiler Tool
Collect and analyze CPU, memory, goroutine, and mutex profiles with automated pprof integration.
52. Scheduler
Build a priority-aware scheduler that handles cron expressions, recurring tasks, and graceful shutdown.
53. Network Protocol
Design a binary network protocol with framing, versioning, connection pooling, and streaming support.
54. Service Mesh Implementation
Build a service mesh for microservice discovery, routing, and observability
55. Event Sourcing Implementation
Build an event sourcing system for maintaining application state through events
56. Saga Orchestrator
Implement distributed transaction patterns with saga orchestration
57. Chaos Testing Framework
Build a chaos engineering framework for testing system resilience
58. Assembly Optimizer
Optimize critical code paths using Go assembly for maximum performance
59. Performance Optimization Lab
Master Go performance optimization using profiling tools, memory management, and concurrency patterns to eliminate bottlenecks
60. Cloud-Native Microservices Architecture
Build production-ready cloud-native microservices with Kubernetes, Docker, service discovery, and observability
61. Advanced Testing Strategies
Master comprehensive testing including integration tests, contract testing, load testing, and chaos engineering for Go applications
62. DevOps Toolchain with Go
Build a complete DevOps toolchain including CI/CD pipelines, monitoring, logging, and infrastructure automation using Go
63. Byzantine Fault Tolerance Consensus Algorithm
Implement a Byzantine fault tolerant consensus algorithm for distributed systems
64. Vector Clock for Distributed Causality
Implement vector clocks to track causality and detect conflicts in distributed systems
65. Bloom Filter Probabilistic Data Structure
Implement a space-efficient Bloom filter for membership testing with tunable false positive rate
66. Merkle Tree Cryptographic Verification
Implement a Merkle tree for efficient data verification and integrity checking
67. Peer-to-Peer Networking Implementation
Build a complete peer-to-peer network with discovery, messaging, and consensus
68. Just-In-Time Compiler
Build a JIT compiler that translates bytecode to native machine code with runtime optimizations.
69. Custom Garbage Collector
Implement mark-sweep and generational garbage collectors with heap management and performance metrics.
70. Lock-Free Concurrent Structures
Implement lock-free queues, stacks, and hash tables using atomic operations and CAS algorithms.
71. Memory-Mapped I/O
Use mmap for high-performance storage, shared memory, and memory-backed data structures.
72. Linux Kernel Module
Develop a Linux kernel module and Go userspace client with syscalls, ioctls, and device drivers.