This morning's coding error



  • A project I did a few months ago contained as part of the UI, "a list of things" (for this story, it doesn't matter what they were) but only the most recent 20 were actually visible when you first loaded the page.  So, if you wanted to see 20 older ones, there were scroll up and scroll down buttons.

    Me, I just implement this stuff.  The boss sketched out the UI and all he asked for was those page up and page down buttons.

    Last week, he came back and said that we needed a list of pages so that people could jump right to the page they wanted.  ok, no problem.  That's easy.  Took me two minutes.  TotalRecords \ RecordsPerPage.  So now he's got 7 numbered pages that he can jump to.

    Well guess what, I made a mistake.  There should have been 8 pages.  Not a major bug, but a bug nonetheless.  This kind of thing happens sometimes when you come back to a problem just to add a feature.

    But here's why I tell this story: see, even though you couldn't jump directly to the last page, the original "page down" button was still there and still working just fine the same as it always had.  Well apparently, they were all sitting in a meeting yesterday looking over this "list of things" and they jumped to page 7 and realized that the data from the beginning of the month wasn't there - and nobody thought to hit the page down button.

    The email I got this morning says that the data's not there.  I just think it's interesting from a useability standpoint.  People don't use "next page" buttons I guess.  They had been using the "next page" button for all those months.  When there is no next page, the next page button goes away.  So the fact that it was there on page 7 should have made it obvious that they could click it and get to the data they wanted.  But with the list of pages, it was like they suddenly became blind.  I find things like that very interesting.



  • It possibly shows that direct access to things is more natural to users than a back/forward interface.

    So natural, in fact, that they forget about the page browsing interface.



  • You really expect all of those manager-types to remember that they have to go to page 7 and click 'next'?  How are they going to remember all of that?  It's hard enough remembering there are 7 pages!  Oh wait, there are 8!



  • @tofu said:


    The email I got this morning says that the data's not there. 

    This sentence made me think of something else. Unless I had that problem in mind, I would assume the email was referring to actual data loss. Then I would waste several minutes confirming that, yes, it was still there in the database. Then emailing for clarification... etc.



  • @dhromed said:

    It possibly shows that direct access to things is more natural to users than a back/forward interface.

    So natural, in fact, that they forget about the page browsing interface.


    Yep, I think you're right. It's a good thing to learn.



  • @R.Flowers said:

    @tofu said:


    The email I got this morning says that the data's not there. 

    This sentence made me think of something else. Unless I had that problem in mind, I would assume the email was referring to actual data loss. Then I would waste several minutes confirming that, yes, it was still there in the database. Then emailing for clarification... etc.



    Yeah I just "love" those kind of e-mails.  I get them all the time from clients....

    "OMG the sky is falling, where has _____ gone, the data is gone, why is your system eating my data?"

    When we go and look, they simply marked things a deleted themselves and didn't notice!


  • The problem is that users expect consistency when dealing with different formats of data.  If you list that there are 7 pages, they assume there are 7 pages and won't bother to assume there is an 8th page or how to get to it.

    That said, you should probably fix the page numbering.  I had the same problem when I converted our website from previous/next page to actual page numbers.  It was a matter of double checking what happens when there is one item shy of a full page, a full page, and one item on the last page.  Once you cover those, the problem will reveal itself.



  • @iowacoder said:


    Yeah I just "love" those kind of e-mails.  I get them all the time from clients....
    "OMG the sky is falling, where has _____ gone, the data is gone, why is your system eating my data?"
    When we go and look, they simply marked things a deleted themselves and didn't notice!


    That reminds me of something that happened when I was working in the student computer lab. This chick had a floppy disk with a paper or something that she was working on, and of course she didn't have a backup. The disk had some bad blocks and she couldn't open her paper. So, I ran norton, recovered the file, and copied it onto a brand new disk. When I gave her the new disk she said I could throw the bad one away, so I tossed it in the garbage.

    About 30 minutes later she comes running back in, frantic. Apparently when she got home her computer said the new disk was empty. She hands the disk to me and I open her paper with no problem.  But she’s really upset because she really wants to work on the paper at home and her computer won’t open it.

    So, because she looks like she’s about to cry, and because she’s really hot, I close down the helpdesk, leave the university with her and follow her all the way back to her house.   She pops the disk in her computer, opens Microsoft Word, and sure enough, it says there are no files on the disk.  So here’s the little leap of logic that I was unable to make.  Norton had cut off the file extension, and word by default shows only .doc files.

    Just another lesson learned for me.  Anybody ever read that book, Don’t Make Me Think by Steve Krug?  It’s full of little insights like this.


    @qwer said:

    That said, you should probably fix the page numbering.




    duh, of course I fixed it.  I'm embarrased that it was broken in the first place!


Log in to reply