• (nodebb)

    $name is a truly awful name for a variable containing a dictionary (idgaf what the proper name is for this structure in PHP) containing a mapping from names to email addresses.

  • (nodebb)

    I did a contract for a public university a couple of decades ago that had implemented single sign-on by passing the username and password in the clear in the url parameters to the next app. Anything is possible with people don't understand how code works.

    A nicer idea here might have been to change the file to be plain text (with robust import checking) so they could edit it themselves.

  • (nodebb) in reply to mynameishidden

    That would have been the "correct" way. A database would be overkill, but a text file that's read in with one line per person some kind of Name:email value? That's easy enough that even a librarian could do it.

  • (nodebb)

    In all fairness, they would have needed a "programmer" as well to change DB entries. He would have needed to make or append an administrative site to actually be use friendly - until they needed again a "programmer" to reset their admin passwords because all of them locked themselves out :-)

  • burner (unregistered)

    Maybe the staff didn't want any emails.

  • (nodebb) in reply to DocMonster

    a text file that's read in with one line per person

    Came here to say something similar. I don't feel that the WTF here is really that much of a WTF. Apart from the fact that the list is written in PHP, this is a nice lightweight solution to the problem. If it were a table in a database, either people would need to acquaint themselves with SQL and an appropriate SQL client, or a maintenance page needs to be written and that assumes that the server has a database back end already.

    This solution offers some nice advantages: no pesky database server, easy to edit with a text editor (not MS Word!), easy to add to source control (although I suspect these people didn't have that).

  • Steve (unregistered) in reply to burner

    +1 Man, I could have used that code...

  • Scragar (unregistered) in reply to jeremypnet

    Just give them something like PHPMyAdmin with a user that has access to only the staff table. They can insert and delete users from there really easily then.

    Just implement a trigger on the table so changes get mirrored to a log you can revert, just in case some screws up and deletes everything.

  • Richard Brantley (unregistered)

    I would suggest, even if this was stored in a text file, that it be maintained through a maintenance page. Asking non-technical users to edit a text file has some challenges of its own, because when people can enter free-form data with no guard rails you will get all sorts of garbage added to your file. We all thinks it's easy to manually edit a text file, but that does not hold true for everyone, and you need a way to back out when they mangle something.

  • Duke of New York (unregistered)

    I bet the person who extracted the table into an included file (leaving the empty constructor) was very proud of that improvement.

  • Kleyguerth (github)

    TRWTF is the ad being hidden in the source code thanks to the easy reader version not properly closing the comment tag

  • richarson (unregistered) in reply to Kleyguerth

    Maybe the staff didn't want to show any ads.

  • löchlein deluxe (unregistered) in reply to Duke of New York

    My crystal ball says "oops, I don't want to send these emails while debugging, let me just empty out that code" and they never went back.

  • (nodebb)

    Text file? You folks are taking it wrong: too hard to edit! This data would better be handled as an Excel spreadsheet file that admins keep emailing to each others as attachment, and that one specific person has the job of uploading on their intranet server.

    (Any event depicted here is unfortunately non fictional)

  • (nodebb)

    That story reminded me of the time I was doing Civil Service at a nursery home, and they wanted to hire me to write a work scheduling system, because they didn't want to pay 25€ per employee for a company product.

    Oh boy, did I dodge a bullet there. My Knowledge of programming at the time was windows batch, some pre-HTML5 JavaScript and Scripting Ultima Online free shards. And like everyone with that level of knowledge, I was way too confident on how far my knowledge could take me.

    The administration was less knowledgeable and thought that a legally-just-barely-adult teenager with some hobby interest in programming and PCs could handle the task.

    On the plus side, they almost certainly wouldn't have understood that they'd need someone to maintain whatever I would have produced.

    Addendum 2024-10-07 02:14: For reference, that was in 2005.

  • (nodebb)

    thanks for info

    Addendum 2024-10-31 08:54: When it comes to exploring various betting options and enhancing your gambling experience, MostBet is a great platform to consider. Similar to the article that highlights the importance of utilizing available resources effectively, MostBet provides an extensive array of information on sports betting, promotions, and market trends. Whether you're a novice looking to learn the ropes or a seasoned bettor wanting to optimize your strategies mostbet official app offers the insights needed to make informed decisions. Just as libraries are valuable for accessing information, MostBet serves as an essential tool for anyone interested in the world of sports betting.

Leave a comment on “Library Checkout”

Log In or post as a guest

Replying to comment #:

« Return to Article