Photo by Derek Liang / Unsplash

Sleep IoT Quest - Day 7 Progress Update

Aug 22, 2025

Day Summary

What a day - after i screwed up my target yesterday by postponing the daily quest until later I vowed to myself that I will finish daily quests first thing after waking up and getting my coffee - turns out that saved my a.. today. Got it done, went on a walk, got more caffeine, got to work at my dayjob, finished - but focus dropped towards the later afternoon. Turns out if I had postponed again today, I wouldn't have done the full 90m again today just like yesterday. You live and you learn I guess, although I love it when the new habit gets such immediate rewards as soon as you implement them.

Sometimes I struggle a bit with stopping my brain from projecting into the future how much of the book is still left. I know the path is still a good long way, not including the fact that I am sorely lacking practice at the moment and many things I learned I will "rediscovery" as I forget to apply them where they are needed once I start working with this language.

But hey - babysteps... as you walk the way appears, right? :D

  • Active reading (74m, +20 pages): finished slices; started structs.
  • Guided coding (5m): example on structs.
  • Recreate-from-memory (11m): rebuilt the slices logic from memory.
  • Daily Quest Win: completed the full 90 minutes first thing (DQF).

Context

  • Took the easy win immediately after coffee—no detour today (saved my a.. since later during the day focus dipped a lot)
  • The rest of the day was mid, but the morning block secured the mission.

Reading

  • 20 pages in 74 minutes.
  • Closed out string slices → reinforced returning &str (borrowed view) for O(1) space instead of building new Strings.
  • Began structs → modeling data; keep an eye on field ownership and ergonomics (#[derive(Debug] when useful).

Coding Practice

  • Guided (5m): Structs.
    Small reps to define structs, instantiate them, and print/debug them.
  • From memory (11m): Slices.
    Re-implemented the first-word logic using a borrowed &str slice (no extra allocation).

Reflection

  • Daily Quest First (DQF): do the 90-minute block before anything else. Once it’s done, the day is a win.
  • With the win banked, there’s no guilt in resting or handling only baseline obligations—anything extra is bonus.

Key Learning

  • Slices over copies: prefer &str when you only need a view; avoid allocating a new String.
  • String vs &str: owned & growable buffer vs. borrowed slice.
  • Structs basics: basically named tuples/dataclasses pendant or a bit like js objects just without methods (for now)
  • Start > think: execution first, contemplation after.

Total Time Spent

  • Reading: 74m
  • Coding: 16m (5m guided — structs + 11m memory — slices)

PCT (Project Cumulative Time): 10h09m