Integer division is confusing
The rounding behaviour of integer division is counter-intuitive. Let’s look at two examples that’ll make you think.
Parse CLI arguments without 3rd party crates
Minimal command-line argument parsing in Rust without dependencies.
How to create a 2D matrix in Rust
![Source code fn main() { // step 1: initialize with 0 let mut grid = vec![vec![0; 16]; 16]; // step 2: update each element for y in 0..grid.len() { for x in 0..grid.len() { grid[x][y] = x * y; } } println!("{grid:?}") }](https://timclicks.dev/wp-content/uploads/2024/04/carbon34-1024x639.png)
Learn two methods for dynamically creating a 2D matrix, one using functional programming and the other imperative.
Convert a UNIX timestamp to Rust

The general strategy is to convert the integer to a type that’s unaware of time zones, such as chrono::NaiveDateTime, then convert that time to one that’s timezone-aware, such as chrono::Utc.
Example Article
The excerpt serves as a way to store the subtitle of this post.