pyesetz: (Default)
[personal profile] pyesetz
The next “Company 𝔾” conference is coming up very soon!  Three customer complaints came in over the last two days, saying that the website wouldn't let them have their sets of slides for sessions-not-attending, even though it had already given them the slides for the sessions they did plan to attend.

The problem is here:if ($x == "all") {
    …some code…
}
So, does some code get executed or not?
‣ Yes if $x is the string "all";
‣ No if $x is the empty string "";
‣ No if $x is Boolean FALSE (which prints as an empty string);
‣ No if $x is the number 1 or the string "1";
Yes if $x is Boolean TRUE (which prints as "1").

I can sort of see why the PHP folks might have thought that it should work that way, but that's not what I meant!  Fix:if ($x === "all") {
    …some code…
}
The third equals sign means exactly equal rather than close enough.

Of the 536 customers for this conference, only 52 have tried so far to get their non-attending slides.  Because of this bug, the software told all of them that their downloads were “unauthorized”.  Bad software, bad!  Fourteen customers got around the problem by using the download-in-parts function, which is just supposed to be for large books downloaded via slow, unreliable modems.  As for the other people?  It seems they meekly accepted the computer's claim that they were not entitled to their books (which were supposed to be included in their conference purchase price).  “Mr. Bear” sent them emails apologizing for the computer's impertinence and asking them to please try again to get their books for the conference.

Profile

pyesetz: (Default)
Pyesetz/Песец

August 2025

S M T W T F S
      12
3456789
1011 1213141516
17181920212223
24252627282930
31      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 8th, 2026 09:17 pm
Powered by Dreamwidth Studios