Dev Diary - July 2023
What I worked on #
The other project was my Bible Reading Android app. It's a simple app with two screens; a list of readings broken up by day and a settings screen that offers a few options. The app was mostly done last month, but I wrapped up a bit of polish this month including moving the screen state into StateHolders, moving complex components into their own files, and fixing misnamed files. The biggest task this month was jumping in to write Unit Tests with a goal to maximize essential code coverage. I haven't been able to finish this yet, but with the patterns established I expect to finish this early next month.
Key Learnings #
- CSS is fun <3 - CSS is still one of my favorite things to work in and it was a joy to style this site, especially trying to keep the page very minimal. Perhaps I'll work on another web project soon...
- Turbine testing combine issue - I ran into an issue testing a class that returned the
combineresult of two flows. Specifically that
runTestwas appearing to skip values on the flow. Stay tuned for a Tech Tidbit on this soon, but this issue caused me no lack of headaches and I still don't have a great solution.
- Mocks vs Fakes - I have long held that Fakes were superior to Mocks in preventing unnecessary dependencies and encouraging developers to write more testable classes. However, in working on the tests in my app I found that I was spending an inordinate amount of time building fake classes when I could have mocked and tested the code in a fraction of the time and lines of code. I'm still considering my opinion, but I may be turning to the Mock side.
- Unit tests are hard to write after the fact - If you've been writing software for long enough you probably noticed that it was odd that I was writing tests this late in the project and you would be right. I hadn't intended to write tests for this code since it was just an exploration project, but I felt it would be good practice and better late than never. I have found that writing a bunch of tests back to back to back is very tedious. But even worse, I found a bug that would have been resolved sooner if I had just written the tests sooner. Another lesson learnt on the inevitable expansion of side projects.
What's Next #
First off will be to wrap up the Bible Reading App. This means finishing the unit tests and refactoring the inline UI strings into the string resources file. If I'm feeling inspired I may also write a few UI tests for the critical paths. Then I'm thinking of publishing the app to make it available for people to use, that remains TBD.
Once that is complete, I'm going to clean up and upstream the slew of updates I made to my Wordle Clone app, specifically fixing the navigation stutter due to unnecessary recompositions, updating the statistics screen to use
HorizontalPager, and adding large screen and keyboard support. I don't plan to do any more on this app or even polish this very much, but since I put the work in for my wife I'm happy to share it.
Finally, if there is still time the next project is going to be a "distraction free browser" app. I want a web browser for my phone that doesn't have a url input, favorites, tabs, or "most visited". I need a browser that can view web links and that's about it. I've actually already started this project (shh...), but only to set up the initial view and test the web page display so there is still plenty of work to do.
I'm really looking forward to some fun projects in August! Be sure to stick around to see what develops over the course of the month. Until next time, thanks!
Did you find this content helpful?
Please share this post and be sure to subscribe to the RSS feed to be notified of all future articles!
Want to go above and beyond? Help me out at one of the services below, it goes a long way in helping run this site. Thank you in advance!