PMView.com

Welcome Guest ( Log In | Register )

> Sort Order Changes - Unexpected Consequences
Tannin
post Jan 21 2013, 09:05 AM
Post #1


Forum Member


Group: Members
Posts: 13
Joined: 11-February 06
Member No.: 207



Hi Peter,

I'm not sure how much help you can be with this one, so I'll just outline it as (if nothing else) a little cautionary tale about progress in general.

I am a photographer with roughly a million files archived. (That's not as many as it sounds: there are various generations of differently post-processed files in there, so often multiple files for each picture.)

Every file is named for the date and time - a picture taken right now at 11:30.05am on 21 Jan 2013 - would start with 130121-113005, for example. Various suffixes to that base filename indicate different things. An extra digit indicates multiple shots in the same second (pro cameras do 10 frames in a second); an added letter indicates what post-processing has been performed, and so on. The details of this system are not important here, the point is that (until recently!) PMView always sorted all these files in correct chronological order, including post-processed copies in their correct place, and everything was easy to find.

Alas, with the new alpha-numeric sorting algorithm since .. er .. since PMView 3.68, the files are mis-sorted! Like no longer sits next to like!

Secondly, there are the ordered selections of pictures I use to illustrate lectures: they are all long since sorted into the order I'm going to want them in when I speak (simple brute-force renaming has always perfect for this). By reviewing the pictures for a particular talk, seeing them in order again, I can quickly refresh my memory of a talk I have not delivered for a few years, and (if desired) slot in a few new pictures to update it (once again getting them in the right places by brute-force renaming). Now, of course, all my talks are semi-randomised!

Obviously, you are not going to reverse the recent change to PMView's sorting method, nor should you! In broad, it's a sensible and useful update.

But now I'm looking at hundreds of thousands of carefully archived photographs and thinking about the massive task of renaming them all simply because PMView switched to a different sort order system. I could probably automate a fair bit of it, but it will still take ... I don't know ... a LOT of work!

The alternative would be to downgrade back to old versions of PMView - not a sensible long-term policy.

Anyway, I'm not sure that there is anything you can do here, but I thought I'd spell out some major unintended consequences of an apparently trivial update!
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies
Tannin
post Jan 21 2013, 10:53 PM
Post #2


Forum Member


Group: Members
Posts: 13
Joined: 11-February 06
Member No.: 207



OK, I've done a little background reading and found some interesting and useful things about this.

First, we are in fact considering two different sort orders, not just differently implemented versions of the same sort order. The old order is called a literal sort where the new one is a numerical sort.

LITERAL SORT
  • 1
  • 11
  • 111
  • 2
  • 21
  • 3898
  • 9
  • 999


NUMERICAL SORT
  • 1
  • 2
  • 9
  • 11
  • 21
  • 111
  • 999
  • 3898


As we can see, they are very different!



Second, Windows allows the user to select which one is desired in either of two ways.

The easy way is to use the group policy editor (run gpedit.msc) and navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Explorer and ENABLE "Turn off numerical sorting in Windows Explorer".

For Windows systems which don't have the Group Policy Editor (Home Premium, for example), you need to use the Registry Ediotor. Run regedit to create a new entry in the key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer Name it "NoStrCmpLogical" use the type "REG_DWORD" and give it the value "1".

Is it worth considering restoring the old PMView literal sort order as an option beside the existing sorts which are numeric ("name" on the menu), extension, image size, image depth, image orientation, file size, date modified and date created? Perhaps I am the only PMView user who would find it useful, perhaps not, but I imagine that the code to do the traditional PMView literal sort already exists and could be reinstated.

(While I'm on the topic, or at least close to it, a random sort order would also be very, very useful, for reasons I have mentioned in an older post.)

Anyway, perhaps this information will be of use to some other users.
Go to the top of the page
 
+Quote Post
Peter
post Jan 23 2013, 10:23 AM
Post #3


Forum Member


Group: Admin
Posts: 660
Joined: 14-March 00
From: Wilmington, North Carolina
Member No.: 3



QUOTE (Tannin @ Jan 21 2013, 10:53 PM) *
Second, Windows allows the user to select which one is desired in either of two ways.

The easy way is to use the group policy editor (run gpedit.msc) and navigate to Computer Configuration > Administrative Templates > Windows Components > Windows Explorer and ENABLE "Turn off numerical sorting in Windows Explorer".

For Windows systems which don't have the Group Policy Editor (Home Premium, for example), you need to use the Registry Ediotor. Run regedit to create a new entry in the key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer Name it "NoStrCmpLogical" use the type "REG_DWORD" and give it the value "1".


That is correct. PMView 3.68 (and newer) also uses that same registry key to determine if logical or literal sort order is used. This way PMView will use the same sort order as used by Windows Explorer. The change was done based on the request here: http://www.pmview.com/forum/index.php?showtopic=414

NOTE: After changing the value of NoStrCmpLogical, you need to restart PMView for the change to take effect.

Also note that just like Explorer, PMView first looks at the policy of the current user: HKEY_CURRENT_USER\\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoStrCmpLogical
If that key is not present, then PMView will look at the policy for the local machine:
HKEY_LOCAL_MACHINE\\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoStrCmpLogical

QUOTE (Tannin @ Jan 21 2013, 10:53 PM) *
Is it worth considering restoring the old PMView literal sort order as an option beside the existing sorts which are numeric ("name" on the menu), extension, image size, image depth, image orientation, file size, date modified and date created? Perhaps I am the only PMView user who would find it useful, perhaps not, but I imagine that the code to do the traditional PMView literal sort already exists and could be reinstated.


Setting NoStrCmpLogical to "1" will restore PMView to the exact same literal sort function used in versions prior to 3.68. Make sure you don't have a HKEY_CURRENT_USER setting that conflicts (is set to "0"), and make sure you restart PMView after making the change. If you can't get it to work, please contact me so we can figure out what's going on.

Note that the NoStrCmpLogical setting only affects textual sorting in PMView: file names, file extensions, directory names, and slide notes. Non-textual sorting like image size, file size, file time, etc. are not affected by the setting.

Thanks,
Peter


--------------------
Peter Nielsen (peter@pmview.com) "If you can dream it, you can do it" JFK.
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 22nd February 2018 - 01:56 AM