Writing and things

TIL 2025.7.28

Today I learned

  • Order matters in a timer! In my app, I have a timer that does a few simple things. Before I fixed it, it first subtracted a second from my secondsRemaining variable, and then it checked to see if that was 0. I was getting a weird bug that would make the GUI pause just enough to notice at the last second. SO I rearranged a few lines to do the if secondsRemaining <= 0 first, and nest the subtraction line in an else block. Fixed the pause! YAAAAAAAY!
    • I’ve had this same silly issue on a few versions of this timer for ages. It never really just clicked to try a slightly different order on the timer. This is amazing.
    • I still may be getting a bit of a Off By One bug somehow? Ugh.
  • This is has been a major feature I’m adding for the MVP. I feel like there may just be one or two small things I want to add and then go through for Accessibility.
  • I wonder if it’s okay to link to the BuyMeACoffee thing in the app? I’m not sure IAPs allow for a "I like your app, have a $1" type things. That is something I gotta figure out. A simple redirect/deep link?

Other things?

I let my developer account lapse due to budget reasons, so it looks like it’s time to reactivate it. Also, I wonder if it’s better to publish an app under a business name or my personal name?

Posted in til Tagged

TIL 2025.7.16

Today I learned

  • I’m trying to cram too many things into a single function.
    • The downfall here is that I want to name things that are easy to remember, and have functions that are only differ in by a line or two so that makes things…fuzzy
  • Also, who cares? Are you gonna see my dirty code? NOPE!!! So I’mma make 2 different model methods so that I can call them based on an enum state.
    • Clean it up later! Make the dumb thing work!
  • Timer objects will run until you call .invalidate() on them. This causes problems if you invoke a timer more than once without stoping it (or realizing that you created 2 timer objects). I will make the timer fire more than once a second.
  • I think I’ve just about finished part of my MVP on this silly app. I have one major feature I want to build. Most of the logic is already there, since I’ve been using a modified VM architecture. My logic is all chilling in one ViewModel object with my preferences all wrapped in ‘@AppStorage’ properties.

I know it’s been (literally) 2 months since I last posted a TIL. Life gets in the way! My schedule is still flexible, and I have to be that way too. Thanks for reading!

Posted in til Tagged