Dev Diary - July 2023
Here's an overview of the work I did on side projects this past month, specifically my key takeaways and learnings. Those projects were this blog using Eleventy, a static site generator library built on JavaScript, and the Bible Reading Tracker Android app I started a few months ago. These projects are very different in tech and tone, so I'll dive a little into each of them this month.
What I worked on #
This blog took up most of the time I spent on side projects this month since it was a full revamp from my previous personal website. I knew I wanted to get back into blogging so I explored modern static-site generators. I first looked at Jekyll since this website was originally hosted on GitHub pages, but I'm not experienced in Ruby and I ran into some gem issues while trying to set up my local machine. I next looked at Gatsby since I have experience working in React, but when I considered that the content of this blog would be fairly simple, I explored other options. I finally settled on Eleventy, a simple and fast static-site generator built on JavaScript and Node. I learned a ton during this project about static site generators, nunjucks templating, and a healthy dose of working in CSS (my first love). Overall this project took just about 3 days of free time (not including article writing) to build since I started with the Eleventy Base Blog which got me a lot of the way there.
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 #
- Static Sites are really powerful! - I had long (incorrectly) assumed that static-site generators were only for very specific sites and you were better to just write your own page or use a JavaScript framework if you wanted to do most things. I was so wrong. Not only was Eleventy easy to use and set up, but it's very powerful supporting custom dynamic layouts and filtering while providing a lightning fast build and performant user experience.
- 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
combine
result of two flows. Specifically thatrunTest
was 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.
Conclusion #
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 by sending me $1 on Ko-fi. It goes a long way in helping run this site and keeping it advertisement free. Thank you in advance!
- Previous: Android Adaptive Icons
- Next: Turbine and the combine operator