The navy operates a lot of complicated, expensive machinery. If you don't do it right, things can break or people can get hurt. I think the idea originated in Rickover's nuclear power program. They came up with an "operational sequencing system" to bring a reactor online and operate it safely.
It was later used in conventional engineering plants with 1200 psi steam, which can kill you pretty dead. It was personnel safety that drove the adoption in the conventional (fossil fuel) surface navy. It was later adopted for combat systems, as they became more integrated and automated. The intent is to ensure that everything that needs to be done is done in the proper order. It's part of the navy's culture now.
So I exercised MOSS this morning, the "marmot operational sequencing system." Sounds complicated, but it's not really. It's necessary, I think, to keep iCloud from screwing me up.
I turned on "Close windows when quitting an application" in the Windows pane of the Desktop and Dock Settings of System Settings. I trust this informs iCloud that a document isn't currently open in an app anywhere (if you do this on all machines logged into iCloud), so it should be in a "closed" state (probably not the correct technical term) in iCloud Documents.
I believe that setting should also have the effect of not having an app open all the windows that were open when it was last quit, since they all should have been closed. But I'm not sure about that, so that's another risk I address in this sequence.
So I quit Tinderbox, Automator, Script Debugger and Whisk on the MBP, which closed all their windows.
Over here on the iMac, I didn't launch Tinderbox from the Dock, where it has a permanent presence. Instead, I double-clicked the marmot from the Documents folder in iCloud. Presumably, this downloaded the latest version, which had been closed on the MBP.
It was interesting, because the "Date Modified" time in Finder was "Today 00:34," and I'd been in bed for more than a couple of hours by then, and the MBP was closed and presumably sleeping too.
And now here I am, on the big screen.
I think what used to happen, before I was this careful, was that I'd quit Tinderbox on either the iMac of the MBP, thinking that I couldn't have the marmot open on two different instances of Tinderbox on two different machines without iCloud getting confused.
But since I didn't "Close all windows when quitting applications," I'd launch Tinderbox on whichever machine I was switching to, and it'd load a locally stored version. (All versions are only stored locally.) That version would be out of sync with the iCloud document, but since the document contains code that runs in Tinderbox, as soon as it launches, it updates the "Modified" state with a later time than the one in iCloud, that becomes the canonical version that iCloud happily uses to replace the one in iCloud, and data is lost and no "version" or Time Machine backup is going to restore it.
I don't know what would happen if I didn't "Close all windows when quitting" and then double-clicked on an iCloud document causing Tinderbox to launch, and it tried to re-open all the windows (documents) that were open when it last quit. Would the user be alerted to a conflict? I'm not going to try and find out.
I have no idea if that's what actually happens, it's just a guess. I can't imagine that apps on launch query iCloud to see if the modified date of a locally stored version is earlier than the modified date in iCloud and download the latest version. I don't think iCloud sends a signal to a launching app that, "New shit has come to light, man," in the parlance of our times. (It makes sense if you're an Urban Achiever.)
But I think this will allow me to switch between machines without losing data. I have recreated posts from the html export data before, but that's a bit of a pain. I know I let a couple of posts just disappear a few times,"deathless prose" notwithstanding.
Anyway, it's nice to be back on the big screen. I can blog without my glasses on the iMac. The screen is too far away on the MBP, especially in the recliner! But it's nice to know I could take the marmot outside if I wanted to, or take it on the road, without having to futz with the thumb drive. That poses its own issues, copying files back and forth, not losing the little thumb drive, etc.
Originally posted at Nice Marmot 07:18 Sunday, 25 February 2024