September 05, 2023
This Post is part of the Blog Chain: Write An App (2023) Blog-Chain.
Though I only had one solid day of coding this past week, I made significant progress due to an uninterrupted 5 hour block in my calendar. I was able to enter a state of flow and really work through resolving some blocks and refactoring some stupendously absurd code and as a result, not only did things work - they worked better!
I love the quick feedback loop between the machine and I in solving puzzles of code. I love the strategic and tactical process of evaluating a code and data strategy, experimentation, failure (learning), and finally success. It is a very rewarding process.
That isn't to say that I'm proud of my code - but I am proud of the progress I'm making. The Rust programming language is not so different from other languages once you get past its novel syntax and requirements for borrowing, mutability, and lifetimes.
Some observations and reflections about my work include:
needing to get out of the meta-programming loop:
I found myself refactoring some things that I thought could be better modeled in structs and vectors, but realized there was minimal gains in efficiency and made the code more obtuse and less readable.
when moving from scripting to writing a program with models:
A big chunk of the upfront work is just building the data models and the functions that I will be using myself in order to actually do the things I want my program to do. It is laying groundwork for the actual work.
Reuse, Reuse, Reuse
I found I was able to reuse functions I'd already written for one struct, for another struct - and it was looking me straight in the face the whole time! I saved myself time and made my software better by reusing a function for one entity that I'd already written for another.
The big challenge I expect to have is knowing when to call the software 'done': I have already completed my 'minimum viable' software with the exception of deploying a binary, and I have a self-imposed deadline of 2023 to wrap it up. I dream of many more features to add, but shipping seems more important than shooting for the moon, and the point of the whole exercise is to learn (more) Rust, and create something meaningful to me, and to a close friend of mine.