I'm not sure how to handle a problem that has come up under testing. So I'll try to explain it here as if it were important for anyone else to understand it, and maybe that will help me decide.
The problem is that now it is possible to swich back and forth between chronological, alphabetical, and numeric page types. Chronological pages use time (although through an intermediate layer, so it is possible to [edit] a post and change it's position on the page without changing the 'posted by x at ....' datetime.) Alphabetical and numeric pages each use a serperate field in the database for keeping track of those keys which are used to order the posts either alpahbetically or numerically.
So if you make an alphabetical page, fill it with some posts (supplying an 'alphabetize by:' key with each post,) and then switch it to a chronological page, there is no problem. The system uses the datetime of each post to determine the new chronological order. And it doesn't erase the 'alphabetize by:' key, it just ignores it. So then if you swich back to an alphabetical page type the page will return to the old alphabetical order. Cool.
The problem happens in the other direction. If you make a chronological page, fill it with some posts, and then switch it to an alphabetical page, the system will have no 'alphabetize by:' information to work with. If the newly alphabetical page has its window set to zero (infinity - every post displayed on the page) then all the posts will print out. But if the window is set to a number less than the total number of posts, you will see just that number, but with no link at the bottom to see the next page worth of posts.
The solution is to go into [editpage] and set the window to zero, then you can access every post from the page in order to [edit] and provide an 'alphabetize by:' key. But I don't like this because it is not readily apparent what is happening. If you make the switch to an alphabetical page, and have a window, then it appears like some of your posts disappered. That is not good. Seems like there should be a warning or something letting you know what happened.
But where does the warning go? I guess when you submit the [editpage] that makes the change from chrono to alphabetical the system should check for this scenario and then warn you before returning you to the page. Maybe it should force the window to zero as well, so that when you are returned to the page after seeing the error message you will at least have access to each [edit] link so that you can fix the problem.
Or maybe all the posts should come up on the error screen together with the 'alphabetize by:' field so you can just fix everything on one screen instead of having to click each [edit] link. That sounds like the best option, but what if there are 500 posts on your page? That will make a pretty big error page. Hmmm. Maybe it's still OK.
Anyway, this is the only problem I am finding during some pretty intense testing. I want to write something soon about testing. It's just dawning on me that "real" programmers have very strict methods for testing code. To the point where it seems that a major part of any software project is to design an additional piece of software that can test the first one. This is something I still don't understand, especially in any formal sense, but just through knocking my head against the wall I'm beginning to understand intuitively what is necessary. And it's way more rigorous than the "just try a bunch of different things by hand and try to break something" approach I've been using. I'll have to consult one of my real programmer friends about this issue.
|
The problem is that now it is possible to swich back and forth between chronological, alphabetical, and numeric page types. Chronological pages use time (although through an intermediate layer, so it is possible to [edit] a post and change it's position on the page without changing the 'posted by x at ....' datetime.) Alphabetical and numeric pages each use a serperate field in the database for keeping track of those keys which are used to order the posts either alpahbetically or numerically.
So if you make an alphabetical page, fill it with some posts (supplying an 'alphabetize by:' key with each post,) and then switch it to a chronological page, there is no problem. The system uses the datetime of each post to determine the new chronological order. And it doesn't erase the 'alphabetize by:' key, it just ignores it. So then if you swich back to an alphabetical page type the page will return to the old alphabetical order. Cool.
The problem happens in the other direction. If you make a chronological page, fill it with some posts, and then switch it to an alphabetical page, the system will have no 'alphabetize by:' information to work with. If the newly alphabetical page has its window set to zero (infinity - every post displayed on the page) then all the posts will print out. But if the window is set to a number less than the total number of posts, you will see just that number, but with no link at the bottom to see the next page worth of posts.
The solution is to go into [editpage] and set the window to zero, then you can access every post from the page in order to [edit] and provide an 'alphabetize by:' key. But I don't like this because it is not readily apparent what is happening. If you make the switch to an alphabetical page, and have a window, then it appears like some of your posts disappered. That is not good. Seems like there should be a warning or something letting you know what happened.
But where does the warning go? I guess when you submit the [editpage] that makes the change from chrono to alphabetical the system should check for this scenario and then warn you before returning you to the page. Maybe it should force the window to zero as well, so that when you are returned to the page after seeing the error message you will at least have access to each [edit] link so that you can fix the problem.
Or maybe all the posts should come up on the error screen together with the 'alphabetize by:' field so you can just fix everything on one screen instead of having to click each [edit] link. That sounds like the best option, but what if there are 500 posts on your page? That will make a pretty big error page. Hmmm. Maybe it's still OK.
Anyway, this is the only problem I am finding during some pretty intense testing. I want to write something soon about testing. It's just dawning on me that "real" programmers have very strict methods for testing code. To the point where it seems that a major part of any software project is to design an additional piece of software that can test the first one. This is something I still don't understand, especially in any formal sense, but just through knocking my head against the wall I'm beginning to understand intuitively what is necessary. And it's way more rigorous than the "just try a bunch of different things by hand and try to break something" approach I've been using. I'll have to consult one of my real programmer friends about this issue.
- jim 12-06-2001 6:13 pm