The problem to solve with the site is the slide show of the art goes sequentially through all paintings, regardless of the page from which the show was called. A good solution is the Visitor sees in the slide show only the paintings appropriate to that show.
So. It's a puzzle as the information that got the slide show running is long gone by the time a picture appears on your screen. As each new picture is displayed, it can be told to look up the information again but what a lot of overhead. It will read the information file for every pic.
The thinking now is whether that is such a terrible thing. The information file is a simple flat organization that is the flat-out fastest way to load data into a machine. There are faster ways but nothing that would be of practical value in this exercise (e.g. using EXCP on an IBM system or machine code on any system).
This is the Pause to Smoke a Bowl while I consider the solution. It would be a bitch to decide the overhead is ok and start writing when ... suddenly it occurs to me that I should have done something else. That sucks bad so I must review.
* * * SHAZAM * * *
Reefer saves the programming day once again. There is no double overhead as the next page in sequence in the slide show has to look up the information anyway to set which way people should go when the Visitor scrolls out of it. What I need is some logic in that same search to add a check for the show name if one was given.
So I know which pic I have now. I also know the show. So I look at the previous pic and the next pic. If I'm just doing a show to include all pics then that's all the work I need to do. But. If a show is present then it checks to match that. If not then keep going back or forward to find the nearest match.
If you don't find a match then ... make the previous and next links go back to the calling page just like clicking on the main. If there is only one other match then previous and next will go to the same place.
Hmm. I do think it's in the bag.
Programming isn't writing the code as what you do is think up something you want the computer to do. With that in mind, you only need to learn the verbs to find how to make it happen. Learning the verbs can be a trial sometimes but nowhere near as much if you know what you want to do.
The above carried me and very well through more than thirty years of programming. In short, if you can think of it then you can write it.
So. It's a puzzle as the information that got the slide show running is long gone by the time a picture appears on your screen. As each new picture is displayed, it can be told to look up the information again but what a lot of overhead. It will read the information file for every pic.
The thinking now is whether that is such a terrible thing. The information file is a simple flat organization that is the flat-out fastest way to load data into a machine. There are faster ways but nothing that would be of practical value in this exercise (e.g. using EXCP on an IBM system or machine code on any system).
This is the Pause to Smoke a Bowl while I consider the solution. It would be a bitch to decide the overhead is ok and start writing when ... suddenly it occurs to me that I should have done something else. That sucks bad so I must review.
* * * SHAZAM * * *
Reefer saves the programming day once again. There is no double overhead as the next page in sequence in the slide show has to look up the information anyway to set which way people should go when the Visitor scrolls out of it. What I need is some logic in that same search to add a check for the show name if one was given.
So I know which pic I have now. I also know the show. So I look at the previous pic and the next pic. If I'm just doing a show to include all pics then that's all the work I need to do. But. If a show is present then it checks to match that. If not then keep going back or forward to find the nearest match.
If you don't find a match then ... make the previous and next links go back to the calling page just like clicking on the main. If there is only one other match then previous and next will go to the same place.
Hmm. I do think it's in the bag.
Programming isn't writing the code as what you do is think up something you want the computer to do. With that in mind, you only need to learn the verbs to find how to make it happen. Learning the verbs can be a trial sometimes but nowhere near as much if you know what you want to do.
The above carried me and very well through more than thirty years of programming. In short, if you can think of it then you can write it.
No comments:
Post a Comment