# 2928: Software Testing Day

 Software Testing Day Title text: The company tried to document how often employees were celebrating Software Testing Day, but their recordkeeping system kept mysteriously crashing.

## Explanation

The upcoming holiday Megan is referring to could be Cartoonist Day, which is on May 5th (same day as Mexico's Cinco de Mayo). As a cartoonist himself, this may be Randall's way of celebrating it.

Quality Assurance (QA) engineers are responsible for ensuring the quality of some product through the use of testing. In software, this process often involves entering bizarre and/or nonsense inputs in an attempt to break the software. Cueball, a QA engineer in this case, expresses concern that the scheduling system might crash. This could either be because as a QA engineer he is concerned about crashes in general, or that as a system used by QA engineers it likely has a lot of weird/invalid values that could cause a crash.

For example, here it seems that Software Testing Day, a day likely celebrated by QA engineers, takes place every −1 years on January 0th at 25:71 PM. That statement is nonsensical in the following ways:

• The frequency of a recurring event is always expressed as a positive amount of time, so a negative value like “every −1 years” does not make sense.
• The first day of the month is the 1st, not the 0th. (There is an entire category of bugs/errors which result from numbering systems being mistaken for starting with 0 instead of 1, or vice versa.)
• There are (in most cases) only 24 hours in a day, so “25” is (in most cases) too large, and even where there is a switch from Daylight Saving Time, clocks simply repeat the hour before midnight, so the numbers above 24 hours are not displayed, even if using the 24-hour notation.
• In addition, the “PM” suggests that it is a 12-hour time, so the expected range of values for the hour is 1 to 12, making the “25” even more nonsensical.
• There are only 60 minutes in an hour, so “71” is too large of a minute.

Apparently, though this date is nonsensical, the QA engineers have decided to make this date a celebration day. Probably since, as expressed in the comic, the software for keeping track of the date has crashed. Another interpretation of this comic could be how software always crashes in one form or another when being tested, and thus the nonsensical date implies that successful runs of software is never celebrated.

All numerical values are out of range, suggesting that a QA engineer picked this date to test the scheduling system. If the date were to be made sense through under/overflow, it would result on January 1st at 14:11 (2:11 PM). And the -1 year interval could be interpreted to mean it happens every year (perhaps with the annual events being numbered backwards). Alternatively, an attempt to enter these numbers might be rejected as invalid, forcing the user to enter a properly formatted date and time. Both "January" and "PM" are acceptable values; because these two items tend to be selected from predetermined lists since they have an extremely limited number of possible values, it's rarely possible to enter an invalid value for either of these fields.

The title text suggests that the recordkeeping system used to see how often employees celebrated Software Testing Day kept crashing, possibly due to the employees purposefully inputting nonsensical dates or a date that occurred prior to the previous celebration. QA engineers may have semi-accidentally crashed the system by testing it, or deliberately crashed it to disguise the frequency of their days off.

In real life, such invalid dates would be rejected or coerced to be valid dates. Failing to account for invalid dates may result in errors, sometimes catastrophic, such as the February 29, 2012 Microsoft Azure outage caused by the server trying to generate a certificate valid until February 29, 2013, a date that does not exist as 2013 being a non-leap year.

Treatment of invalid dates varies by the chosen programming language and date-time library. Javascript, for example, would coerce January 0th into December 31st, and 25 o’clock into 1 o’clock the following day. While there is no way to directly create a Javascript Date object using 12-hour notation (because that requires text parsing, and the validation of the text input would just result in an invalid date), the following code snippet represents how far this correction can be taken advantage of:

```// In Javascript, month 0 is January
const d = new Date(2024, 0, 0, 25+12, 71);
console.log(d); // prints “Mon Jan 01 2024 14:11:00” (exact format depends on your locale)
```

An event happening every −1 years is equivalent to one that happens every year, but the numbers are reversed; i.e. if this year hosts the 1st Software Testing Day, next year will host the 0th Software Testing Day. This is expected to cause issues in software that assumes that the 2nd Software Testing Day will occur after the 1st Software Testing Day, an assumption that time only moves in one direction that may or may not be reasonable.

The holiday may be due to the claim of "we really can't do anything else, during this automated process", using the same sort of logic as 303: Compiling justified for the programming team. Albeit that here we explicitly learn that a failure behind the scenes will cancel the 'sanctioned' pausing/idling-away of contracted work hours, much as a notable compilation/build error would interupt the others' few minutes of office sports.

### Unusual date-time notation in real life

• Seconds usually go from 0 to 59. However, when a leap second is added, December 31st, 23:59:59 UTC is followed by 23:59:60 (11:59:60 PM) before starting the new year.
• "24:00" can be used to unambiguously state the closing midnight of a given date. i.e. the same as "00:00" upon the next, but without the ambiguity as to which 'midnight' bookending of the given date it might refer to, e.g. for deadlines.
• It can be generally used to simplify the understanding of how much time is encompassed by a period starting at a pre-midnight time and ending at a post-midnight one.
• Japan, in particular, uses hour numbers greater than 24 to express times past midnight but before sunrise. For example, 25:00 on a Friday is the same time as 1:00 the following Saturday. This is mainly used to express the starting times of midnight TV programming and the closing times of bars and other establishments open late at night. The hours usually go up to 27, but numbers up to 30 (6AM of the following day) are also sometimes seen. It allows the timepoint to 'belong' to the normal working day that precedes it, rather than setting it prior to the normally expected start of business for the day after (especially when that involved weekends).

## Transcript

[Megan and Cueball stand facing each other.]
Megan: So, do you and the other QA engineers have any fun plans for the holiday?
Cueball: Yeah, assuming the scheduling system doesn't crash.
[Caption below the panel:]
Software Testing Day is a holiday celebrated every -1 years on January 0th at 25:71 PM.

# Discussion

What holiday are they referring to? In the UK we will have a long weekend due to the Early May Bank Holiday. But May Day isn't a "thing" in the USA, is it? Or should we just assume this is set in Britain? Zeimusu (talk) 13:45, 4 May 2024 (UTC)

Well, that's refering to the official STD(!) set to be on January 0th (+24hr+12hr), so I don't think it's a topical scene.
It looks like our Leftpondian friends have official nationwide 'holidays' on: New Year's Day (1/Jan), Martin Luther King, Jr, Day. (3rd Monday in January), Inauguration Day (20/Jan, every 4 years), Presidents Day (3rd Monday in February), Memorial Day (last Monday in May), Juneteenth (19/Jun), Independence Day (4/Jul), Labor Day (1st Monday in September), Columbus Day (2nd Monday in October), Veterans Day (11/Nov), Thanksgiving Day (4th Thursday in November), Christmas Day (25/Dec). And then there'll be additional state/more local days, no doubt. (And, because of labo(u)r laws, or insufficient ones, I'm given to believe that might be more of an inconvenience/inapplicability to quite a lot of workers.)
But this seems to be a highly specific 'QA'/software-testers' tradition, either within a particular company or across all such professionals. At least within the xkcd universe, which might have all kinds of other strangenesses to it that we're only seeing the vaguest outline of through these comics. 172.71.242.188 17:37, 4 May 2024 (UTC)
"May Day isn't a thing in the USA, is it?" -- Personal holiday. At my house (Maine USA) a maypole is customary (if snow allows). When I was very young (1950s California) we celebrated in kindergarten, but I think religious bigots cancelled that. --PRR (talk) 19:55, 4 May 2024 (UTC)
Could be talking about Cinco de Mayo, a Mexican holiday that a lot of Americans also celebrate. The same day (May 5) is also Cartoonist Day -- as a cartoonist himself, this could be Randall's way of celebrating it. -boB (talk) 14:49, 6 May 2024 (UTC)

I exapnded the "hours on/after midnight" section a bit. Nearly put down that the 'official' day at times used to start at 6:00AM (or dawn, depending upon whether some form of consistent timekeeping or just practical astronomical cycles dominated), so that the post-midnight activities of people (very unusual, for most, but would include liturgical ceremonies) also belonged to the prior daylight cycle. And that "noon" was the "ninth hour" of the day (~3PM, give or take), before clock changes and civil practice moved it to midday. - But this really is beyond the scope of the above explanation, so mentioning it here instead. 162.158.38.91 18:09, 4 May 2024 (UTC)

I work in public transport, where we use times up to 32:00 but ignore daylight saving time on the night it switches (so on that night, 30:00 might be 5am or 7am in the sunday morning). Also, we have different notations for time as a specific point in the day (7:10) or as a duration (7h10). IIVQ (talk) 06:47, 5 May 2024 (UTC)

I'll just leave this here :) https://gist.github.com/timvisee/fcda9bbdff88d45cc9061606b4b923ca Elektrizikekswerk (talk) 07:28, 6 May 2024 (UTC)

Some years ago there were gigs at the local indie disco which started after midnight (because, due to licensing rules, opening doors before midnight would imply extra costs, since it would count as an extra working day). When posting about those gigs I would write something like "1:00 in the night from Friday to Saturday", so as to not be ambiguous. Rps (talk) 13:09, 6 May 2024 (UTC)

I understood this in a wholly different way.... I thought that since many companies are doing server maintenance + possibly software testing on days where not many people are working, this refers to Cueball (as a software engineer) bitterly commenting about not having a day off when everybody else has.--162.158.111.177 06:57, 7 May 2024 (UTC)

At least for the "software testing" part this is in general not true. Most companies have dedicated test systems, which are, in an ideal world, even separate from the development systems. This is, for example, the default system landscape that SAP recommends for their users (and ofc SAP itself). https://help.sap.com/docs/SOFTWARE_LOGISTICS_TOOLSET_CTS_PLUG-IN/05c12df5b54849c49940a14bc089d8b4/63a30a4ac00811d2851c0000e8a57770.html?locale=en-US Elektrizikekswerk (talk) 07:22, 7 May 2024 (UTC)
I rather read it as "testing the test system". The meta-test of whether a particularly extreme test would not just fail the test but cause the testing system to failover badly. To this end, nothing but the accumulatively bad testing can be run (upon the test system), everything else is put on hold (because regular testing added to the test-testing would confound the matter, and be useless anyway if the test-tests made the thing fold under the pressure first) and this forces the testers to keep their hands off everything for the duration (the 'day' given the test value of 0th January, and the rest), much as per the Compiling down-time.
If the meta-test goes wrong (causes the meta-testing to fail, or perhaps does not fail 'correctly' at the non-meta test level) then the human testers no longer have their time off and are called back in for their mini-holiday (or no longer allowed to leave, if the failure happens during pre-test-test testing).
For the crashing of the "recordkeeping system", as per title-text, this could be anything from deliberately "give a test we know crashes the (non-meta) system" by the testers to the non-tester recordkeepers not trusting the testers (and test-testers) and so trying to use the test-test data themselves upon a system of their own that is definitely not test-test-proof because they hadn't had asked for (test-)tester validation of it. (I've been part of a Change Control processing group where we've been made aware of a sub-group that has been reconfiguring its own little corner of the system without due reference to company policy, perhaps due to office politics and "it's nothing to do with them", etc.)
But I'm not sure it's quite as simple as that. 172.69.43.183 09:28, 7 May 2024 (UTC)

Changed away from the description of the javascript being "abused" by non-standard values. It may be a valid shortcut to just add a relevent ('over the top') value to `dayOfMonth` or `hourOfDay` variables, or even subtract and let the inbuilt algorithm resolve the oddness (with some testing, or documented confirmation, that it does the right thing).
If the core function isn't actually broken/fooled/exceptioned by out-of-normal-range inputs, it allows "this exact same time next week" without having to additionally do your own `this.day=this.day+7; if this.day>daysInMonth(this.month) { this.day=this.day-daysInMonth(this.month); this.month++; if this.month>valueDecember { this.month=valueJanuary; this.year++ } }` and hope you've not missed off any exception in your reinvention of the same wheel that the date-handling code has probably already covered. In at least as much detail as you just did, prior to feeding it with your 'presanitised' variables, but if you know you need to maybe add `,this.Year` to the `daysInMonth(...)` param, to cover leapyear differences then you already know to test the inbuilt function with an edge-condition to make sure it knows (before then looking to maybe fudge any adjusting code of your own to undo any inbuilt errors that you see).
And if it's already good enough to deal with everything necessary, with or without additional functionality-refinements, then it's just a bonus that you can actually supply a dateTime adjusted by subtracting some relevent `secondsInSiderealYear` from the current `observationTime.seconds` to give a different retrospective timestamp to if you had taken off `secondsInTropicalYear` instead (having tested that it does the right thing for your purposes when it leaps back from Gregorian into Julian calendars, if this is deemed relevent). Neater code, for which simple comments/documentation can reveal the pre-testing done that justifies it. You could even put that in validating initialiser that fails-over (or sets up an appropriate autocorrection flag) when it finds your script is being run with library versions of the functions (or within a set of ENV settings) that are wrong... Of course, it may take a bugrep from an end-user to know where it goes wrong, but if you're serious enough to reimplement the whole shebang manually with absolutely every possible issue of contention 'correctly' pre-handled, then you are also capable of saving yourself the effort and just validating whether the function calls were pre-pre-handling this already. You can be control-freaky in different ways (non-delegating or delegating-but-checking), much as you can let process errors slip through in different ways (significantly err yourself or miss significant errors already made by others).
Horses for courses, of course! 172.70.90.172 13:59, 12 May 2024 (UTC)