• Michael R (unregistered)

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." - Red Adair

  • Scragar (unregistered)

    When I've seen this pattern before it's been to avoid reloading the page causing it to redo work, either because it's expensive/slow or because re-running it could have negative effects(for example posting a comment where each reload of the page would add a second copy of the comment).

    Of course there are many nicer solutions people have used since forever, the most convenient IMO is a nonce generated on the calling page, and once it hits the back end you check if it's already been used, if it has you return the relevant result(cached slow page/redirect to the correct location to view what they already submitted, etc). This avoids the need for the redirect while making stuff still work as expected on reloading in a fairly seemless way.

  • (nodebb)

    Doing Response.Redirect without passing False as the second parameter also shows another hidden anti-pattern.

    Most people end up fixing this when they eventually reach the point of maturity that they start logging errors and actually looking at them. It doesn't take long to realize that this non-error code flow where you redirected to another page on purpose, is occupying large part of the error log. A sensible developer will do a quick search or read the documentation and quickly see what they're doing wrong.

    My guess is that this organization relied on their user to tell them what errors on on the site.

  • tharpa (unregistered)

    TRWTF is Microsoft having a method which always throws an exception. They later started recommending programmers not call that method, but still.

  • Argle (unregistered)

    "Why should I pay top dollar for experienced software engineers when I can hire three kids out of college for the same price?"

    Yeah. Had this said almost verbatim to my face some years back.

  • (nodebb) in reply to Argle

    And now it would be "1 kid and one LLM subscription.".

  • (nodebb) in reply to HXO

    Strangely, the "hire [three kids out of college|one kid and an LLM subscription]" option doesn't seem to come up when recruiting for middle management.

  • Nick (unregistered) in reply to Paddles

    Strangely, the "hire [three kids out of college|one kid and an LLM subscription]" option doesn't seem to come up when recruiting for middle management. People recruit for middle management? I thought that was just what naturally happened to relatively unskilled developers over time… they slowly float up to the surface, like a layer of scum floating on top of the pure lake of skilled developers, separating it from the miasma of senior management.

    Source: I’m now in middle management,

  • giammin (unregistered)

    the funny things is that session state could expire between the generation and the redirect

  • (nodebb)

    That's clearly not VB.NET, though. Square brackets are used for indexing and lines end with semicolons. That's likely C#.

  • Álvaro González (github)

    I once wrote all the logic to collect the information for a page and prepared a JSP template for the junior dev to do the repetitive work of printing the class fields into the HTML. I came back from my holidays only to learn that he had left the template basically untouched, and written inline JavaScript to populate it with an Ajax request.

  • BPFH (unregistered) in reply to Jaime

    As the person who originally sent this in, all I can say is that:

    "My guess is that this organization relied on their user to tell them what errors on on the site."

    ...is so incredibly correct.

  • BPFH (unregistered) in reply to Maia-Everett

    You're likely not wrong. IIRC I sent this in a couple of times, and it was - at one point - rewritten from VB to C#. VB was definitely the original language, though.

  • Bob (unregistered) in reply to Michael R

    HPCs charge top dollar and are therefore better than amateurs?

Leave a comment on “The HTML Print Value”

Log In or post as a guest

Replying to comment #:

« Return to Article