Stop scattering `if/elif` checks across your code to manage workflow states.
If your feature has a real lifecycle (draft → review → approved → published), model it as a **state machine**.
With `transitions`, you attach the machine to your existing object (`model=content`) and it injects the trigger methods + keeps a `state` field for you.
What you get:
* Triggers become methods (`submit()`, `approve()`, `publish()`)
* Invalid moves fail fast (`MachineError`)
* Workflow rules live in one place (self-documenting), not across views/templates/services
No, it's not. It's saving you from a 3 AM debugging session three months from now.
In Python, variables are references. You pass an object around, everyone shares it.
In Rust, by default, Ownership is exclusive.
Why? Because if `s1` and `s2` both "owned" the memory, they would both try to free it when they go out of scope. -> Double Free Error. -> Security Vulnerability.
Rust forces you to address this before runtime and be explicit: 1. Move it (give it away) 2. Clone it (make a copy) 3. Borrow it (`&s1` - look but don't touch)
But when I asked them to:
• spin up a simple CLI tool from scratch, or
• deploy a small app to the cloud…
They froze.
“I usually just follow the video.”
That’s tutorial hell.
It feels productive, but you’re borrowing someone else’s problem-solving.
The way out is simple (not easy): build something with no guide.
• You will get stuck.
• You will read docs.
• You will use AI (deliberately).
• You will feel frustrated.
• You will learn for real.
That’s why we teach around projects, not lectures. 💪
When you build up a #Python string use a list over string concatenation (+=).
See stackoverflow.com/a/3055541:
> Strings are immutable and can't be changed in place. To alter one, a new representation needs to be created.
So that happens repeatedly here = slower.
Btw instead of loop + append, I could also have used a list comprehension inside the .join()
Also this probably only becomes a problem for bigger data. I post it here for awareness, but writing readable / maintainable code should be your first focus.