`let mut` â Opting Into Mutability - Day 07
Yesterday we saw that let gives you an immutable binding. But sometimes you genuinely need a variable to change â a counter, a running total, a buffer being filled. For that, you use let mut. The syntax let mut count = 0; count += 1; count += 1; println!("{}", count); // 2 Adding mut tells both the compiler and the reader: this value is intentionally going to change. Why does the distinction matter? Itâs a communication tool. When you see let in Rust code, you immediately know: this value wonât change. When you see let mut, you know to pay closer attention â something is being mutated here. ...
`let` vs Java's `var`: Immutable by Default - Day 06
In Java, variables are mutable unless you slap final on them. Most developers donât bother, so everything ends up mutable by default â even when it doesnât need to be. Rust flips this. Variables are immutable by default. You have to explicitly opt into mutability. Declaring a variable let name = "Alice"; Thatâs it. No type annotation needed here â Rust infers &str from the value. What happens if you try to reassign? let x = 5; x = 10; // â compiler error: cannot assign twice to immutable variable The compiler stops you immediately. This isnât a runtime crash or a warning â itâs a hard error. ...
`println!` â Why That `!` Matters - Day 05
Youâve seen println!("Hello, world!") already. But why the exclamation mark? In Rust, ! means youâre calling a macro, not a regular function. Macros vs functions A regular function in Rust has a fixed number of typed parameters. A macro can accept a variable number of arguments of different types â which is exactly what you need for printing. println!("Hello"); // zero args println!("Hello, {}!", "Rust"); // one arg println!("{} + {} = {}", 1, 2, 1 + 2); // three args If println were a regular function, youâd need a different overload for each case. Instead, macros handle this at compile time. ...
`fn main()` â What a Rust Program Looks Like - Day 04
Open src/main.rs and youâll see this: fn main() { println!("Hello, world!"); } Familiar? It should be. But there are a few things worth noticing if youâre coming from Java. No class wrapper In Java, everything lives inside a class â even main: public class Main { public static void main(String[] args) { System.out.println("Hello, world!"); } } In Rust, fn main() is a free function. No class, no public static, no String[] args unless you need it. Less ceremony, more signal. ...
`cargo new` â Your First Rust Project - Day 03
In Java, starting a project means choosing Maven or Gradle, creating a directory structure, writing a pom.xml or build.gradle, and eventually getting to actual code. In Rust, you run one command. Creating a project cargo new hello-rust cd hello-rust Thatâs your entire project setup. Hereâs what Cargo creates: hello-rust/ âââ Cargo.toml â your pom.xml / build.gradle âââ src/ âââ main.rs â your entry point Clean. No boilerplate. Cargo.toml â the project descriptor [package] name = "hello-rust" version = "0.1.0" edition = "2021" [dependencies] The [dependencies] section is where you add libraries â Rust calls them crates. Itâs the equivalent of your <dependencies> block in Maven. ...
Installing Rust: `rustup` is Your New Best Friend - Day 02
Setting up a Java project used to mean downloading a JDK, setting JAVA_HOME, maybe fighting with your IDE, and picking a build tool. Rust makes this refreshingly simple. One command to rule them all curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh Thatâs it. This installs rustup â Rustâs toolchain manager. Think of it as the equivalent of SDKMAN for Java, except itâs the official way to install Rust and everyone uses it. ...
Why Rust? A Java Dev's 5-Minute Reality Check - Day 01
Youâve been writing Java for years. It works. Your apps run fine. So why would you even look at Rust? Hereâs the honest answer: you probably donât need Rust for most things. Java is excellent. But Rust solves a specific set of problems in a way no other language does â and once you see it, itâs hard to unsee. The three things Java leans on that Rust doesnât 1. A Garbage Collector Java manages memory for you. Thatâs great for productivity, but it comes with a cost â GC pauses, higher memory usage, and unpredictable latency. Rust has no GC. Memory is managed at compile time, with zero runtime overhead. ...
Nginx Proxy Manager
Nginx Proxy Manager is a tool that helps you manage domains and route traffic to your applications easily. It is built on top of NGINX, but instead of writing configuration files, you can control everything from a simple web interface. Why Use It? Normally, configuring Nginx requires editing many config files. Nginx Proxy Manager makes this easier by allowing you to: Add domains Forward traffic to apps Enable HTTPS with Letâs Encrypt Manage everything from a dashboard Simple Example Suppose you have an app running on port 3000. ...
A Todoist System to Fix My Regrets (Not Just Track Tasks)
Regret is quiet. It doesnât show up as panic or urgency. It shows up as procrastination, hesitation, and that strange heaviness when you know what you should be doingâbut donât. Most productivity systems donât know what to do with regret. Theyâre built for tasks, goals, and deadlinesânot for unfinished emotional business. So instead of trying to âlet goâ of my regrets, I did something different: I built a system for them inside Todoist. ...
The Brutal Truth About Time Management
Most people think time is the enemy. We convince ourselves that we are losing the race, falling behind, or that the days are simply too short. We treat time like a resource that is constantly running out. But the truth is far worse than that. You arenât losing time. You are wasting it willingly. âI donât have timeâ is the worldâs favorite excuse. It is a comforting lie we tell ourselves to avoid doing the hard work. But if you look in the mirror, the evidence says otherwise. You have time to refresh your social media feed ten times a day. You have time to watch twenty short videos in one sitting. You have time to lie awake for hours doing absolutely nothing. ...