Moodsmitten: the Journey

|

Exciting Times

It's been a long time since I quit my job in December 2015. Money's been tight, and life hasn't been a cakewalk, but in March I decided on a course of action, abandoning client-side JavaScript development and the Microsoft stack for iOS development. I'm excited to scrape together some sort of living using Apple technologies, and I have a positive outlook for the future.

A Higher Barrier to Entry

With non-iOS enterprise jobs, all employers care about is a bit of professional experience and a bachelor's degree. At this point, it's relatively easy for me to land that sort of position. The common theme among iOS jobs is having at least one non-trivial app on the app store. After reading a few books on topics that I'd need (Swift, iOS development, Core Data and even a macOS development book) and going through several Ray Wenderlich video tutorial courses, I jumped right into making my first app.

Why I'm Self-Taught, and I'm Better Off That Way

Despite having a Bachelor's degree, I consider myself a fully self-taught developer. I feel this worked out for the best. Whenever I've taken a course it has sapped my enthusiasm for the topic and led me to memorize a bunch of crap blindly and forget it all after a test. Learning on my own is an exciting adventure and I can't wait to absorb as much information as possible and apply it in ways that will stick in my brain.

Goals and Keeping it on the Down-Low

With my first app, I had a few goals: To make an app from design to deployment, to master Interface Builder, have a well-organized structure, write clean code, use version control, write unit tests, master Sketch, and to have fun doing it all. This app starts my real portfolio that I'm proud to show off.

Because I'm new to iOS, Swift, etc., I decided to keep my project very low-profile. I love helping people use apps, but I wasn't comfortable getting too much attention for my first attempt at a non-trivial app. I don't have a real blog following (yet), so posting here, on Twitter or Facebook doesn't do too much to promote my work, and I'm fine with that right now. Hopefully, I'll be able to build some sort of readership when I release a higher-profile app.

Moodsmitten: A Very Niche Market, and a Labor of Love

I'm quite familiar with Cognitive Behavioral Therapy (CBT). In a nutshell, CBT trains the patient to become more aware of thoughts and behaviors, which can be changed to improve mood.

One CBT technique I found particularly helpful are Thought Records. In a thought record, the patient describes a difficult situation and describes and rates their thought processes and emotions. They then challenge these thoughts to help them approach the situation in a more constructive fashion.

Many folks don't like to write thought records on the worksheet that a therapists provides. They also don't like to write their thoughts in a free-form text editor, so a phone app is the logical option. I looked at all of the apps out there, and I found that they all lacked important features. That's why I wrote and shipped Moodsmitten, which is my first true coding accomplishment outside of a corporate job.

The Grind

I went through many iterations of Moodsmitten. It started with a single page with a slider and a label on it. It was crude and ugly, but I began to learn how to style elements on the screen globally so I didn't have to mess with Interface Builder too much.

As I read books and watched videos, I put together the data model using Xcode's GUI for Core Data. I created entities for the Day, the Thought Record, individual Thoughts, and so on and hooked them up using several relationships. I used a custom and very simple Core Data stack that was easy to mock. As a result I didn't have to deal with the Core Data components directly all over the place. Then I wrapped the entity objects into plain-old-Swift objects so they were easier to manipulate.

In order to separate concerns, I wrote model controllers to deal with each type of entity. A DayService handled, persisted, and manipulated calendar days. The ThoughtRecordService handled an individual Thought Record, and so on. I instantiated these model controllers in the App Delegate, and passed them from one View Controller to the next. This dependency injection allowed me to write cleaner code.

The user interface was the most difficult part of Moodsmitten. It looks simple, but it took me weeks to grok Autolayout and build custom controls. I used PaintCode's Sketch plugin to make the control graphics so that they are resolution-independent.

I used a couple third party libraries for the calendar, the onboarding, and sync. They were easily installed with CocoaPods, and I was able to tweak them for my needs. I bought a sync library to integrate well with CloudKit, because building a whole sync platform by myself would have set me back a few more months. The sync solution also allowed me to easily switch the data store to Dropbox. This is important because if Moodsmitten caught on and users began to surpass the free CloudKit plan, I'd switch to Dropbox. I just can't afford the paid tier of CloudKit.

Integration with Apple features was extremely simple. All I had to do was pop open the Apple docs, read a couple of paragraphs and within an hour or so I had fully implemented a feature. A year ago, I wouldn't have been so efficient. I've come a long way.

So is it Useful?

I think Moodsmitten is useful for CBT patients. It provides a lot of structure for filling out thought records. There are many different screens, which might be cumbersome, but it is purposefully broken down into little bits because I've found that taking small snippets and putting them together can be powerful and illuminating.

Moodsmitten provides features that set it apart from the competition. The calendar in a this type of app is currently one-of-a-kind. Other thought record apps lack reliable and speedy CloudKit sync (with items propagating between devices within 10 seconds, integration with native features (split screen, the share sheet, background notifications), and a pricing model that proves to the user that the app is the real deal before they drop $4.99. Also, unlike the leading thought record app, this app fully works!

At this point, I don't feel that Moodsmitten fits my own needs. I tend to think better in a text editor such as BBEdit. Tapping and tapping through screens is a bit too much friction. In the beginning, a tool like Moodsmitten guiding me through the process might have helped, but I've written so many thought records that I can even do them in my head. At different stages of life, you need different tools to get things done. Moodsmitten is excellent for that initial phase where you're learning to become more aware of your feelings.

App Review Nerves

I was pretty afraid to submit my app for review, but Moodsmitten was approved and put on the store in less than two days. There were a lot of hoops to jump through to submit the app on the store, but I managed to do it!

Not the Best Pricing Model?

I haven't made any money on Moodsmitten yet. There are a bunch of installs, but only one person has purchased Pro. Maybe the UI for the purchase is too tucked away. In this case, I should have charged for the app upfront. I probably would have made a little more money. For my uses, that's not important, I intended to get very little attention, and I really stand behind this pricing model. In my next app, I'll reconsider my approach.

In the End...

I'm really excited about having Moodsmitten 1.0 on the app store. I have something to show for my studies and retooling for an iOS job.

Now, go and download Moodsmitten for free on the App Store!