From local storage To-do list to Fractal, Peer-to-Peer Habit Tracker
Part 1: Beginnings
“It started with a liiiist”
It started with a To-do list. The word(s?) lost all meaning…
‘Add To-do item’
‘Add new To-do list’
‘To-do or not To-do…’
We’ve all been there; after all, it’s a canonical CRUD example. As somebody who was drilling code problems all day, it was a step up to something a little more cohesive. For me it was also an introduction to Sinatra and Rack-based frameworks in general.
I persisted as long as I needed to and moved on — exploring what else Sinatra was capable of. It led me to develop a multi-page app that would store data on tracking personal habits — exercise, meditation, diet etc. I stored an array of linked lists (habits) which had a boolean value (completed/not completed) for each day of tracking.
I was pleased with my progress, but not pleased enough to draw a line under it. There was a bigger, more scalable project lurking underneath the cluttered codebase.
Enter Uncle Bob
They say Mastery involves mentorship. I feel lucky to have studied (and currently finishing) the Launch School curriculum where they put a total focus on these principles. I have to admit having deviated from strictly following the course in sequence, deciding to get lost my fair share of rabbit-holes throughout the last 2 years of study, but always returning to their trusted and valued community.
This video stretched, or should I say expanded, my comprehension of what I could build. It got me thinking about how I can de-couple the application layer from the persistence layer. I had heard of Uncle Bob before, but seeing his presentation made me understand why he was so valued to the industry… and now separation of concerns makes so much sense!
With a mind to develop decentralised applications later on down the line, I suddenly saw the possibility of extending Habit Triangles to be a social app, where we could encourage each other to develop self-actualising habit patterns and retain sovereignty over our private data. Holochain is what inspired this; fall into that rabbit hole if you choose.
A new goal: create a version of Habit Pyramids that can take any type of data store. ‘Defer important decisions as long as possible’.
Whether to use traditional client-server architecture or decentralised/distributed architecture seemed like a suitably huge decision.