قالب وردپرس درنا توس
Home / Mac / Mojaves App Store is confusing (and how to make dates in software) – The Eclectic Light Company

Mojaves App Store is confusing (and how to make dates in software) – The Eclectic Light Company

Apple seems very proud of the new application "Marzipan App Store in Mojave", and in technical terms, it is a good proof that this system for porting iOS apps can run in macOS. It's a shame that a little more attention was not paid to the way it works. I do not know how you feel, but at first it is outrageous, and sometimes annoying.

For example, take his Updates view. There is so much mistake here that it is close to being disfunctional and is often misleading. The previous App Store app provided a timely list of (almost) all the updates you had installed, although Apple recently recently manipulated this disc, such as removing old versions of MacOS for no good reason. [19659002] When it comes to displaying updates, this new version has its own mind. It sometimes only shows a specific update there for a few minutes. It pops the list when and when it feels and does not pay much attention to how long the update was installed. Few, but allowed to stay longer than a few days, apparently bypassing the extent of the very limited memory. If I can remember as far back as a week ago why can not this amazing new app?

Its list of updates is extremely wasteful of space. All I want to see here is the name and version of the update and when it was installed. However, in a large window, the app can show no more than about 1

4 updates when it can retrieve them.

But the most bizarre behavior is the way it calculates how long each update was installed. This may seem like a small point, but almost every time I look at the list of updates, it causes me to stop and check. At first, I thought it could be locked in Pacific Standard Time, even though I opened the UK App Store from local time in the UK. However, when it is reported that an update was installed X Days Ago, it does not use a human concept, but for a machine database.

What it does is to calculate the time difference between now and the time the update was installed. For example, if it is between 1 and 2 days, it reports that the update was installed yesterday; if it was between 2 and 3 days ago, it was installed 2 days ago. This has bizarre effects.

Let's say I updated the Y app at 1800 local time the day before yesterday. In human reason, this morning it happened three days ago. But until 1800 today, the App Store list of updates claims that Y was updated 2 days ago so suddenly it reported 1801 that it was installed 3 days ago . It may be the date computations work in MacOS (that's, I'm using them in my apps), but that's not what this person believes.

It's a small point I know. But almost every time I look at Updates I'm looking forward to stopping and jigsaw puzzles. Alternatively, I can only ignore the information it provides and I am now on my way to acknowledge that the Updates ] page is next to useless and just annoys.

What's most annoying is that this has nothing to do with iOS or marzipan – it's just bad design and lack of interface testing. There is no point in putting marzipan on a cake that is not fully baked.

Addition: A Lesson in Data Billing

Everything becomes easy when you hit the problem correctly and perform all local time calculations.

What the App Store app is currently calculating the number of 24-hour periods that have passed since the update was installed, it is the truncated integer result of the time interval divided by 24.0. It's not the case that most people evaluate the elapsed time of days, for example. Yesterday, two days ago (although I think some cultures can see this differently).

What most people do is to consider date, not the time interval that has passed. So if the date (day number) has changed, we estimate that this event occurred on another day. The difference with comparing dates is that in most calendars months have irregular lengths, so the calculation of how many calendar days have passed will become cluttered.

It's much better to reframe the issue as to how many midnight series have passed since the update was installed. It is easily calculated from the time interval since last midnight (ie the time difference between 00:00:01 today and current time) and the time elapsed since the update. If the latter is smaller than the previous one, you know that the update was installed today; otherwise all you have to do is calculate the truncated integer of the time interval between the update and last midnight divided by 24.0.

The person who implemented this calculation in the App Store app forgot the last midnight roll in the calculation required.

Surprisingly, although this is a fairly common data calculation and performed correctly in Finder and in other parts of MacOS, it is not easy to access the NSDate class in MacOS public domain.

Source link