• 🤷 (unregistered)

    Oh Saint Frist, I pray to thee.

  • thegoryone (unregistered)

    "Today's submitter not only works in PHP, but they also freelance: the bottom of the bottom of the development hierarchy."

    I don't see how insulting every interactive media graduate in the western world is going to help site traffic ;)

  • malcolm in the middle (unregistered) in reply to thegoryone

    if it is on their expense I see a lot of potential

  • Pietro (unregistered)

    I'd like to say: I have been surfing italian websites for about 20 years and I have never found one which prints out the saint patron of the day. This website must be about some church community or something like that.

  • LCrawford (unregistered)

    I was waiting on the Wikipedia page to be reformatted and thus listing all 365 saints.

  • Me (unregistered)

    Looks like it’s time to vandalize a certain Wikipedia page.

    Also what happens if the sever’s connection to Wikipedia is slow. The file should be cached with an automatic process to update the cache with some sort of method to reject the file if too much of the data changes

  • not a robot (unregistered)

    easy solution,

    rewrite that javascript and php in $most_popular_language_of the_day and you are all good. sine clearly the problem here is php

  • anonymous (unregistered)

    I don't know the Wikipedia terms of use specifically but this would be against the terms of use for most websites.

  • Talis (unregistered)

    Waiting for a saint "Go f*ck yourself" showing up on the Wikipedia page - and on the "big, obscure website"...

  • Euro Micelli (unregistered)

    18 luglio: santi Sinforosa e sette compagni" (July 18: Sinforosa and the Seven Companions)

    "... see, 'Snow White' was just a nickname and her rea..." NO!

    Close, but no cigar. A much better translation would be: "July 18: saints Sinforosa and seven others"

    Critically, there is no definite article (Italian "i", English "the"), which changes the meaning of the phrase in the same exact way for both languages.

  • (nodebb)

    As a database programmer, I see a way for this to be much more efficient from the end-user (and local web-server) point of view. Split the process into to two tasks. Daily (over-night) task: Check the last update time on the it.Wikipedia.org page. If it earlier than the last time this process successfully updated the database, then stop and try again tomorrow. Otherwise, scrape and parse the Wikipedia page, putting the cleaned data in a (server) local database. Upon successfully reading and storing all the info, update the successful timestamp and log a successful update. If the scrape and parse process somehow failed, log that result and leave the database in the state you found it (Rollback Transaction). On-Demand task (called by PHP): Check the server-side database (not Wikipedia) for the per-formatted data and present that to the user.

    Much easier, less error-prone, faster response time for the user, more billable hours for the database programmer. Okay, so some people don't feel that last point is an advantage, but I do.

  • Jay (unregistered)

    I'm not very familiar with PHP so please excuse my ignorance.


    What is he trying to do here? The only way this would work is if for some bizarre reason, date.GetYear returns only the last 2 digits of a year prior to 2000. Is that what dates in PHP do?

  • Dave (unregistered)

    @Jay That's not PHP that's javascript. date.getYear() returns the local year - 1900 but it's deprecated date.getFullYear() should be used instead.

  • Jay (unregistered) in reply to Dave

    Thanks! I got the language wrong but the functionality almost right. It looks like he's anticipating that the logic behind date.GetYear will be fixed some time before the year 3800 AD.

  • Uhm (unregistered)

    Oh joyful cause of so many "year 19100" bugs about 18 years ago :p (i'm pretty sure some websites out there are still in the year 19118)

  • (nodebb)

    date.getYear() returns the local year - 1900

    I seem to have a memory that IE suddenly started returning "2000" in that year for getYear, where everyone else did 100. This is where I had assumed the Gorillaz song "192000" came from...

  • Karl Bielefeldt (github) in reply to Jay

    Seeing as the function only returns date_month, I'm wondering why they're manipulating the year at all.

  • HUH? (unregistered)


  • Jeremy Hannon (google)

    192000 - that makes sense. I saw that date on some websites on Y2K day (1/1/2000). That was the only unpatched glitch I saw.

  • RichP (unregistered) in reply to HUH?

    In the spirit of this site, Shirley you mean "PIMRO!"

  • (nodebb) in reply to Nutster

    More bucks for the database coder (it's done in PHP, isn'it?) is not the problem.

    The problem is the total lack of enterpriseyness.

  • linepro (unregistered)

    Poor sant'Ilaro only gets a day once every ~ 4 years!

    Btw does this mean we can cripple Italy with a malicious script embedded in Calendario dei santi?

  • Quite (unregistered)

    So let me see ... hmmm ... TRWTF is using the variable name "year" and not "anno", correct?

  • isthisunique (unregistered)

    I've seen PHP development like this. I had forgot about it until I saw this. I've also seen things like once to migrate a project to another country, client, brand, etc a reverse proxy was used to sed replace things like domain names that had to switch, strings to translate, etc.

  • I dunno LOL ¯\(°_o)/¯ (unregistered)

    So TRWTF is WaaD? (Wikipedia As A Database)

    Stick it all in a database on the server (much easier to access), then have a daily or weekly job that fetches the Wikipedia page, validates that it is formatted as expected (and reports errors somewhere that will be noticed in less than a year!), then repopulates the database.

  • I dunno LOL ¯\(°_o)/¯ (unregistered)

    (reposted without italics tags, what a wonderfully WTF choice for filtering spam!)

    So TRWTF is WAAD? (Wikipedia As A Database)

    Stick it all in a database on the server (much easier to access), then have a daily or weekly job that fetches the Wikipedia page, validates that it is formatted as expected (and reports errors somewhere that will be noticed in less than a year!), then repopulates the database.

  • (nodebb) in reply to LCrawford

    Is there no saint for February 29th?

  • QuakePhil (unregistered) in reply to thegoryone

    pretty sure this site traffic is composed mainly of people who can laugh at themselves just as much as at others

    tl;dr: don't take the jokes personally

Leave a comment on “All Saints' Day”

Log In or post as a guest

Replying to comment #:

« Return to Article