May 3, 2024Ardan Labs
From the Ardan Community
Introduction: Delving into the intricate realm of type coercion, Herbert’s insights offer invaluable guidance for Rust developers grappling with the complexities of data type conversions:
Gain insights into the nuances of type coercion, a fundamental aspect of programming languages, and its potential pitfalls, drawing parallels with numerical computation surprises.
Explore how Go and Rust tackle inadvertent type coercion, prioritizing program integrity by making it challenging to assign values between incompatible types.
Continue reading April 29, 2024Ardan Labs
From the Ardan Community
Introduction: Delving into the critical issues of overflow and underflow, Herbert’s insights offer valuable takeaways for Rust developers:
Rust’s static analysis capabilities enable early detection and prevention of overflow and underflow errors, allowing developers to address potential issues before they manifest in runtime environments.
Through Rust’s emphasis on safety and correctness, developers can leverage built-in mechanisms to handle overflow and underflow situations gracefully, reducing the likelihood of software crashes and unexpected behavior.
Continue reading April 22, 2024Ardan Labs
From the Ardan Community
Introduction: Exploring the critical issues of “use after free” and “use after move,” Herbert’s insights offer a valuable understanding to Rust developers:
Rust’s ownership system acts as a powerful safeguard against memory safety issues like “use after free” and “use after move,” ensuring code correctness at compile time.
By understanding the risks associated with these memory management pitfalls, Rust developers gain deeper insights into crafting more secure and reliable software, leveraging Rust’s robust memory handling mechanisms.
Continue reading April 15, 2024Ardan Labs
From the Ardan Community
Introduction: Rust’s memory safety features are advantageous to Rust developers because they:
Ensure robust protection against buffer overflows and underflows, enhancing the reliability and security of software.
Empower developers to manage type coercion effectively, promoting code reliability and safety while facilitating safe type conversions.
Provide confidence in writing concurrent code by enforcing strict mutability rules and synchronization, thereby preventing data race issues and ensuring code correctness and efficiency.
With these memory safety features deeply integrated into Rust’s design, developers can build more reliable, secure, and efficient software, spanning various aspects of memory management, type handling, and concurrent programming paradigms.
Continue reading Introduction In my previous post, I discussed the current state of looping in Go. In this post, we’re going to look into a future feature for the Go programming language called range-over function experiment. Go lacks a standard iterator protocol and this is an attempt to provide one. We’ll discuss the motivation for adding this new feature and see some examples on how to use it.
NOTE: In order to run the code, you need to set the GOEXPERIMENT environment variable to rangefunc (e.
Continue readingIntroduction Looping seems like a basic topic: Write a for loop with a termination condition, and you’re done. However there’s a lot of ways you can write a for loop in Go. Knowing more about the different versions of for will help you choose the best option to accomplish your tasks and it will help you prevent some bugs.
Some Assembly Required What kind of code is generated by the compiler for a for loop?
Continue readingIntroduction After writing the Kubernetes (K8s) CPU Limits post, I was wondering what happens when a K8s memory limit is set for the same service. I’ve been hearing at workshops and at Ardan how people are experiencing Out Of Memory (OOM) problems with their PODs when setting K8s memory limits. I’m often told that when an OOM occurs, K8s will terminate and restart the POD.
I wanted to experience an OOM, but I was also curious about three other things.
Continue readingIntroduction I was working on a Go service that was going to be deployed into a managed Kubernetes (K8s) environment on GCP. One day I wanted to look at the logs in the staging environment and got access to the ArgoCD platform. In the process of trying to find the logs, I stumbled upon the YAML that described the deployment configuration for my service. I was shocked to see that the CPU limit was set to 250m.
Continue readingI have always appreciated the Go Team investing time on providing the community with the Go Tour. This website is designed to help developers get started in learning the Go programming language. The nice part of the website is that it provides an interactive environment where one can read, write, and run Go examples.
Since the first time I’ve navigated this tour, I’ve had a few problems. First, this tour is not comprehensive both in the number of examples and the content explaining the examples.
Continue readingIntroduction This year I set a personal goal of walking for a total of 1,000 kilometers and I’m proud to say I’m close to hitting that goal. I’ve been tracking all the different routes I take in an app named Strava. One nice feature of Strava is that the app provides access to the raw data in a format called GPX. Starva can visualize the route in their app, but I wanted to try and perform my own visualization.
Continue reading