hal9k
Junior Member
Posts: 87
|
Post by hal9k on Aug 30, 2022 10:57:56 GMT -5
Thanks, Mr. Decker. The program was meant to replace a paper log of book checkouts at the drive-up window. The old way had a sheet with a row for each shift and the worker would add a mark (|) for each transaction and then write a total at the end of each 1-hour shift. These sheets of paper were then collected by the library manager who manually determined monthly totals for her reporting requirements.
As a volunteer who works some shifts at the window, I thought it would be better if I could automate the process. It was well received by the other workers, but I think management did not like the random over-reporting that the program was creating. So, rather than waiting for me to eventually stumble on to a solution, they decided to go back to the paper-based method. I'm not at all happy about this, but I can see their point.
|
|
|
Post by Rod on Aug 30, 2022 11:16:08 GMT -5
Aha! You were automating the single reason the manager existed. Not unsurprisingly things went awry. First automate the book count then automate the shift scheduling. No wonder you were cancelled.
|
|
|
Post by Walt Decker on Aug 30, 2022 15:12:56 GMT -5
How long were you working on the project before it was cancelled?
If it is a relatively short time, you might convince the manager to give you another week. Point out that the Dewey Decimal System was not invented in a day and developing a computer application is no less complicated.
I suspicion that the problem is with bmp buttons and your reporting routine.
I think that if you use a SUB for both buttons and encapsulate the reporting routine the problem will eliminate itself.
|
|
hal9k
Junior Member
Posts: 87
|
Post by hal9k on Aug 30, 2022 18:52:03 GMT -5
Final update for those rugged souls following my sad saga. I found the problem. I apologize for wasting so much of your time. Since I'm a newbie to LB, I was concerned that there was some LB behavior that a mere newbie wouldn't know about so I sought help from the experts. It turned out to be a simple logic error.
I did a lot of unit testing, but I didn't do enough system testing. To experience the problem, you have to enter some daily data for a few shifts. Then on the next day, you will experience the problem when you click on ADD during one of those shifts. During the new day startup processing I zero the daily totals on the disk AFTER I load the array from the disk. So the array still has the previous days totals in the daily row. The screen shows 0's and the file contains 0's, but the array contains stale data.
Thanks again and I'll try to not waste your time in the future.
|
|
|
TKN file
Aug 30, 2022 22:12:34 GMT -5
via mobile
Post by tsh73 on Aug 30, 2022 22:12:34 GMT -5
Glad you found it. Could you elaborate a bit about unit testing you do? I don't think it got mentioned on forum at all so I wonder how it could be done in LB.
|
|
hal9k
Junior Member
Posts: 87
|
Post by hal9k on Aug 31, 2022 9:55:28 GMT -5
Not sure if I'm using the terms correctly. By unit test I meant that I put temporary print/notice commands throughout the program and then insured that every code path was exercised and yielded correct results. In this case it meant testing the events associated with the three buttons, testing the report contents, and testing file integrity. I even simulated a new year condition. Clearly I failed to test the array integrity and didn't do enough testing of the new day scenario.
Since there is only one program I didn't really do system testing where I would insure that the program interfaces correctly with other programs. I SHOULD have simulated 2 days usage where I would have seen that stale data is left in the array on the second day.
|
|
|
Post by Brandon Parker on Aug 31, 2022 17:31:35 GMT -5
After being absent for a few days and just reading through the recent posts, the issue described is exactly what I was thinking before I got to the results. It's awesome that you were able to work through the problem and resolve the issue. Now...give it back to the library and propose the use of both systems for a few weeks/months. Using both systems will allow for comparisons, and using both for a few weeks/months will allow for comparisons over time with respect to check-out and check-in activities. When it works, I am sure the manager will be patting themselves on the back for implementing a system that increases efficiency... {:0) Brandon Parker
|
|