Sign in

bytelogger.bsky.social

@bytelogger.bsky.social
10 followers 4 following 42 posts
PostsRepliesMedia
bytelogger.bsky.social @bytelogger.bsky.social · 16/10/2026
Testing isolation problem while working on watchr: `has_matching_event` calls `is_mutation`, `check_extensions,` and `path.is_file()` - making error signals noisy. Rust lacks built-in mocking - opened #67 to investigate strategy for unit test isolation. #rustlang #buildinpublic
github.com
refactor: investigate mocking strategy for unit test isolation · Issue #67 · mg4603/watchr
Currently, function unit tests aren't isolated (with mocking). This makes testing to be noisy and makes it hard to isolate the cause of failure. Investigate using trait injection or mockall to ensu...
160 0
bytelogger.bsky.social @bytelogger.bsky.social · 13/10/2026
Ran into an issue with llvm-cov: inline tests in `#[cfg(test)]` blocks are evaluated in the coverage report. My current plan is to move those blocks to separate `tests.rs` files per-module, then ignore then with `--ignore-filename-regex`. #BuildInPublic #rustlang github.com/mg4603/watch...
github.com
refactor: move inline tests to per-module test files · Issue #64 · mg4603/watchr
Unit tests currently live inline in each source module under #[cfg(test)] blocks. This causes two problems: cargo llvm-cov reports coverage for test helper code alongside production code, making th...
260 0
bytelogger.bsky.social @bytelogger.bsky.social · 07/10/2026
Next post in my series on building scaffoldr: bytelogger.hashnode.dev/generating-c... #buildinpublic #python
bytelogger.hashnode.dev
Generating CI Workflows During Scaffold - scaffoldr
How scaffoldr generates a GitHub Actions workflow for every project - matrix strategy, escaped braces, and mistakes worth fixing.
030 0
bytelogger.bsky.social @bytelogger.bsky.social · 04/10/2026
A bug I'd listed earlier (#55) - file creation not triggering command - ended up working itself out while refactoring for testability. Verified it with debug logging: is_file() returns true at event fire time on creation paths. #buildinpublic #rustlang github.com/mg4603/watch...
github.com
bug: new file creation does not trigger command · Issue #55 · mg4603/watchr
Creating a new file in a watched directory doesn't trigger the command. Modifying the existing file works correctly. Tasks Investigate root cause Fix accordingly Add regression test Acceptance Crit...
030 0
bytelogger.bsky.social @bytelogger.bsky.social · 02/10/2026
config resolution, validation, and tracing setup had crept into main over time. Moved them to dedicated config and tracing modules to bring main back in-line with its intended role as top-level orchestrator and entry point. #rustlang #buildinpublic github.com/mg4603/watch...
github.com
refactor: reduce main.rs scope by mg4603 · Pull Request #59 · mg4603/watchr
What Moved config resolution and validation logic to config module, and moved tracing initializer and verbosity to level mapping to tracing module. Changes lib.rs: added tracing module declaration...
140 0
bytelogger.bsky.social @bytelogger.bsky.social · 01/10/2026
Pushed watchr's test coverage from 34% to 99%. Refactoring surfaced some single responsibility violations along the way - tracked as separate issues github.com/mg4603/watch... #rustlang #BuildInPublic
github.com
test: achieve near-complete test coverage by mg4603 · Pull Request #58 · mg4603/watchr
What Increased test coverage from 34.88% to 99.20% line coverage through a combination of unit tests, refactoring for testability, and end-to-end tests. Changes tests/shared/mod.rs: shared utiliti...
050 0
bytelogger.bsky.social @bytelogger.bsky.social · 28/09/2026
bytelogger.hashnode.dev/automating-i... #python #buildinpublic
bytelogger.hashnode.dev
Automating Issue Creation and Branch Protection
How scaffoldr creates default GitHub issues and sets up branch protection via the API - merging user templates with defaults.
041 0
bytelogger.bsky.social @bytelogger.bsky.social · 24/09/2026
found a bug in watchr while writing end-to-end tests creating a new file in a watched dir doesn't trigger the command. modifying an existing file works fine. #rustlang #BuildInPublic github.com/mg4603/watch...
github.com
bug: new file creation does not trigger command · Issue #55 · mg4603/watchr
Creating a new file in a watched directory doesn't trigger the command. Modifying the existing file works correctly. Suspected cause: check_extensions calls path.is_file() which may return false fo...
040 0
bytelogger.bsky.social @bytelogger.bsky.social · 20/09/2026
bytelogger.hashnode.dev/talking-to-g... #python #opensource #BuildInPublic
bytelogger.hashnode.dev
Talking to the GitHub API with httpx - scaffoldr Series
How scaffoldr authenticates and creates GitHub repos using httpx - token handling, client setup, and error handling for the GitHub REST API.
051 0
bytelogger.bsky.social @bytelogger.bsky.social · 16/09/2026
Added unit tests for watchr's event loop. the previous `Write` refactor meant that I don't need a full integration test setup - just inject events through the channel and capture output via `Vec<u8>`. #rustlang #BuildInPublic github.com/mg4603/watch...
github.com
test: add unit tests for run_event_loop by mg4603 · Pull Request #52 · mg4603/watchr
What Added unit tests for run_event_loop using channel-based event injection. Changes watcher/mod.rs: added tests covering command handling, shutdown, and channel close for run_event_loop Why run...
150 0
bytelogger.bsky.social @bytelogger.bsky.social · 14/09/2026
bytelogger.hashnode.dev/running-git-... #BuildInPublic #Python
bytelogger.hashnode.dev
Running Git Command from Python - scaffoldr Series
How scaffoldr runs git init, add, and commit using Python's subprocess module - capturing output, handling errors, and controlling working directory.
030 0
bytelogger.bsky.social @bytelogger.bsky.social · 11/09/2026
Decoupled output formatting from stdout. Now `format_output` don't own I/O decisions anymore, is testable, and is flexible in case I want to redirect output elsewhere later. Created cleaner separation of concerns which I care about architecturally. #rustlang #opensource github.com/mg4603/watch...
github.com
refactor: decouple print_output from stdout by mg4603 · Pull Request #50 · mg4603/watchr
What Decoupled print_output from stdout, making it testable and allowing the caller to control output destination. Changes watcher/output.rs: renamed print_output to format_output, now returns Str...
031 0
bytelogger.bsky.social @bytelogger.bsky.social · 05/09/2026
New post: bytelogger.hashnode.dev/rendering-an... #BuildInPublic
bytelogger.hashnode.dev
Rendering and Writing Files in Python - scaffoldr series
How scaffoldr generates project files from string templates and writes them to disk using pathlib - folder creation and content functions.
130 0
bytelogger.bsky.social @bytelogger.bsky.social · 03/09/2026
Increased test coverage on watchr from ~35% to 76%. Added tests for debouncing logic, extension filtering, config default, and init errors. Left integration code and output formatting untested for now. #BuildInPublic github.com/mg4603/watch...
github.com
test: audit and improve test coverage by mg4603 · Pull Request #48 · mg4603/watchr
What Added tests for core logic modules, improving overall coverage from ~35% to 76%. Changes watcher/debounce.rs: extended create_debounced_event_result helper; added event-kind filtering tests (...
060 0
bytelogger.bsky.social @bytelogger.bsky.social · 29/08/2026
New post: Setting up a CLI with Typer. It covers type annotated parameters, typer.Argument vs typer.Option, and help text from doc-string. bytelogger.hashnode.dev/setting-up-a... #BuildInPublic
bytelogger.hashnode.dev
Building a Python CLI with Typer - scaffoldr series
How scaffoldr's CLI is built using Typer - type-annotated functions, arguments vs options, and auto-generated help text. No argparse boilerplate.
030 0
bytelogger.bsky.social @bytelogger.bsky.social · 26/08/2026
Switched from argparse to Typer for my CLI. Less control, but dramatically less boilerplate. Auto-generated help from doc-string alone is worth the flexibility cost. #BuildInPublic
650 0
bytelogger.bsky.social @bytelogger.bsky.social · 24/08/2026
New series starting this week: How scaffoldr was built - same format as watchr - code, decisions, mistakes. #BuildInPublic
040 0
bytelogger.bsky.social @bytelogger.bsky.social · 22/08/2026
New post: watchr v0.1.0 retrospective. What I've learned, what I'd change, a real bug I haven't fully solved yet, and what's queued for v0.2.0. bytelogger.hashnode.dev/watchr-v0-1-... #BuildInPublic
bytelogger.hashnode.dev
watchr v0.1.0: A Retrospective - Lessons and What's Next
Lessons learned building watchr v0.1.0 in Rust — a duplicate-run bug, plans for structured logging, and what I'd do differently starting over.
060 0
bytelogger.bsky.social @bytelogger.bsky.social · 20/08/2026
Another pain point I'm having: watchr doesn't currently tell you which entry triggered the command run. It only tells you what command was run and the output. Stuff get's confusing when you're watching more than one thing. #BuildInPublic
170 0
bytelogger.bsky.social @bytelogger.bsky.social · 19/08/2026
Adding tracing to watchr for v0.2.0 to get internal visibility into what it's doing at runtime - which events fired, how they were grouped and so on. Mainly to track down the duplicate-run bug I'm still chasing. #BuildInPublic
040 0
bytelogger.bsky.social @bytelogger.bsky.social · 16/08/2026
New blog: how watchr went from printing raw Rust debug structs to clean, readable command output. #BuildInPublic bytelogger.hashnode.dev/println-to-s...
bytelogger.hashnode.dev
From println! to Structured Output: A UX Lesson
How watchr, a Rust CLI tool, replaced raw debug output with readable success/failure formatting — and why it was a release blocker for v0.1.0.
050 0
bytelogger.bsky.social @bytelogger.bsky.social · 10/08/2026
Found an ugly output formatting issue in watchr a while back. Running a test suite printed this: Output { status: ExitStatus(unix_wait_status(0)), stdout: "test\n", stderr: "" }. Technically correct. Completely useless to look at. An important UX lesson. #BuildInPublic
050 0
bytelogger.bsky.social @bytelogger.bsky.social · 08/08/2026
New post: how watchr went from dying instantly on Ctrl+C to shutting down gracefully, using channels instead of a shared flag. #BuildInPublic bytelogger.hashnode.dev/graceful-shu...
bytelogger.hashnode.dev
Graceful Shutdown in Rust CLI Tools
How watchr, a Rust CLI tool, catches Ctrl+C and shuts down cleanly using ctrlc and a channel - instead of killing the process mid-command.
040 0
bytelogger.bsky.social @bytelogger.bsky.social · 05/08/2026
Chose channels over AtomicBool for shutdown logic because event loops already blocks on recv(). Shutdown is just another match case instead of a flag check in every iteration. #BuildInPublic
030 0
bytelogger.bsky.social @bytelogger.bsky.social · 05/08/2026
Rust question I ran into with watchr: how do you catch Ctrl+C cleanly? Route it through the same channel your event loop already uses. Shutdown becomes just another message type, no new machinery needed. #BuildInPublic
130 0
bytelogger.bsky.social @bytelogger.bsky.social · 03/08/2026
watchr used to die instantly on Ctrl+C - no cleanup, no confirmation. Spent time fixing that: it now shuts down gracefully with a clear message before exiting. #BuildInPublic
030 0
bytelogger.bsky.social @bytelogger.bsky.social · 01/08/2026
Landed on 'notify-debouncer-full' for watchr. Wraps the standard notify crate and handles debouncing for you. Wired it up to use one debouncer per '[[watcher]]' entry in the config, each watching its own directories. #BuildInPublic bytelogger.hashnode.dev/debouncing-f...
bytelogger.hashnode.dev
Building a File Watcher in Rust: Debouncing Done Right
How watchr, a Rust CLI tool, uses notify-debouncer-full to debounce file change events - and why raw notify wasn't the right fit.
030 0
bytelogger.bsky.social @bytelogger.bsky.social · 30/07/2026
Almost built my own debounce logic for watchr - timer, buffer, window-close - the whole works. Then remembered that's not the problem I'm trying to solve. Found a crate that handles debounce instead. #buildinpublic
030 0
bytelogger.bsky.social @bytelogger.bsky.social · 25/07/2026
bytelogger.hashnode.dev/why-toml-for... #BuildInPublic
bytelogger.hashnode.dev
Why I Chose TOML Over YAML for watchr's Config File
Why watchr, a Rust file-watching CLI tool, uses TOML instead of YAML for its config file - and how YAML's pitfalls factored into the decision.
040 0
bytelogger.bsky.social @bytelogger.bsky.social · 15/07/2026
bytelogger.hashnode.dev/i-kept-forge... #buildinpublic
bytelogger.hashnode.dev
scaffoldr: Automate Project Setup from the CLI
scaffoldr scaffolds your project, creates a GitHub repo, opens issues, and sets branch protection - all in one command.
050 0
bytelogger.bsky.social @bytelogger.bsky.social · 03/07/2026
Just refactored a Python CLI tool - extracted all GitHub API interaction logic from a 100 line command function into a dedicated github_ops() helper. Single responsibility principle in practice. new.py now just orchestrates. Much easier to test too. #BuildInPublic github.com/mg4603/scaff...
github.com
refactor: extract GitHub interaction logic from new.py to github.py by mg4603 · Pull Request #67 · mg4603/scaffoldr
What Inline GitHub API interaction logic (repo creation, remote setup, issue creation, branch protection) were moved from new.py to github.py to ensure single responsibility principle. Changes sca...
150 0
bytelogger.bsky.social @bytelogger.bsky.social · 22/06/2026
Typer gotcha: using prompt= on options means users answer prompts before your function body runs. Wrong fix: Used @app.callback for overwrite check before prompting Real fix: drop prompt= from options, handle prompts manually inside the function, check overwrite first.
010 0
bytelogger.bsky.social @bytelogger.bsky.social · 01/06/2026
bytelogger.hashnode.dev/watchr-autom...
bytelogger.hashnode.dev
watchr: Automate Your Dev Workflow When Files Change
watchr is a Rust CLI tool that watches directories and runs configured commands on file changes. No manual re-runs, no context switching.
000 0
bytelogger.bsky.social @bytelogger.bsky.social · 01/06/2026
bytelogger.hashnode.dev/denoiser-cle...
bytelogger.hashnode.dev
denoiser: Clean Audio for Dev Screencasts Without Expensive Equipment
denoiser is a Python CLI tool that removes background noise from video recordings using a noise profile. Clean audio for screencasts and tutorials .
000 0
bytelogger.bsky.social @bytelogger.bsky.social · 12/05/2026
Just published my first dev blog post. I got tired of juggling 3 terminals while debugging - so I built logsnap, a CLI tool to tail multiple log files in one place. Built in Python. No external file-watching deps. bytelogger.hashnode.dev/i-got-tired-... #python #cli #devtools #opensource
bytelogger.hashnode.dev
I got tired of switching terminals — so I built logsnap
logsnap is a Python CLI tool that lets you tail multiple log files in one place, filter by keyword, and snapshot the output for later analysis.
061 0