Monday, October 12, 2020

The Mac Finder "Keep Both" dialog

If you select a bunch of files to copy to a different folder, and that folder already has a copy of a file with that same name, the Mac Finder presents a dialog which is nearly but also frustratingly incomplete.  The one possibility that is most likely to be useful is the one possibility that is missing.

The choices presented are:

Keep Both

Stop

Replace

A checkbox also allows you to Apply to All.

Even presuming the name of the file to be the only information that this dialog is based upon (I've talked about that before; ideally the system would compare the content and metadata and let you know if and how they are dissimilar) this is a useless set of choices.  For now I'll assume there is only one file with a particular name.

Generally what you'd want to do when consolidating a set of files would be to skip all the duplicated files, and just copy all the new ones.  Skip is not an option in the Finder dialog.  The Stop option simply drops out of the whole operation.  No further files are copied or even tested.  The Stop option is a panic escape, not something you'd want to rely on for getting work done.  If you knew you were going to be using the Stop option, you wouldn't have bothered to do the operation in the first place.

So in fact you are given no option that would be helpful in consolidating files.  You can perform the Replace option, but that wasteful of system resources including the immediate cost in uselessly replacing one identical file with another, and potentially requiring both copies of an identical file in the backup system.  (I have observed that the Mac's convenient Time Machine will under many circumstances enlarge from multiple copies of the same file.  This seems notably true when the identical files are found on different devices.)  As my stuff has grown, I'm more and more concerned about the size I need for my Backup Device which ultimately becomes the limiting factor when additional harddrives are used.

Now if it was being really nice, the system could actually test the contents of files, and not even bother warning you about identical files (instead just skipping them) and giving you the dialog only when files actually differ, and telling you the size and date information.

Anyway, the lack of basic support for what you'd want to do in maintaining a collection of files fits my conspiracy theory of commercial computer system vendors.  Their aim is not so much to assist in these tasks, but dissuade you from doing them, and instead relying more and more upon online sources of entertainment and edification instead (which will come along with the advertising and mind control, including the mind control to buy more stuff and especially buy more computer stuff).

It may be worth noting that the all the possibly defaults are available in Terminal whose shell was cloned by GNU and inspired by Unix which was designed in the 1970's to actually get stuff done, such as managing a collection of files, and not so much primarily being a vehicle for mind control.

 

Tuesday, September 15, 2020

Why Random Slideshows Don't Work

 My experience with random slideshows, using a variety of programs (including my own system based on a very good random generator) has been horrid.  I know I shouldn't believe in such things as the world being a simulation and under the control of all-knowing aliens who torture me by endlessly repeating the slides I like the least over and over, while the majority of my vast collection...and especially all the slides I really like...remain unseen, but I've gotten close to that.

I see now there are simpler explanations.

The core of it all may be the well known Birthday Paradox.  Here's a good explanation of the paradox. I still find the math to be troubling (which I shouldn't, having had a long career associated with probabilities and statistics).  But very convenient that it boils down to a very simple approximate formula, which somehow, I had already remembered (but couldn't remember why I remembered).  It's the square root of N.

In actual birthday paradox, if there are 365 days per year, the number of people you'd need to have a 50% chance of two having the same birthdays would be approximated by the square root of 365, which happens to be just above 19, but since 19 is a relatively small number, the approximation is a bit too small, and the actual number when you do the full math is 23.

I can scale this up to my Random Slideshow Paradox: with a collection of 100,000 slides chosen at random, and each being shown for 15 seconds, a duplicate slide will be shown within just over the first 333 slides, and therefore within the first 90 minutes of watching!  So you may see a duplicate in nearly every viewing session, when you'd think that might take weeks.

It does however require the non-mathematically proveable (but widely accepted) Murphy's Law to understand why this duplicate will inevitably be the least desired slide.  Murphy is somewhat helped by the fact that in this scenario, the slide shown most may become disliked.

Now, you might think it would be a relatively simple matter to apply something like a random without replacement strategy to get past this.  But it's hard to get this to work as desired without all knowing aliens.  Because without sensors, etc, it's hard for any program to know which slides you have actually seen before (because you might have been doing something else) or even presented before (because you might have been running in a different program session--and most programs don't save information like what slides have been shown previously in a permanent database) or even a different program.

Now suppose you leave the random slideshow--with replacement--running, but simply watch for 60 minutes at the same time every day.  This has effectively defeated the without replacement strategy because within only a few days it will have to start all over again.  In my 20 years of experience trying such things (but without much elaboration) I had speculated that in this scenario it was actually worse to use a without replacement strategy than not.  Thinking about it now, I doubt this is true, but unless the without replacement is fully implemented, such as by determining which slides you have actually watched by any means, it won't work very well either, as it won't prevent you from being shown the same slides within a week or so, when you've still only seen a small fraction.

And no matter how well you were being watched by the program, it would not help with situations like having a bunch of very similar slides, or even identical copies (as I used to have before I wrote a program this year to weed them out).

Now the parameters to a well designed solution to this problem are slowly coming into focus.

But the first thing to point out, is that until some program has the necessary features built in, it will be necessary to fake it.  It will be necessary to feed the slideshow program a specific playlist, which could be assembled by some partly random algorithm, to get it to do the correct things.  So every time the slideshow presenting program is started up, the playlist generating program should create the playlist, which then must be played in non-random order, and preferably without looping.

The slideshow generating program should attempt to balance things many ways.  First, by avoiding timely duplication.  Second, by making sure every slide gets shown about as reliably as reasonable (the inverse of the Birthday Paradox, even with more than 365 guests there will be many still birthdays not present).  Third, it should account for the desirabilities and similarities in the files by assigning weights to individual pictures, possibly on a per-folder basis.  The goal is to undo the evil aliens and arrange things so that I experience few timely repetitions, nearly every slide gets shown (this may actually be more important), but generally more of the slides I like most.

The same considerations apply to playlists of any kind, not just still pictures but movies and songs.

I don't like being watched, so I'll leave that kind of thing out of my proposed playlist generating program.  But it may attempt to approximate that by various means, including keeping a database about previously generated playlists.  Various functions could be applied to approximate the "slides actually seen" function.  The first would be to apply "windows" to previous playlists.  The most obvious window is at the beginning of the playlist, the first hour or so perhaps.  A day later, the pictures within the first hour of presentation time may be semi-presumed to have been seen and should be put later in the next playlist.  A fancier version might account for viewing times at certain hours of the day, but at minimum the Early Window should be adjustable, and I think 1-2 hours is good.  These could also be applied on a daily basis at the same times for a Daily Window.

Another heuristic would be to move up things which probably haven't been seen.  If a playlist of 14 days duration were replaced within 2 days, we could assume the last 12 days were not shown.  Perhaps the user should specify how many days/hours the previous playlist was actually used, defaulting to the number of hours since it was created or how long it was.  In other cases it might be better to apply a function of deceasing probability of having been seen across the entire previous playlist, though I'm not currently seeing how to do it other than badly.

The general principle behind these heuristics is to approximate a probability function of each slide having been seen, and thereby better approximate a without replacement strategy across multiple slideshow sessions using subsequently created playlist.  But it should also be remembered it is only an approximation, more likely fewer were seen than presumed by any reasonable algorithm.

The assignments of desireability weighting is probably also best done on a folder-by-folder basis (as it's too time consuming to weight every single slide).  Less desirable slides can be placed in subfolders as needed.  Weights need to be made widely variable down to infinitessimal numbers because of the exponential nature of the probabilities involved, but probably expressed as multiplicative inverse so that tiny weights because large numbers are easier to express than small fractions.  Such as "show the slides in this folder 100 times less than average."  

The playlist generating program itself has remembered-parameters detailing things like the above, which themselves could be stored in reloadable meta playlists, but then also further customized before each generation.  And the databases of previously used playlists (which should be editable to remove unused ones) may or may not be associated with a particular meta playlist.

Finally, since I've already created the Collection Assistant program I might have previously described here this year (after years of never having time to sit down and write it, I wrote the program in a week or so in 2020) I can make the slideshow generating program work off of lists created by that program which include checksums for unambiguous recording of file identity (otherwise you are stuck with filenames and folders that rigidly can't be changed because previous databases rely on them staying the same, and I am changing my folders around all the time to better reflect my interests).






 

Tuesday, July 28, 2020

No Account Bypass

Nearly every online store wants you to create an online account, so they can have an excuse to email you endless advertising, on top of all the other entities emailing you endless advertising.

I'm inconsistent about creating such accounts.  If I really like the merchant, I might (and then immediately set my account for no extraneous emails).  But I already have so many accounts with so many different passwords, it's become a mind boggling morass.

Today I tried to make a small but necessary purchase at HomeDepot.com.  While in the past I recall being offered to skip the account business and just make a one-time purchase, this time it did not present me that option.  I was only allowed to sign in, or not make the purchase.

I tried for several minutes to log in.  Then, giving up, I asked to get an email to reset my password.

Several minutes later, no email from Home Depot appeared.  I checked my spam folder (and I really, really need to write another critical essay about spam filtering--the whole "spam" business is social destruction through which I often lose contact with friends because of stupid or perhaps deliberately-social-destroying spam filtering).

I tried once again to make the purchase without signing into my account.  Strangely that page seemed to appear, then immediately disappeared, replaced by the one which gives no other option than to log into your account.

The purchase would not have been made today, except that I finally remembered my old password.

Many minutes later, I have received neither my password reset nor my purchase confirmation from Home Depot, and I keep checking my spam folder too.

Tuesday, July 21, 2020

Shutdown with Impunity

One thing I miss most from Unix systems, in "personal" systems like Mac and PC, are the old hard shutdowns.

When you did shutdown, you could choose to give "other users" a minute or two to shut down, or just  shutdown right now.  On my own systems I just did "now."  Even on systems I managed, as I had already shepherded all users off by that point.

And the systems would come down right now in a second or two, even with cached file systems (though, theoretically those could cause some delay, but usually caches were generally empty by this point).

But now we have microprocessors which are 1000 times more powerful than the original Unix minicomputers, and they struggle for minutes to shut down, frequently giving up because this or that process declined to accept the shutdown order.

Typically, such an application might have modified project work that the user hasn't written out yet.

In nearly all such cases, if I hadn't actually written something out, when I give a shutdown order, I didn't intend to.

I would be fine with going back to hard shutdowns.  But if not, could it be some sort of preferences option?  Or maybe a different kind of shutdown, slow vs fast, for example.

Or maybe somehow get all the things that want this or that state saved, to present all their demands more quickly, or even  in some kind of integrated way, rather than having to wait for minutes for each different program to responde...why are they so slow in doing that?

iPhone 8 Plus temporarily bricked by IOS 13.6 update

I had my phone plugged into Mac to transfer some photos.  iTunes advised me of an update.  This was the second time.  I'd been pretty much lulled into accepting iPhone updates.

Now my phone won't connect to the Sprint cellular network.  Apparently it can do wifi but not cellular.  It just says Searching.

I found an Apple forum page on this which was useless, people complaining about the same kind of problem going back to 2011.  But then I found several very similar help pages, which gave a list of things to try, starting from a restart.

So far I've tried a normal restart, and then a hard restart--didn't seem any different, except one time it sort of froze with the Apple logo appearing for 15 minutes, then I did the hard restart to get try again, which went better the next time.  And then various resets, which didn't seem to do anything, didn't have to re-enter my wifi password even.

I came to the update carrier settings.  It's weird how you get to this, under your name.  But the carrier settings showed the correct version, but didn't alternate to other settings when you clicked on it (as it does when the phone is working correctly).

There were many little issues I needed to face upon doing a "Restore," which is what is recommended after you are unsuccessful trying to "Update Carrier Settings."

After running the Restore for awhile, it put up a little window (which might be easy to ignore) saying the Restore could not be done until I went into the phone settings, into the Cloud settings (which are under your name itself...so central is the cloud supposed to be to your existence) and turned off the Find My iPhone feature.  Somehow, the restore couldn't proceed without that being turned off, and it couldn't turn that off by itself, and if you failed to handle that message, as I apparently did the first time around (because I was busy with my photos and blogging) you would be stuck without your carrier settings getting updated completely.  I sort of know that now as fairly soon after I had handled turning off the "Find My Iphone" (which took some time, as I'll describe below) during the restore, THEN it immediately proceeded to update carrier settings, boom, and there seemed to be no issue with them after that.

Well, that created another issue, because in order to change any of the Cloud settings, including the Find My iPhone feature, you need to enter the password for your Apple ID.  The particular Apple ID that you had previously used when you purchased this phone (or one of it's predecessors).  That ran square into the fact that the Apple ID that the phone demanded that I log in for, is an old email address I haven't used in 10 years and am now totally unable to access, and there is no way to change it to anything else, until you first log in so you can change it to something else.

Fortunately, I ultimately managed to guess my old password.  I'm not sure what I would have done otherwise.  I spent an hour unsuccessfully trying to get it to use my other AppleID first, but it wouldn't do that until I logged in first so I delete the old ones and sign out of the old AppleID account.

This time I have made sure to turn everything associated with the cloud "off."  Now it appears it won't even let me log into the cloud.  After I refused to allow the cloud to use my location information, it simply hung trying to log into the cloud.  But after I was able to dump that window, everything seemed normal, so I'm not sure if I'll have to face all the music all over again on the next upgrade.

This time, at least, I've written down the passwords for both my old and new AppleID's, so if this issue comes up again I'll be better prepared.

Morals:

1) Make a paper list of all your passwords and copy it frequently
2) Allow for days of debugging time after every iOS update.  Don't do so before vacations or important meetings.
3) Allow the update process, even if running on a computer, to proceed in full view, not to be covered by other windows or distractions.  Do not be in a great hurry to get your phone again, and be prepared to work through every set of update issues thoroughly as they come up.

Design issue:
If an update isn't 100% complete and approved, a reboot should bring back the old version rather than loading a corrupted state.  (It's been the other way so many times, it's hard to even think in such radical terms.  But this is clearly the way things ought to be.)  This ought to be a central consideration in design for frequently auto-updated devices.

Knowing the need to turn Find My iPhone off, the queries involving that should have been at the very beginning of the update process, rather than awaiting downloading and other steps where it might be overlooked.

More generally, questions and issues for a batch process should be present as close to the beginning of that process as possible, following by a predictable reliable conclusion.






Friday, July 3, 2020

Replacing Racially Loaded Terms

I was here 22 years ago.  My office had discussion about replacing the "master/slave" terminology for our compute farm.  The Boss didn't see any problem with the words, saying they had long technical history.

I felt that "slave" was not an accurate description of what our compute servers were actually doing.  But I had trouble making any other word stick.  For quite awhile, hand waving replaced the words rather than better words.  Then we were back to Master/Slave because everyone knew what it meant.

But I'm glad to see Twitter Engineers fixing this, and they have some good word choices.
  • Whitelist becomes allowlist.
  • Blacklist becomes denylist.
  • Master/slave becomes leader/follower, primary/replica or primary/standby.
  • Grandfathered becomes legacy status.
  • Gendered pronouns (for example "guys") become folks, people, you all, y'all.
  • Gendered pronouns (for example "he" or "his") become they or their.
  • Man hours becomes person hours or engineer hours.
  • Sanity check becomes quick check, confidence check or coherence check.
  • Dummy value becomes placeholder value or sample value.

Wednesday, June 24, 2020

$120 per month cellphone hell

Last month I found I was paying $120 per month for Sprint service with a four year old iPhone.

Does that sound right to you?  It doesn't sound right to me.  It seems my friends are paying less than half that much for newer phones.

This just seemed to creep up on me.  In 2014 I remember originally buying a new phone for $22/mo payments with $60 "unlimited" service, when my previous $50/mo service at AT&T was not unlimited, so I thought that was a better deal than AT&T.  Original payments were indeed about $82 per month, as I had expected.  That didn't seem unreasonable, consider I was also getting a brand new iPhone 6S Plus, the ultimate, with no trade in.  I believed I was also signed up for "iPhone Forever" which would let me get a new trade-ins Every Year.

About 14 months later I went to another Sprint store, asking about my upgrade.  They told me I couldn't actually upgrade to a new phone without paying a few hundred dollars.  They said my plan only permitted "free" upgrades every other year, and I had to pay extra to upgrade Every Year.  So I declined.  I must have had some misunderstanding, maybe I got the cheaper iPhone Forever plan, or maybe they sold me some other kind of lease, these things are so complicated it's hard to know what you have actually signed up for.  In the store, you wait around for an hour or more, and when they do see you it all goes by very quickly and the choices you have are far different from what you might have expected, and then it all comes out in an unintelligible mass of printed receipt and/or email.

Sometime in 2016, I really wanted to get an iPhone 8S Plus.  It was well over 2 years since my original contract, I figured this should be easy.  But it was hard.  I don't recall if I did have iPhone Forever, but I recall not wanting to keep it if I did.  I purchased the old 6S Plus for my electronics collection for what sounded reasonable $200 or so, and thought I would be purchasing my phone over time, which cost a little more than my previous lease.  Since I was somewhat concerned about breakage, I got insurance, which I recall cost about $10.  It all came to $90 something, which sounded OK at the time.

I remember this as an especially unpleasant upgrade experience, not that it took long though.  I had to keep remembering passwords, which I couldn't remember.  To make it worse there seemed to be both a phone passcode, and a carrier passcode.  I could only remember the phone passcode.  Eventually the process was completed, and I hoped not to go through it again.

My payment did go up, but I expected it to because it was purchase instead of glorified lease.  Since I was no longer on iPhone Forever, or at least they seemed to tell me that, I should eventually pay off the phone and own it, or so I thought.  When that had happened to me with my first iPhone on AT&T, after about 2.5 years my payment actually dropped down.

Instead, payments just seemed to go up and up every few months like cable service.  I got some notice about changes in the "insurance "plan that didn't look good at all.  It looked as though if I were to break my phone, I'd only get a discount on a new phone, which maybe wasn't worth that much.  But, generally speaking, I had a full time job and far too many other concerns to bother cancelling a $10 (and later $15) extra monthly charge, and maybe I'd actually use the insurance after all.  So I didn't make any changes, though I thought if I were a penny pincher, I would.

And the monthly charges seemed to rise and rise.  So what at one point was little more than $90, I though, nearly 4 years later not only had my payment not fallen from having paid off the phone, it had shot up by $25 bucks or so, without my having changed anything.

Finally, after over 2 years of wondering why I was being ripped off so badly for cellphone service, but having far more important concerns than saving $30 next month, I finally got around to trying to get my cellphone bill lowered, by purchasing the phone outright, getting a cheaper service plan, and cancelling the "insurance."

It was a 4 hour online and text chat experience worthy of another post. Endlessly frustrating and laced with anxiety that there would be some screwup, and I'd have to start all over again, or I'd have all my phone payments forgotten, end up owing far more, or endless other mishaps.  Except for COVID-19, I would have preferred to go to a store, even though I know those aren't necessarily sweet and easy experiences either.  This time it seemed like my first two "chat" experiences weren't even with a real person, but it seemed my 3rd and successful time was, though there were 10-20 minute pauses between texts when you wouldn't know if anything was going to happen, or end up with a screwed up account.  Ultimately my 3rd and successful series of texts spanned 90 minutes.

It wasn't at all clear the agent was trying to me much money.  It seemed more like they would prefer to sell me a new phone and new contract just like before.

When I insisted on lower payments, they suggested what seemed like only a small change in my service price (which had apparently risen to $70 somehow).  I insisted on removing the insurance and buying the phone.

Actually I had started this process by figuring out how to access my online account again.  That took awhile, but I did finally remember my password and username.  Then I saw numbers like thise:

Monthly Lease: $33/mo  (ok, I can see how that would contributed to a $120 bill)
Purchase: $238

It doesn't take much math to see that the purchase price is far less than the monthly lease for another whole year.  But nobody suggested this change.  I insisted on it over and over and it took another 60 minutes to get the deal done over text, and even then I had to complete the purchase online on my computer, where it wasn't obvious that the $220 charge was the $198 price I had agreed to (with tax and charges).

I clicked on the box which said "purchase phone" and a little box popped up and said I had to use chat to do that.  First tried the online chat, which got nowhere, it said it couldn't do that either.  I then proceeded to do chat from my phone, from the phone Sprint app, which led me to texting with "agents", which took in all about 2.5 hours.

It was bad, though not quite as bad as with the old XM Radio service...

Now I think I've got it changed like I wanted anyway.  I purchased my phone for $200 plus tax and switched to $50 unlimited plan with no insurance.  My new payments are supposed to be just over $50 per month.

We'll see.

Actually, the Sprint website actually advertised a $35 unlimited service, and provide your phone.  But the agent over text told me I could not get that plan.  He said I could get the 55+ plan.  I couldn't get an answer as to whether that was the cheapest unlimited data and text plan I could get.  That's the way it goes, they offer something off the shelf and it's take it or leave it.  And leave it means you'll have to buy another phone, most likely.  (So I may still be paying a $15 idiot tax, at least.  Somebody smart probably wouldn't have paid that.)

The way the industry has structured itself, you don't really have much choice, unless you really just want to keep buying $1200 phones every two years.  If you have a Sprint phone you are locked into Sprint, because their radio system is not the same as with other carriers.  And so on.  You feel like you are trapped in John Steinbeck's novel The Pearl.