Why and How You Should Persist Your OpenWrt Logs?

Why and How You Should Persist Your OpenWrt Logs?

You restart your OpenWrt router to apply a new setting, and just like that—poof—every log file is gone. The mystery Wi-Fi disconnect from 3 AM? The firewall block you were trying to debug? Wiped. This is the default behavior for most OpenWrt users. By default, OpenWrt’s logging daemon, logd, writes to a circular buffer in RAM. This is a smart design for performance and to protect the limited flash storage on a router, but it has two massive drawbacks: ...

November 9, 2025 · 5 min · Mohammad Abbasi
Binary representation of integers in computer systems showing how numbers are stored and processed

From Bits to Integers: The Journey of Numbers in Computers

Understanding how computers handle integers is foundational to computer science and software development. In this post, we’ll explore how integers are stored, represented, and manipulated in binary systems. What Are Integer Data Types? Integers are whole numbers (no fractions) that can be positive, negative, or zero. In programming, they’re categorized into two types: Unsigned Integers: Non-negative values (0, 1, 2, …) Signed Integers: Positive, negative, and zero These values are stored as binary sequences (0s and 1s), where longer bit sequences allow larger numbers to be represented. ...

January 28, 2025 · 6 min · Mohammad Abbasi
Generics in Go

Generics in Go

You probably know that Go is a statically typed language, which means that every variable in your program must have a predefined type. For example, when we define a function, we need to specify the types of its parameters, like in the following code: func Print(s string) { fmt.Println(s) } Here, we have defined a parameter named “s” with the string type. We can define any number of additional parameters with any types, such as float64, int, or structs. However, the problem arises when we want to pass a number(or other types) to this function because numbers are of type int, and we can’t assign an int to a variable of type string. Previously, we used to define the type of the “s” parameter as an interface, which partially solved this problem but still had many limitations. ...

August 27, 2024 · 3 min · Mohammad Abbasi