I had been banging my head against a wall for months, running up against variations of the same problem trying to rebuild my SwiftUI iPhone app in Flutter (a framework that would let me release it on Android and iPhone).
It was New Years Eve 2022, and I used whatever brainpower I could muster up to write out the problem as clearly as possible and posted it on Stack Overflow.
My daughter was just a month old at the time, so I probably read the response in a middle-of-the-night stupor after putting her back to sleep. “This seems overly complicated. This part of my argument against MVVM and anything “view model” related to Flutter…” responded someone who knew what they were talking about. I wasn’t just letting a stranger on the internet dictate whether I was building my app correctly or not, but I had been avoiding just this uncomfortable truth. I was trying to jam a round peg into a square hole and at that moment it hit me so clearly: the way I was building the app wasn’t working.
I had started on this app almost a year-and-a-half before, and sitting there exhausted, I seriously doubted whether I’d ever finish the thing.
It probably helps if I go back to the beginning. What follows is how I taught myself to code mobile apps, how I got stuck here, and how I finally got my app, Lattis, released.
I’d wanted to learn to code for years. I worked with a lot of software developers in my first job, and I envied their ability to create useful tools completely from scratch. In my early twenties, I tried several times to learn, and gave up each time.
Then once the pandemic hit, after brief forays into sourdough baking and learning the ukulele, I realized this was my golden opportunity.
I had an app idea I’d wanted to build years before learning to code. My brother and I had done weekly calls where we tried to hold each other accountable to reaching our goals, and talked about building an app that would let us track each other’s progress. And now, I was in an accountability group with three friends doing something similar: each quarter, we’d set some big goals, and had a weekly call to talk about our progress and our setbacks. The same challenge applied - it was hard to keep track of where everyone was at.
I wanted to make a tool where we could track our own goals and habits, and see how everyone else was progressing.
Learning to Code
I heard Swift and SwiftUI1 were a great language and framework for novice developers. I’m very glad I started there. Swift/SwiftUI were opinionated and had plenty of guardrails that made it easier for someone inexperienced like myself to avoid mistakes (though I still made plenty of them).
I started with a short tutorial from Apple, and then began my first project. Knowing this accountability app was going to be extremely complicated, I started with something simpler. My wife spearheaded the content and I wrote the code for a simple conversation starters app.
The days looked like this: I would wake up early, usually two hours before my workday, and spend that time coding. In the early days, it was usually about 25% coding and 75% scouring Google trying to figure out some issue I couldn’t understand. Many mornings ended with me posting a question on Stack Overflow and hoping that by the time I checked the next morning, some guardian angel would have helped me out of my jam. Some times I’d get lucky, and other times I’d end up spinning my wheels for a week or more mostly stuck on one issue.
It was slow work, but after six months, we released our first app - I’m Curious - right before Thanksgiving 2020. And then I turned my attention to my white whale.
I worked for most of 2021 at the same sluggish pace on my accountability app. But I spent probably way too much time trying to do it write. I wrote a ton of unit tests2 (I honestly may have spent more time writing unit tests than the actual code of the app). In the back of my mind though, was the Android question. Swift would only get me an iPhone app, and if this was going to work for accountability groups where people might have any kind of device, it would need to support both.
So near the end of the year, I got feedback from beta testers and realized I needed to make significant changes to the app. I decided instead to rewrite the app in a language that would let me release and Android and an iPhone version simultaneously.
Switching Languages
Flutter3 was the framework I landed on that do both with the same code. So I started almost from scratch again in early 2022, learning Flutter from a beginners course on Udemy. After about three months working through the course for an hour or two each morning, I started moving along on my Flutter version.
Flutter had a lot of similarities to what I had been doing in Swift/SwiftUI, so some of the migration came easily. I kept running into several areas, namely - how to manage app state (things like your current list of tasks and goals) - so that the data in the app would stay up-to-date. In SwiftUI, there had really been one opinionated way to accomplish this, while in Flutter, there were many.
I was trying to do it in a way that most closely mirrored what I had done in SwiftUI, but this would turn out to be a mistake.
I couldn’t find any tutorials for the issues I was running into, and very few questions when I’d search Google. Which meant I was doing something most others weren’t. Sometimes, if you’re trusting your gut instincts, that’s a good thing. If you’re a novice developer in an unfamiliar language though, it’s probably not.
So that takes us back to that New Years Eve. I rebuilt almost everything that had been in the original version, but my frustrations were slowly building as things in Flutter just wouldn’t work cleanly.
My daughter had been born at the end of November, and I’d spent all of December on paternity leave. Our schedule was completely erratic but I’d find an hour here or there to do a little work on the app. I was getting ready to go back to work in a few short days, and I remember writing up this question on Stack Overflow as a last gasp of work before the new year.
When I got the response, I knew almost immediately that the guy was right. The way I was working, wasn’t working.
After a little while, I reached back out to him and asked him what he would do instead. He had a helpful answer, but to do that was going to mean learning a lot of new things and gutting and redoing about 70% of the app.
And with just days before I went back to work, no semblance of a regular sleep schedule, I got depressed…
Here was this dream of mine I’d been working on for years, that suddenly felt so far out of my grasp. I went back to work, my wife was deep in postpartum recovery, we barely slept, and I started to think this was never going to happen.
But after about two weeks, I would have these moments in the middle of the night where my daughter would be asleep on my lap, and I’d put my earbuds in and watch some tutorials on how I might restructure the app. And at some point, I became ok with the idea of reworking it.
My time to work on this ebbed and flowed dramatically, but some days I actually had more time. My daughter would wake my up at 4, and then after getting her back to sleep, I’d be wired. So coding time it was.
It started slow but during 2023, I redid the things I needed to, and pushed the app a lot further.
And then, by the end of January 2024, I finally got the first version of Lattis released.
What I’ve Learned
This project has been over three years long. Two different coding languages, and at least two complete or near complete rewrites. I’ve gotten on Twitter, and been exposed to the “indie hacker” community of independent developers. That group has strong opinions on how other indie developers, especially those building in their spare time, should operate. This project has broken probably all of their cardinal rules:
Ship your work fast? Obviously not.
Validate your product idea before you start building? Definitely not.
Don’t waste your time on unimportant details, like unit testing an app that you don’t even know if people want yet? …ok I’m going to stop answering these now.
I’d be more effective now if I listened to those, but learning to code was tough, and having a project I was deeply excited about made the difference in being able to push through those moments.
Working smart is important, but the first thing is making sure you have what you need to keep the momentum going.
I had three goals when I started this:
First, to create something I was excited to see in the world.
Second, to learn a craft that I could keep refining, that would also give me the ability to create something (like an app) from scratch.
Third, to create something that people find useful.
Will this ultimately gain traction? That I don’t know. But even if not, I’m happy with accomplishing the first two, and proud of the persistence it took to get there.
Thanks for reading. If you’ve got a goal you’re working towards and you’re deep in the middle of it, drop me a line if there’s any way I can support you.
Swift is a programming language developed by Apple. SwiftUI is a framework built on top of Swift that lets you code the user interface of your app using the same language, instead of doing it somewhere else.
Unit tests are test for a single unit of your app. For a single function in the app, like creating a new task, or completing a task, you might have several individual tests making sure each permutation of that functionality works.
Flutter is another framework similar to SwiftUI; this one is based on the Dart programming language. SwiftUI and Flutter have a lot of similarities, and they’re two very straightforward ways to code your app’s logic and build the user interface using the same language.
Great piece, Charlie!! Really appreciate the tactics and vulnerability