---
title: "Muhammad Yafi Alhakim (@yafialhakim) | Hashnode"
description: "Frontend Engineer @MySkill.id. Read the latest articles by Muhammad Yafi Alhakim on Hashnode."
url: "https://hashnode.com/@yafialhakim"
---

@yafialhakim

# Muhammad Yafi Alhakim

@yafialhakim · Jakarta, Indonesia · Joined November 2023

Frontend Engineer @MySkill.id

[Website](https://yafialhakim.vercel.app/)

### [Traits: The "Contract" System](https://yafi.hashnode.dev/traits-the-contract-system?utm_source=hashnode&utm_medium=feed)

ABSTRACT: 🧩 Analogy for Frontend Developers A Trait in Rust is exactly like an interface in TypeScript. Think of a Trait as a Contract or a Job Description. It is a way to define shared behavior in an abstract way, forcing different types of data t...

4 min read · [yafi.hashnode.dev](https://yafi.hashnode.dev/traits-the-contract-system?utm_source=hashnode&utm_medium=feed)

[Apr 7](https://hashnode.com/posts/traits-the-contract-system/69d4e01da565305bb4c0aa8f)

### [Testing: The "Quality Contract"](https://yafi.hashnode.dev/testing-the-quality-contract?utm_source=hashnode&utm_medium=feed)

Coming from a background of Jest, Vitest, or Mocha, you'll find Rust's built-in testing suite incredibly refreshing. No extra dependencies are needed for basic unit testing! Think of Rust Testing as a Quality Contract. By writing tests, you are "Sign...

2 min read · [yafi.hashnode.dev](https://yafi.hashnode.dev/testing-the-quality-contract?utm_source=hashnode&utm_medium=feed)

[Apr 7](https://hashnode.com/posts/testing-the-quality-contract/69d4e0174650dac7a91de3bd)

### [Smart Pointers: The "Specialized Containers"](https://yafi.hashnode.dev/smart-pointers-the-specialized-containers?utm_source=hashnode&utm_medium=feed)

In JavaScript, most "pointing" is hidden. Every object or array is actually a reference (a pointer). In Rust, pointers are explicit, and Smart Pointers are like Wrappers with Superpowers. Think of a regular reference (&T) as a simple link, and a Smar...

2 min read · [yafi.hashnode.dev](https://yafi.hashnode.dev/smart-pointers-the-specialized-containers?utm_source=hashnode&utm_medium=feed)

[Apr 7](https://hashnode.com/posts/smart-pointers-the-specialized-containers/69d4e01314dc82f287dd9805)

### [Macros & Patterns: The "Metaprogramming Magic"](https://yafi.hashnode.dev/macros-patterns-the-metaprogramming-magic?utm_source=hashnode&utm_medium=feed)

If you've reached this part of Rust, you're looking at the tools that power the libraries you've been using (like vec!, println!, or serde). These are the Power User tools. Think of Macros as Code that Writes Code. Imagine if you could write a Babel ...

2 min read · [yafi.hashnode.dev](https://yafi.hashnode.dev/macros-patterns-the-metaprogramming-magic?utm_source=hashnode&utm_medium=feed)

[Apr 7](https://hashnode.com/posts/macros-patterns-the-metaprogramming-magic/69d4e00e921773ca906bdaea)

### [Lifetimes: The "Timeline Contract"](https://yafi.hashnode.dev/lifetimes-the-timeline-contract?utm_source=hashnode&utm_medium=feed)

Lifetimes are the most unique feature of Rust. You have probably never encountered them in JavaScript or TypeScript because the browser's Garbage Collector handles all of this automatically behind the scenes. Think of a Lifetime as a Timeline Contrac...

3 min read · [yafi.hashnode.dev](https://yafi.hashnode.dev/lifetimes-the-timeline-contract?utm_source=hashnode&utm_medium=feed)

[Apr 7](https://hashnode.com/posts/lifetimes-the-timeline-contract/69d4e0094650dac7a91de3bb)
