https://futureofcoding.org/ logo
#devlog-together
Title
# devlog-together
j

Jason Morris

01/05/2024, 6:47 PM
So I've only been a real developer again for a month, but holy cow. I would have thought keeping your data persistence layer in sync with your code would be easier than this, by now. Irritating.
s

smt

01/06/2024, 3:57 PM
someone once told me that all bugs are caused by memory being in a state that the programmers did not expect... not sure if this is profound, or useless, but still to this day, thinking about it boggles my mind
j

Jason Morris

01/06/2024, 3:59 PM
Programming would be a LOT easier if computers didn't need to remember anything when they were turned off, I've decided. 😁
These are the deep insights people come to FoC for. You're welcome, everyone.
s

Steve Dekorte

01/08/2024, 5:50 PM
"thought keeping your data persistence layer in sync with your code would be easier than this" Yes, exactly! I think if you took a close look at any large project with a UI, you find most of the time and spent writing the code (and perhaps most of the code itself) is dealing with synchronization between the storage, the model, the user interface, as well as syncing different parts of each of those layers with themselves, yet this problem is largely ignored and when it is addressed, it's only on a subset of the problem.
d

David Alan Hjelle

01/09/2024, 2:15 PM
I wonder why, exactly, this is such a (ahem) persistent problem? I can only speak for myself, but I wonder if it is because most of the solutions tend to require buying in to a "whole stack"? Meteor (an early web-dev framework) tried to fix this, I think, but they sure didn't reach a huge mindshare. I suspect because one had to use Node and MongoDB? Still, it doesn't seem like it should be such an intractable problem. Are there other attempted solutions out there in other platforms?
s

Steve Dekorte

01/10/2024, 2:11 AM
@David Alan Hjelle Yeah, I think a big part of it is that there are so many pieces that need to come together. For example, transparent persistence at the model level, efficient mutation tracking for model objects and primitives, abstractions around slots to manage all the data related to storage and synchronization, an object/graph database with on disk garbage collection, storage transactions to ensure consistency, coalesced Notifications and scheduled actions, wrappers around all events so synchronization can be managed before returning to the event loop (and which deals with quirks of the event system like Javascript having some events within others), a standard UI framework that supports the protocol, etc. These things can't just be mixed and matched. e.g. using some UI framework components that don't have the proper wrapping of events and model protocols could break synchronization.
3 Views