Blogs

All the latest blogs and articles from techXcelerate — covering Go, Rust, and modern software development.

Go Pointer vs Value Receiver: Which Should You Use?

Go Pointer vs Value Receiver: Which Should You Use?

Use a pointer receiver if the method mutates the value, the type holds a mutex, or the struct is large. Otherwise a value receiver is fine — but do not mix both on one type.

Published on Aug 15, 2026

NI

Go Struct Embedding vs Composition: What's the Difference?

Go Struct Embedding vs Composition: What's the Difference?

Embedding is composition with field and method promotion. A named field is composition without that shorthand. Neither is inheritance: a Customer with an embedded Address is not an Address.

Published on Aug 15, 2026

NI

nil Pointer Dereference in Go: How to Actually Debug It

nil Pointer Dereference in Go: How to Actually Debug It

The panic is runtime error: invalid memory address or nil pointer dereference. Read the top user frame in the stack, find which pointer is nil, then check constructors, map lookups, and interface wrappers — not recover.

Published on Aug 15, 2026

NI

Why Are My Struct Fields Not Comparable with ==?

Why Are My Struct Fields Not Comparable with ==?

A struct is comparable with == only if every field is comparable. A slice, map, or function field makes the whole type illegal for == and unusable as a map key. Compare fields yourself or use reflect.DeepEqual.

Published on Aug 15, 2026

NI

Why Can't I Take the Address of a Map Value in Go?

Why Can't I Take the Address of a Map Value in Go?

Map index expressions are not addressable. Go maps grow by moving buckets, so a pointer to m[k] would dangle. Copy the value out, mutate it, and write it back — or store pointers in the map.

Published on Aug 15, 2026

NI

Why Did My Struct Change Inside a Function But Not Outside?

Why Did My Struct Change Inside a Function But Not Outside?

Go copies structs when you pass them to a function. Mutations hit the copy, not the caller. Use a pointer (or return the new value) if the change must stick.

Published on Aug 15, 2026

NI

Why Does new() Behave Differently From a Struct Literal in Go?

Why Does new() Behave Differently From a Struct Literal in Go?

new(T) returns a non-nil *T pointing at a zero T. T{} is a T value. &T{Field: x} is a pointer you can initialize. new cannot take field values. Use make for maps, slices, and channels — not new.

Published on Aug 15, 2026

NI

Why Is My Embedded Field's Method Not Being Called?

Why Is My Embedded Field's Method Not Being Called?

Promoted methods still run on the inner value. An outer method with the same name shadows them; it does not override. Inner methods never dispatch to the outer type. Call the explicit path or stop expecting inheritance.

Published on Aug 15, 2026

NI

Rust Ownership

Rust Ownership

Understand the core concept of ownership in Rust, how it guarantees memory safety without a garbage collector, and how to use borrowing and lifetimes to write efficient, safe code.

Published on Jun 7, 2026

NI