I like routines and planning. Routines is one of my ways of managing anxiety and stress. I like to feel like I know what’s going on and what’s coming up. But I have a 4 year-old. So I have to be somewhat flexible, and I’m always tinkering with my routines.
Over the last year and a half or so, I’ve been able to take advantage of my mornings more. Minus getting-ready-in-the-morning-time, I typically have between an hour and an hour and a half to myself while no one else is awake. I have loved this time. It’s when I’ve worked on my app Focuses and other side projects. Sometimes I take that time to read in the mornings or play a game. It’s when I’m writing this. It’s just some great quiet time that I get all to myself.
I’m not naturally a morning person. I’m more productive in the evenings. But mornings still work better for me. I work full-time and I also do some part-time contract work. After a full day of work, I’m dead and don’t feel like doing anything besides relaxing with my family. It never seems to work out well the occasional times that I trick myself into playing with a side project in the evening. I’m pretty obsessive, so often, programming gets my mind whirring and I can’t sleep, so I stay up far too late working on something. With a child in the house who consistently wakes up early, and my needing 8 hours of sleep to feel barely functional, staying up late is not a great option.
So that’s why I’ve landed on mornings. And it was great.
Wait, was?
Yup. Was. Well, maybe I’m being a little premature. My wife and I are expecting another baby in a couple months. We are, of course, incredibly excited, and it brings a smile to my face just to write it. But a new baby is going to change everything. If this baby is anything like our first, I won’t consistently have my mornings again for about 2 years. But that’s fine. Sure, I’m going to miss the regularity of have the mornings to myself, but sharing early mornings with a baby is much better.
I won’t get as much side-project type stuff done. That’s a given. And I’ll have to give up my oh-so-comforting routines in favor of the beckoning cry of a newborn. It will be a fun puzzle each day fitting in the baby’s needs and my wants.
So thanks, mornings. You’ve been great. And we still have a couple months, so let’s get some updates to Focuses out or something while we can.
Overall, I liked this book. I give it a thumbs up 👍🏻.
I can’t remember when I really became aware of Steve Jobs. I was aware of Apple growing up, and was envious of friends who had iPod Minis in iPod Socks. But Steve Jobs was never really on my radar. I didn’t grow up idolizing him. Years later, I have learned more about him and grown to respect him and the company he built. Reading Steve Jobs gave me a much better understanding of who he was.
I’m a software developer. I write code. Some days, I like to pretend that I’m a designer too. I value well thought out details in the products I use and strive to put the same care into detail into what I build. I wish I had the time a resources available to get things just right every time, but that’s just not realistic. The whole point of design is working within constraints. And eventually you have to ship.
One story that really resonated with me was how distraught Jobs was when he discovered the CD drive in the new iMac was a tray and not a slot. So close to release, there was nothing to be done expect to delay the release. Those around him convinced him that it wasn’t worth delaying the release over. My wife and I are building a house right now. It seems like every day the builders do something that in my mind is incorrect, but it is too late or too expensive to change. It drives me crazy, and I know years from now I’ll look back and think “I could’ve gotten this right.” But ultimately, I would rather have a finished house than a perpetually incomplete house that will never meet my standards.
I doubt anyone else could’ve done what Steve Jobs did. But, of course, he didn’t do it alone. He surrounded himself with people who could execute his vision. No one gets everything right the first time every time, not even Jobs. Hopefully we get a chance to try again and improve.
I had to cut myself off on adding new features to Focuses pretty early on. If I let myself keep going, I probably never would’ve released.
Here’s a few things on my roadmap that I would like to work on.
Better iPad support. This might be my biggest priority. Current iPad support is basic at best. I wanted to launch with multiple device support using CloudKit. I had never used CloudKit before, so I’m glad I went ahead, because I quickly found I did things wrong. A lot of people’s data would not have synced if I added it later. Anyway, my focus was on getting Focuses onto iPad, not making a good iPad app. There’s a lot about making good iPad apps that I just don’t know, so I’m excited to learn.
Data import/export. I think it would be nice to be able to export all the data as a CSV or something. Importing will be a little tricky because I will have to think about how to handle existing data. I could always start with just export.
Shortcuts support. There’s a few shortcuts that I think might be useful.
Watch app. I’ve never built a watch app before, so that would be kind of fun.
Graphs and trends. Some beta testers said that having graphs might be nice. While I think the calendar view does a pretty good job, I’m going to explore this. Perhaps a way to view week by week or month by month instead of day by day. Or a way to see at a glance if you’re doing better or worse on a particular focus.
Widget. I’ve also never made a widget, so again, lots to figure out.
Smarter and richer notifications. Right now, notifications are pretty basic, once a day at the same time, regardless of if you’ve entered scores or not. There’s a lot of opportunity here to do more.
There’s more on my list, but these are probably the biggest. If you have any ideas, or your favorite feature is missing, let me know on Twitter, or use the contact form.
I think I mentioned it briefly, but Focuses is built mostly with SwiftUI. Overall, I’m very impressed with SwiftUI. I don’t think I would’ve been able to build the first version of Focuses as quickly as I did had I not used SwiftUI.
Focuses is my first “real” iOS app. My first app, Send To Nowhere, is a simple app using UIKit, Swift, and no storyboard. I’m still a novice when it comes to the iOS ecosystem. I’m a full-time web developer by day, so using SwiftUI felt familiar in ways. However, the declarative nature of it still feels quite foreign from time to time.
SwiftUI: The Good
I was worried that SwiftUI wasn’t going to be mature enough to complete my app. I was surprised at how capable it currently is—despite it’s many shortcomings—and I’m very excited to see it develop. It’s not perfect, but I was able to use it for about 95% of my views. Even in the short time I have been building Focuses, I’ve seen great bug fixes and improvements come to SwiftUI. I’m very optimistic for it’s future.
SwiftUI made some things in Focuses a breeze to implement. Take the animation when filling up the circle. That whole view, including the animation, took me about 10 minutes to make. Again, I’m not a UIKit expert, but I have no idea where to start if I had to make that same view without using SwiftUI.
Animation of score indicator filling up
Creating complex layouts like the calendar was relatively straight forward as well. I think my first implementation had too many nested views, which were being rendered too often, so it took a long time to load. But it was easy to go from idea to implementation quickly. I was able to iterate and make a much more performant version fairly quickly.
Sreenshot of Focuses calendar with boxes around elements
I also like how easy it is to use CoreData with SwiftUI. There were times that things weren’t updating when I thought they should’ve, but I found ways around it. This was my first time using CoreData, so for all I know, I could be doing everything wrong and that’s the source of my problems. Hopefully not though.
The main issue with CoreData and SwiftUI, in my opinion, is previews. I could not find a way to adequately seed that database for previews. So for much of the project, I did not use previews. Maybe I need to take another look at this.
SwiftUI: The Bad
SwiftUI is great at hiding complexity and implementation details, like when using @FetchRequest. However, once you want to do something that is more complex, like pass in params to your fetch request, things can get messy.
Here’s a couple things I needed to use UIKit for:
Text fields that I wanted to become the first responder (i.e., receive focus when the view appears and show the keyboard).
UITextView. There doesn’t appear to be a SwiftUI equivalent of this. I needed a multi-line text input for notes. I also wanted an input accessory view, and I believe this can still only be done using UIKit.
I wanted to set the scroll position of the calendar view so you would start at the bottom. The only way I could find to do this is by using a UITableView. I was still able to use my SwiftUI view for the cells.
There’s also some things that just don’t make a lot of sense. Action sheets do not work on iPad. You have to use a work around. iPad support in general seems kinda weak. I’ve found it tough to make layouts for iPad, part of the reason the first version of Focuses doesn’t have great iPad support. I need to spend more time figuring it out.
I also had a lot of trouble embedding forms inside other views, like on the privacy and about views. My solution is hacky and doesn’t respond well to changing the system font size, but it works for now. Essentially, I have to give the form a set height based on my best guess using the font size. Additionally, I have to use .fixedSize(horizontal: false, vertical: true) on all the text so it would wrap properly.
I also wish there was a way to customize the navigation bar. As far as I can tell, you’re stuck with it’s color and font.
I’m hoping all these things will be addressed in iOS 14, or possibly even point updates of iOS 13.
Conclusion
The best resource I’ve found for SwiftUI is Hacking with Swift. The examples are fantastic.
If I were starting a new app today, I think I would still start with SwiftUI. I feel like I’m faster when I use it, and it’s pretty simple to use a UIKit view if you need to. I think I’ve only scratched the surface of what SwiftUI is capable of. I need to delve deeper into animations and transitions.
I’m excited for the future of SwiftUI. I feel like it allows me to create things I would’ve dreaded to try a year ago.
If you’re curious about how I did anything in Focuses, let me know on Twitter, or use the contact form. I can dig into the nitty-gritty specifics.
Here are a few numbers related to making Focuses that may or may not be interesting.
130 Hours
This is the first project I have time tracked. The first commit for Focuses was on December 13, 2019. About 13 weeks later I submitted it for review. So that’s about 10 hours a week. Some weeks were much less and some were much more. This also doesn’t include times when I was thinking about the app when I couldn’t sleep or showering and stuff like that. A lot of the work on Focuses was done early in the morning before I started work for my full-time job. 130 hours seems like a lot to me, but it’s about 3 weeks of full time work.
147 Tasks Complete
I’m using Things to keep track of everything I’m working on for this app. This probably isn’t that useful of a number since my tasks ranged from “iPad” to “Fix accent color on focus edit sheet”. But 147 sounds kind of impressive.
183 Commits
A commit is every time I make a change to the code and save it to version control. Only about a dozen of these were of the “Uncomment code I commented out” variety. My build number is based on the number of commits on the master branch. Again, this number doesn’t mean a whole lot because some commits were changing a single color and some were adding multiple views and data models at the same time.
19 Minutes Spent In “In Review”
This surprised me. I submitted it for review about 7 am on March 9. About 6 hours later it moved from “Waiting for Review” to “In Review”. Then about 19 minutes later it moved into “Pending Developer Release”.
Let me know if there are any other numbers you’re curious about on Twitter, or use the contact form.
Focuses is my take on goal and habit tracking. It is inspired by Myke Hurley’s daily themes and Marshall Goldsmith’s daily active questions. The idea is to have a simple and flexible system for scoring yourself on how you do towards your goals each day. There are 3 options, an empty circle, and half-filled circle, and a filled circle. What these mean is up to you.
When SwiftUI was announced at WWDC 2019, I began thinking of projects I could try it out on. An idea for a daily questions app kept coming back to me. It would be an app that asked you the questions you wanted each day. Stuff like “How did you do towards eating healthy today?” You would respond with some like “Bad” or “Good”. I started a version of this app, but abandoned it. I didn’t like that approach. It felt too constrained.
While listening to Cortex, I heard Myke talking about his system of rating himself on a scale of 0, 1, or 2. Those scores would add up to a daily score. I really liked that approach. It felt flexible and easy to track. I tried it on paper, but it didn’t stick. So with the New Year fast approaching, I thought why not try to make a simple app to do it for me? I’m a novice iOS developer at best, so what I thought would be simple was not so simple for me. But after about 3 months of slow and steady work, I’m excited to release the first version of Focuses!
I made the app for myself. I use it everyday. Tracking my effort towards my goals has had a tangible effect on my life. It’s helped me and I hope it can help others.