Selection Sort in Rust: A Comprehensive GuideSorting algorithms are essential for understanding computer science and solving numerous practical problems. Among them, Selection Sort stands out as a straightforward algorithm, often used for educational purposes due to its simplicity. In this arti...Dec 11, 2024 · 4 min readblog.gabrielrufino.com
Understanding the Default Trait in RustIn Rust, the Default trait is a widely used standard library trait that provides a way to create default values for types. This can be incredibly useful for initializing structs, enums, and other data types when explicit values are not provided. In t...Dec 4, 2024 · 4 min readblog.gabrielrufino.com
Implementing a Stack in Rust: A Simple and Versatile Data StructureIn this article, we will walk through the implementation of a basic stack data structure in Rust, leveraging generics to make it versatile for various types. The stack follows a "Last In, First Out" (LIFO) principle, meaning the last added element is...Oct 13, 2024 · 4 min readblog.gabrielrufino.com
You don't need the package `uuid` anymoreIn the world of Node.js development, UUIDs (Universally Unique Identifiers) have been a staple for creating unique identifiers. Traditionally, developers have relied on external packages like uuid to generate these identifiers. However, with the adve...Jul 26, 2024 · 3 min readblog.gabrielrufino.com
Converting class instances to primitivesSometimes it happens to convert objects/instances to primitives, intentionally or not. Let's suppose this class: class ProductEntity { constructor({ name, quantity, price }) { this.name = name this.quantity = quantity this.price = price...May 15, 2022 · 2 min readblog.gabrielrufino.com