The Continuity

I’ve taken time away from Swift/SwiftUI in the months leading up to WWDC. I’ve found I usually have a lot of code to redo once WWDC’s announcements become public. This year, I decided to not code Apple stuff between January and WWDC.

It’s not that I haven’t been coding. I took the break to learn something new. I dove into learning Flask, a micro web framework written in and for Python. I’ve been having fun, which I rarely have when fighting XCode.

it’s nice to use a mature and stable programming language where I don't feel like I’m trying to hit a moving target.

When I began my Flask journey, I wasn’t sure what I wanted to make, so I started with a basic website. Flask might be a micro-framework, but that doesn’t mean it’s not full-featured.

Once I understood the basics of Flask, I began thinking a database would be nice. I usually use SQLite for my own projects and that’s what I used with Flask and a plug-in known as SQLAlchemy.

I then thought a journaling and life stream app of the sort I have on iOS would be worth building in Flask. Then, I ran into a problem.

The idea floodgates opened. I added functionality and more functionality. Now I have something pretty useful, and I think, amazing with the little time I’ve had to spend.

I called my project “The Continuity” which refers to the continuity of my thoughts and actions. A life stream. The site lets me pull sites and post information to:

Social networks:

- Micro.blog

- Mastodon

- Twitter (until the API dies)

- OMG.lol

Other stuff:

- Weather

- Stock market

- Goodreads

- Cheerlights

I’ve also linked my external and internal sites. I installed Codeserver (the server version of VS Code) which I now use to develop all of this. Then I discovered the concept of Micro Journals and added functionality for that.

I’ve always wanted a way to track my own projects the way I work, and am working on what I call MicroProjects.

The Continuity has expanded beyond my initial desire to learn Flask. I’m still learning, for example, how to do forms and secure login.

I’ve also switched most of my database from SQLite to CouchDB, which I had to use because MongoDB wouldn’t run on the RaspberryPi that The Continuity uses. That led me down a No-SQL rabbit hole and I stumbled on a database called TinyDB.

TinyDB is a small standalone No-SQL implementation. It’s perfect for cross-platform use. Which led me to decide I should rewrite my iOS journaling app to use it. But there is no library for TinyDB on iOS/Mac. I’ve started writing one.

Being able to use the same files from the web and iOS and Mac is great, but I had to figure out how to get an iPhone to get to a RaspberryPi DB and vice versa. I’ve had to deal with Swift and its network and security hoops before. I didn’t want to jump through them.

So I figured out how to synchronize iCloud files to the RaspberryPi. Now I’ll be able to work on either platform without having to deal with network protocols and security. A big win for me.

All of this progress in probably less than a month of work. I started out wanting to learn Flask. I’ve learned so much more along the way.

Now that WWDC is winding down, I’ll switch gears a bit and get back to some iOS/Mac development. I do want to redo my journaling app, and maybe my writing app (yet again). Being able to use TinyDB as the data store will simplify the code and functionality a great deal.

I also want to create a MicroJournals and MicroProjects app for iOS/Mac.

No, I probably won’t release them, since I don’t want to deal with managing users or the codebase. But I think I’ll start posting about various bits of The Continuity, so you can see what it’s really about and to help me focus.

Let me finish up by saying, learning something new is never a waste of time. You never know what you’ll discover about the topic or what you’re capable of.



blog comments powered by Disqus