• Ollie Jones (unregistered)

    Print the frist page? No

  • Sole Purpose Of Visit (unregistered)

    Never, never, never, make an observation like this in front of the customer.

    Seriously. Never do that. I know we all say things we shouldn't. But try to say them back in the office. At the very least, you can offer Boris the New, Enhanced, version of the software that does this trivial thing for a mere $5000 more.

  • (nodebb)

    VB had check boxes in the 90s, didn't it? Yes, I'm pretty sure it did.

  • WTFGuy (unregistered)

    @Mr. TA

    Surely you're not suggesting they query to determine the maximum page number then generate a wall (or better yet a tower) of checkboxes labeled Page 1, Page 2, Page 3, ..., Page n.

    Don't laugh; I've seen it (or the moral equivalent) done.

  • Andrew (unregistered)

    Since you're re-querying each time, when the dataset changes and a record expected on page n gets bumped to page n+1, you get a ticket where you have to explain to the customer "don't change the data".

  • (nodebb) in reply to WTFGuy

    Yeah that tower would look terrible. The article mentions page 73, it would be a tall tower.

    Still, VB had text boxes in the late 90s, didn't it?

  • Sole Purpose Of Visit (unregistered) in reply to Mr. TA

    That's not really the point, is it?

    If the customer requirement was "We want to step through the pages until we get to the right one," you can explain all you like that it's easier to use a text box, and some numpty will tell you that the requirement is the requirement.

    The main issue here is the select statement, which is dragging the whole table over, on every query. Assuming you can't get the page id out of the table, use a temporary table augmented with the page id, or possibly a cursor (preferably on the client side).

    It's all very well to ask the user to input the number of the page they want, but perhaps they don't know until they see the text. Picking some arbitrary index from 1 to 72 is not necessarily very helpful.

  • Brian (unregistered) in reply to Sole Purpose Of Visit
    Never, never, never, make an observation like this in front of the customer.

    Yep, definitely a rookie mistake, which I've made on more than one occasion. A good reason to keep a degree of separation between your developers and your customers. We technically-minded folk aren't always known for tact.

  • (nodebb) in reply to Sole Purpose Of Visit

    If the customer requirement was "We want to step through the pages until we get to the right one," you can explain all you like that it's easier to use a text box, and some numpty will tell you that the requirement is the requirement.

    My reading of the article suggests that isn't the customer's requirement. The requirement is actually to be able to just print one page of the report. The UI would be a WTF even if it wasn't backed by a really bad implementation.

  • (nodebb) in reply to Sole Purpose Of Visit

    There was no indication that it showed every page and asked the user whether to print it or not.

  • (nodebb) in reply to Andrew

    a record expected on page n gets bumped to page n+1

    Actually, the reverse is worse, where it is expected on page N, but when you flip from N-1 to N, you find that someone else did something that moved it to N-1, so you don't find it.

  • (nodebb)

    One of the worst problems with "print these page numbers" is that the page numbers used don't necessarily correlate with the page numbers printed on the page due to various bits and pieces of prefacing material.

  • SomeRandomName (unregistered) in reply to WTFGuy

    "(or better yet a tower)"

    No, definitely a wall. Then make the customer pay for it. Better yet, make Mexico pay for it.

  • Industrial Automation Engineer (unregistered) in reply to Sole Purpose Of Visit

    WT..., WT..., WTF !!!!

    Yeah, let's use the end-user as the cannon-fodder in a war between management and project "leaders." I cannot count how many times I have saved an operator mindless clicking each day until the end of the shift with the use of one or two lines of code.

    Project leader doesn't want to do the work until they can bill through the nose. Management doesn't want to pay for some trivial work.

    Best to find the holes in the specification and implement these features during commissioning, and keep it low-profile. I've seen too much s*** like this to not always side with the operator / end-user.

  • The Shadow Knows (unregistered)

    First WTF is breaking ranks in front of the customer. Do it once you're outside or do some diplomatic phrasing, but implying the application is crap and the person who wrote it is an idiot?

    Then we need to dig through the original request - as it's pointed out they may have been given the option of check boxes or a text box to decide in advance what pages they want, but there's also the possibility that the pages you want are determined by other pages, so you look at say #5 and because of the values you want to look at 10-15, but you'd not know if you'd preselected them.

    And yes, the redoing the select each time appears to be a waste, but without knowing how the systems operated at the time I can't say if it really was.

  • Carl Witthoft (google)

    TRWTF is printing hardcopy in the first place. The correct UI should display something like: "Select page to print" [ entry box] "You really want to print? {yes,no} [radio buttons] "No, you do NOT want to print, and I won't let you."

  • Bruce W (unregistered) in reply to Sole Purpose Of Visit

    Never, never, never, make an observation like this in front of the customer.

    So, so true. Even if the "customer" is internal/teammate/best work buddy.

    I was asked to help automate some manual tasks in another department in my division. I watched them do the task, which took about 20 minutes per "thing" with about 10 "things" per day. My brain was screaming that a simple macro could save them an hour a day but I remained quiet and nodded my head. After the review I simply said, "I see some areas where I can help." Just saying that made them happy. After about six weeks of developing some automation, I was able to reduce the process from 20 minutes to 5. To quote Scotty, "how else are they going to think you are a miracle worker?"

  • Argle (unregistered)

    What the customer wants never ceases to amaze me. Back around 1990, I was programming for someone moving legal documents to CD-ROM. Inexplicably, he wanted September abbreviated SEPT and all the other months their normal 3-character abbreviation. No logic could shake him from wanting the odd exception.

    By the same token, there's no predicting the horrors programmers can bring to the table. On that very same project, they needed text substitution for common OCR errors, like "California" was often mis-scanned as "Califomia." My predecessor wrote a utility to do text substitutions... in x86 assembler. I refused to maintain it and re-wrote it in C. The C version was nearly 100 times faster. God only knows why the asm version was slower... as I was unwilling to figure that one out for myself.

  • Barf4Eva (unregistered)

    The thing you really have to appreciate about Mark is how low of a bar he set for success. We should be thanking him. Now, every solution fixes the impossible, and that makes you, brave adventurer, the hero of every story at WTF inc.

  • (nodebb)

    Oh boy! War Stories! ... I took over an existing SQL/MS Word report. From the customer I learned a) this report goes to the top management and b) sub-level data was not in the report. The customer accepted this limitation, resigned to my Predecessor's explanation. I, having learned that most of Predecessor's code problems was PEBCAK, took a deep breath and opened the query. About 7 (printed) pages of SQL to fetch a 3 table 1:M relation chain. Each "item's" data was being concatenated as a single record with matching labels for every data-field as seen on the to-be-generated MS word document. As every stringified record exceeded the DB single-record length limit, Predecessor had removed 3rd table data fetch altogether. The replacement query fetching all data was literally 99% smaller with MS Word API handling headings, labels, and pagination.

  • Argle (unregistered) in reply to radarbob

    No end to war stories. And I still have yet to decide if the technical horror stories are better or worse than the management horrors (like my submission on Monday). People speak of certification to prevent idiots from being in the wild, but you'd think a college degree and a couple years of experience would be equivalent. If it is, it's a sorry equivalent. Back in the mid 80's, I was working with a guy my age who had a bug in some code. He handed me 2 pages of C code. I asked "what's it do?" He starts explaining line by line and I stopped him. "In 20 words or less, what does this DO?" It converted a string date to 3 integers. TWO PAGES! I asked if the string was arleady vetted. That is in MM/DD/YY format. It was. I scribbled in the margin "sscanf( text, "%d/%d/%d", &month, &day, &year);' and told him to replace it all with that. I guess the part that amazed me most is that he was amazed that it worked. Sadly, I was his age so I couldn't ask the curmudgeonly question "what are they teaching in schools these days?"

  • WTFGuy (unregistered)
    Comment held for moderation.
  • Borland InterBase (unregistered) in reply to Sole Purpose Of Visit

    Speak sincerely and be as secure in business as you do in your home. Make sure that person is cordial and nice and competent and diplomatic.

    Best move: open up VizStudio 6 right there. Fix it. Install the new version. And don't say one word.

  • sh_code (unregistered) in reply to Argle
    Comment held for moderation.
  • ClearWaterEvents (unregistered)
    Comment held for moderation.
  • 516052 (unregistered) in reply to Argle
    Comment held for moderation.
  • 516052 (unregistered)
    Comment held for moderation.
  • (nodebb) in reply to The Shadow Knows

    "implying the application is crap and the person who wrote it is an idiot?" - Over the years I have told clients that an application was crap and the person who wrote it was performing like an idiot --- of course, in these cases, I was the person who actually wrote it (and owned the company that produced the application)

  • Argle (unregistered) in reply to TheCPUWizard

    I used to think this was confined to programmers... until I found a story about plumber hired to fix something. He declared the previous plumber to be an idiot who did shoddy work. Turns out, of course, that he was the previous plumber.

  • mdrasal (unregistered)
    Comment held for moderation.
  • Diane B (unregistered)

    " Back in the mid 80's ... MM/DD/YY" Ah, the 80s, when we all expected to die in a flash of light long before the millennium.

  • Asinine (unregistered) in reply to Argle
    Comment held for moderation.
  • Asinine (unregistered) in reply to Argle
    Comment held for moderation.
  • (nodebb)
    Comment held for moderation.
  • Officer Johnny Holzkopf (unregistered) in reply to Brian

    A friendly reminder: "Look I already told you, I deal with the -beep- customers so the engineers don't have to. I have people skills! I am good at dealing with people, can't you understand that? WHAT THE HELL IS WRONG WITH YOU PEOPLE?!" - Tom Smykowski: Office Space. Now jump to your own conclusion.

Leave a comment on “A Basic Print Algorithm”

Log In or post as a guest

Replying to comment #545049:

« Return to Article