Difference between revisions of "2928: Software Testing Day"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
(Explanation: Mention the leap day MS Azure outage and how invalid dates are or aren’t handled IRL)
(Explanation: Backreference.)
Line 26: Line 26:
 
   console.log(d); // prints “Mon Jan 01 2024 14:11:00” (exact format depends on your locale)
 
   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, a reasonable assumption given that time only moves in one direction{{citation needed}}.
+
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 [[2867: DateTime|may or may not]] be reasonable.
  
 
==Transcript==
 
==Transcript==

Revision as of 09:17, 4 May 2024

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

Explanation

Ambox notice.png This explanation may be incomplete or incorrect: Created by a NEGATIVE ONCE BOOKED EMPLOYEE - Please change this comment when editing this page. Do NOT delete this tag too soon.
If you can address this issue, please edit the page! Thanks.

Quality Assurance (QA) engineers are responsible for ensuring the quality of some software product through the use of testing. 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 doesn't 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. All values except for "January" and "PM" are invalid and make no sense, suggesting that a QA engineer picked this date to test the scheduling system. Apparently, though this date is nonsensical, the QA engineers have decided to make this date a celebration day. Both "January" and "PM" are likely correct values because for QA reasons 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.

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 celebrating on January 0th or any nonsensical values.

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 2012 Microsoft Azure outage caused by the server trying to generate a certificate valid until February 29, 2013.

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 abused:

 // 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.

Transcript

Ambox notice.png This transcript is incomplete. Please help editing it! Thanks.
[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.


comment.png add a comment! ⋅ comment.png add a topic (use sparingly)! ⋅ Icons-mini-action refresh blue.gif refresh comments!

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)