Published on

Indie Dev Weekly #21

Authors

2023, 0703-0709

This summer has been so hot, making me want to go south to escape the heat. I was finally able to wait for a downpour, significantly cooling down the entire city.

It's said this is the strongest El Niño in a hundred years, but El Niño's impact on global temperatures usually manifests in the second year after its formation, so 2024 will be even hotter...🥵

Happy Relocation

On Thursday, the Minimal Software Studio happily relocated from the bedroom to the living room. My daughter is 7-year old now and needs her own bedroom, so I was forced out of the spare room and went from private office to open office.

new_place

For the past 7 years my workspace has always been in the spare bedroom. After sitting in one place for too long I would adjust the bedroom layout, doing this seven or eight times over the years. Currently the only things on my desk that haven't been changed are the Dell U2412M display and the first generation Magic Mouse (that used batteries), I've had this display for 10 years, used it in Beijing for 3 years, and brought it back home after that. I've changed the desk and chair three times each, also went through three computers and over ten keyboards.

workstations

Minimal Diary App Store

This week I continued to work on version 1.7.6, finally completing optimization of the import/export functionality, and did some minor fixes and patches to other details.

What took the most time and effort was optimization related to the calendar. Initially I thought the calendar lag was due to loading images, but changing to asynchronous image loading didn't help, later when I just commented out image loading I found there was still lag even without images. So the performance bottleneck wasn't in IO, but in the UI. Along the way I asked Bee who implemented infinite horizontal scrolling lists without any lag in his app Walden for help. Not only did he unselfishly share his relevant code with me, he also taught me in detail how to use his encapsulated code. But even using his code my calendar still lagged in his lists, and I needed to modify some of my code to properly load images in his code. In the end I finally discovered the real cause of the lag was the State variables controlling calendar scroll offset and current month not coordinating properly.

git_log

Besides fixing bugs, I also wanted to add a new drafts feature. Previously drafts were automatically restored when opening the edit page, but this was a bit forced - what if the user didn't want to restore this draft but instead wanted to directly create a new diary entry? So I wanted to redesign the entire drafts workflow similar to Jike app, showing unfinished drafts as prompts for the user to choose whether to continue editing or delete the draft.

But here I encountered a dilemma again: how should I design the data model for drafts? There were three options:

  1. Save diary drafts as a temporary struct in UserDefaults, but this would require the struct to implement Codable and storing/retrieving multiple drafts this way would be inconvenient.

  2. Add a new isDraft field to the diary data model. Benefit is no need to convert between draft and diary, but completed saved and unsaved states couldn't coexist.

  3. Create a new CoreData entity specifically for storing Drafts, with attributes being a simplified version of the Diary entity. Could store multiple drafts, relatively convenient to convert to diary, downside is needing to write a bunch of CRUD operations.

After thinking it over for an afternoon, I ended up choosing the most troublesome but more extensible third option, hoping to complete this part of the functionality next week.

draft

New App Research

Two weeks ago I came up with the idea for a new health-related app and have been researching relevant technologies needed for implementation.

Because I would need server storage and notification sending, I asked about domestic and foreign services in this area in the w2solo group, also learning about SaaS, PaaS, BaaS, and FaaS.

Because I would need HealthKit, I asked Patrick, one of the developers of StressWatch, many questions related to reading health data.

However, just the day after verifying feasibility, I discovered iOS's Health app already had similar functionality 🤦‍♂️, backstabbed by Apple haha 😂.

But after briefly trying out the related Health app features, I felt it was still rather complex, and the experience was very different from what I imagined, so I feel there may still be opportunities here.

New Stuffs

More shopping this week.

  • Keychron K832, low profile mechanical keyboard. The tea brown switch version was out of stock so I got the blue switch version. What attracted me to this keyboard was the low profile + gasket mount combo, also it was very affordable.

  • On recommendation from "What editorial staff at SSPai bought recently" I got a PZOZ Apple Watch charger power bank.

  • Bought a bunch of underwear, juice drinks, concentrated juices, cold brew coffee, trash bags, tuna, T-shirts and crocs on Douyin.

keyboard_and_charger