Showing all go-programming posts
This article was originally published in 2018, yet its core insights into Go’s garbage collection model remain highly relevant for developers today. While some implementation details of Go’s runtime have evolved, the foundational concepts explored here—such as the semantics of the tri-color mark and sweep algorithm, Stop The World (STW) events, and GC trace interpretation—are still essential to understanding how Go manages memory. Whether you’re optimizing performance or deepening your knowledge of Go internals, this post continues to offer a clear and practical guide to working with the garbage collector, not against it.
Continue readingAlthough originally written in 2018, the following concepts remain essential for developers working with concurrency. This blogpost focuses on concurrency, distinguishing it from parallelism by defining it as “out of order” execution. It emphasizes the importance of understanding workload types—CPU bound (e.g., summing, sorting) and IO bound (e.g., file reading)—to assess when concurrency is appropriate. Through practical examples and benchmarks, it shows that parallelism boosts performance for CPU bound tasks, while concurrency alone benefits IO bound workloads.
Continue readingThis blogpost is the second installment in a three-part series exploring the mechanics and semantics of the Go scheduler. Despite being published in 2018, the content remains relevant today, as the Go scheduler’s design continues to influence the development of efficient and scalable concurrent systems. In this post, we will go into the inner workings of the Go scheduler, discussing its components, such as the Global Run Queue (GRQ) and Local Run Queue (LRQ), and its behavior, including context switching, work stealing, and the handling of synchronous and asynchronous system calls.
Continue readingAlthough this blogpost was originally published in 2018, the concepts and principles discussed remain crucial for building efficient and performant multithreaded applications in Go now in 2025 (Go 1.24.0). As the Go ecosystem continues to evolve, understanding how the Go scheduler interacts with the operating system scheduler is more important than ever. This three-part series provides a comprehensive overview of the mechanics and semantics behind Go’s scheduling, starting with the fundamentals of the operating system scheduler.
Continue readingAlthough first introduced in 2014, the Context package remains a crucial component of Go programming, enabling efficient management of request-scoped data, deadlines, and cancellation signals. As the Go ecosystem continues to evolve, understanding the Context package’s semantics is vital for developing reliable and maintainable software. This blogpost provides an in-depth exploration of the Context package’s semantics, highlighting best practices and common pitfalls to help developers effectively leverage this powerful tool.
Continue reading
Ardan Labs
From the Ardan Community
Introduction: Welcome to the final episode of our Intro to Generative AI series! In this episode, Daniel Whitenack takes the concepts you’ve been learning and shows you how to apply advanced techniques like message chaining and factuality scoring to make your AI-driven systems smarter and more reliable. This session will help you understand how to create workflows that combine multiple models, ensuring your AI can provide accurate, context-aware responses and make decisions grounded in real data.
Continue reading
Ardan Labs
From the Ardan Community
Introduction: In Episode 6 of the Intro to Generative A.I. series, Daniel shifts the focus from basic search techniques to more dynamic, on-the-fly AI applications. He demonstrates how to enhance AI-driven interactions by integrating real-time data retrieval and multi-turn conversations, pushing beyond static data sources to create more responsive and context-aware systems.
Implementing real-time parsing and AI search of live websites. Enhancing chatbots with the ability to handle and respond to ongoing conversations.
Continue reading
Ardan Labs
From the Ardan Community
Introduction: Welcome to Episode 5 of our Intro to Generative AI series! In this episode, Daniel explores practical techniques for enhancing AI models’ ability to handle large volumes of text data effectively. He addresses the challenges developers face when working with extensive content, such as entire web pages or internal documents, and provides actionable strategies to optimize the retrieval and processing of relevant information.
Context Handling: Splitting large text into manageable chunks while preserving context.
Continue reading
Ardan Labs
From the Ardan Community
Introduction: Welcome to Episode 4 of our Intro to Generative AI series! In this episode, Daniel dives into the essential technique of prompt engineering, focusing on creating dynamic and interactive prompts to enhance the capabilities of AI models.
Prompt Templating: Techniques for creating and using dynamic prompt templates to enhance AI interactions. Context Management: Strategies for integrating and switching between multiple contexts in AI applications. Interactive Systems: Building AI systems that respond to user inputs in real-time, using terminal input loops and command-line arguments.
Continue reading
Ardan Labs
From the Ardan Community
Introduction: Welcome to Episode 12 of our Ultimate Software Design series! In this final installment, Bill guides us through the advanced implementation of transaction management in Go, ensuring robust and consistent data operations within applications. By focusing on middleware integration, Bill provides a comprehensive strategy for handling database transactions, committing successful operations, and rolling back when errors occur.
Learn to configure and log transaction middleware for tracking commits and rollbacks.’
Continue reading