Magic pronouns considered harmful



  • Got this finding during code review:

    I don't particularly like the fact that there's this '1' here - I suggest adding FIRST_SMOD_NUMBER := 1 under NONEXISTENT_SMOD_NUMBER in testing_constants module.

    Seriously? Does he really think it's more clear to say "SMOD #{FIRST_SMOD}" than simply "SMOD #1"? :facepalm:


  • kills Dumbledore

    What if you change to 0 based indices later? Simply change FIRST_SMOD_NUMBER to 0 and you're done



  • Changing it would probably expose 4326 bugs in our software - 26 in our project, 300 in platform software, and 4000 in the layer above us. No one would ever dare to do this.


  • kills Dumbledore

    Yeah, but it could have been 27 in your project



  • Bugs aren't bugs until they're triggered.


  • SockDev

    I am so glad I don't work with you


  • area_deu

    Well, some projects are so thoroughly belgium‌ed that such an attitude is very much understandable.



  • FRIST_SMOD_NUMBER :innocent:



  • @RaceProUK said:

    I am so glad I don't work with you

    If you spent three weeks on fixing code and tests after "one simple change" because one use case triggers two hundred others, you wouldn't fix bugs in currently impossible scenarios too. In a more sane project, I would be more inclined to write bulletproof code even in situations that don't make sense given the current functionality.


  • SockDev

    I never said anything about fixing bugs.

    If you're not going to read my posts properly, don't reply to them.



  • What do you do with bugs other than fix them?

    (breaking response chain because I'm not sure if @RaceProUK would agree with me about what he wrote in his post)


  • SockDev

    Most people are able to use the correct gendered pronouns with me; it's not like my profile hides which are the correct ones.

    And what I was objecting to was your attitude that bugs are only bugs when they're triggered. Why? Because a bug is a bug, whether you can trigger it or not.



  • One isn't a magic number. Three is a magic number. Says so right in the damn song.



    • what language is that?
    • if you've already got NONEXISTENT_ NUMBER (presumably := 0?) might as well have FIRST_ NUMBER, just for consistency
    • what's a SMOD?


  • @RaceProUK said:

    Most people are able to use the correct gendered pronouns with me; it's not like my profile hides which are the correct ones.

    Give the genetic algorithm few hundred more cycles and I'll get it eventually.

    @RaceProUK said:

    And what I was objecting to was your attitude that bugs are only bugs when they're triggered. Why? Because a bug is a bug, whether you can trigger it or not.

    If I do a null dereference in dead code, is it really necessary to fix it ASAP? Same with bugs triggered only when synchronizing time against one of two active NTP servers while 2 of 3 DSP units fail in the same instant. Since you can't have two NTP servers, there's no point in spending effort to fix it, in the grand scheme of things (especially since you have 142 real bugs to fix).


  • SockDev

    @Gaska said:

    If I do a null dereference in dead code, is it really necessary to fix it ASAP?

    If it's dead code, why is it still there? Get rid of it already!
    @Gaska said:
    Same with bugs triggered only when synchronizing time against one of two active NTP servers while 2 of 3 DSP units fail in the same instant.

    And again, reading stuff I haven't written; I haven't said a damn thing about when to fix bugs.



  • @Buddy said:

    what language is that?

    TTCN.

    @Buddy said:

    if you've already got NONEXISTENT_ NUMBER (presumably := 0?) might as well have FIRST_ NUMBER, just for consistency

    NONEXISTENT_NUMBER makes sense because it indicates that it's supposed to be non-existent, which you can't infer from the number alone. However, you can infer that SMOD #1 is the first one just fine.

    Side note - it's not 0, it's 15. But it doesn't matter since neither exists.

    @Buddy said:

    what's a SMOD?

    System Module.



  • @RaceProUK said:

    If it's dead code, why is it still there? Get rid of it already!

    It was an example. A hypothetical situation. But since you've shown multiple times already you're unable to think in abstract terms, here's a more real-life example - what about non-dead code, but an execution path that will never happen?

    @RaceProUK said:

    And again, reading stuff I haven't written; I haven't said a damn thing about when to fix bugs.

    But you said they should be fixed, which implies that "when" is not equal to "never".


  • SockDev

    @Gaska said:

    what about non-dead code, but an execution path that will never happen?

    Unreachable code is practically no different to dead code; get rid of it.
    @Gaska said:
    But you said they should be fixed, which implies that "when" is not equal to "never".

    Exactly.



  • I see.



  • @RaceProUK said:

    Unreachable code is practically no different to dead code; get rid of it.

    The code is reachable. The execution path isn't.


  • SockDev

    @Gaska said:

    The code is reachable. The execution path isn't.

    :facepalm: TDEMSYR



  • @Gaska said:

    Bugs aren't bugs until they're triggered.

    If a bug shits in the woods but no-one's around to hear it, does it still make a sound?



  • @RaceProUK said:

    TDEMSYR

    Imagine a function that's get called when connection to NTP server is lost. It calls a function that notifies other modules about the lost connection. The notification triggers a function that switches to another NTP server. Let's say that the bug is that if multiple NTP servers are lost at the same time, the notification is generated only for one of them, causing a switch to faulty NTP server. All the code is reachable, but the buggy execution path is not, because you'll never have a connection to more than one NTP server.


  • SockDev

    @Gaska said:

    All the code is reachable

    Including the buggy execution path



  • So tell me, how to trigger the bug here if there can only be one active NTP server?



  • @RaceProUK said:

    Most people are able to use the correct gendered pronouns with me; it's not like my profile hides which are the correct ones.

    When a pronoun refers to a person whose sex(1) is unknown / unclear to the speaker, it is perfectly normal to use the "unknown sex" version of "he/him/his". This group of pronouns comes in two versions, one for male beings, and one for beings of unknown/etc. sex. The two versions are spelled the same and pronounced the same, which leads ignorant people to assume that "he" always refers to a man, except when it refers to a boy, whereas in a particular situation, it refers to a person of unknown sex.

    Yes, I know about "he/she" and its friends, but these are developments of that same ignorance of the valid use of English pronouns.

    (1) "sex" is correct here. People are of one sex or another, while words are of one gender or another. "Gender Studies" is therefore a narrow subfield of linguistics. ;)


  • SockDev

    True, but my gender is also on my profile, so it's not exactly a secret ;)


  • SockDev

    @Gaska said:

    So tell me, how to trigger the bug here if there can only be one active NTP server?

    How the fuck do I know how your system works?


  • area_deu

    Not everyone actively reads profiles, though.



  • @Steve_The_Cynic said:

    When a pronoun refers to a person whose sex(1) is unknown / unclear to the speaker, it is perfectly normal to use the "unknown sex" version of "he/him/his".

    I know quite a few people who would make a rant about your mysogyny right now. I've been at the receiving end once - it's not pleasant, especially if you like that person.

    @RaceProUK said:

    How the fuck do I know how your system works?

    Not my system, but the one I described in the post above. How do you want to trigger situation where two NTP servers are lost at once if there can be only one NTP server active?



  • @RaceProUK said:

    How the fuck do I know how your system works?

    He told you on the post you quoted.



  • @Gaska said:

    @Buddy said:
    what's a SMOD?

    System Module.

    What happens when SMOD #1 gets refactored away?


  • kills Dumbledore

    You two just can't help arguing over semantics can you? Get a room already.

    A bug is always a bug. If it can't be reached as the program stands at the moment then it's a very low priority bug, but should be in your forumbug tracker and acknowledged as a bug. If the software changes in the future (2.0 adds the ability to connect to two NTP servers) then the bug will become relevant and the repro steps/investigation done when it was originally reported may be useful in fixing it.

    Just because something's accepted as a bug doesn't mean you definitely have to drop everything to fix it.

    @RaceProUK said:

    gender is also on my profile

    Yeah, but it's not your real gender is it Dave?



  • @Jaloopa said:

    @RaceProUK said:
    gender is also on my profile

    Yeah, but it's not your real gender is it Dave?

    :popcorn:


  • SockDev

    @Gaska said:

    How do you want to trigger situation where two NTP servers are lost at once if there can be only one NTP server active?

    Set up a test in which you can reliably take down two NTP servers simultaneously.
    @Jaloopa said:
    @RaceProUK said:
    gender is also on my profile

    Yeah, but it's not your real gender is it Dave?

    Shush you :stuck_out_tongue:



  • @RaceProUK said:

    @Gaska said:
    How do you want to trigger situation where two NTP servers are lost at once if there can be only one NTP server active?

    Set up a test in which you can reliably take down two NTP servers simultaneously.

    You could take out every NTP server in existence at the same time and it wouldn't help if you can only connect to one of them at a time.



  • @Steve_The_Cynic said:

    I know about "he/she" and its friends

    Do you know about the singular "them" and "their" and "theirs"?



  • @flabdablet said:

    What happens when SMOD #1 gets refactored away?

    What do you mean, refactored?

    inb4 @RaceProUK - I know what refactoring means in general. I'm confused about what kind of refactoring zee might be referring to - splitting into parts? Changing name?


  • Fake News



  • @Gaska said:

    @Steve_The_Cynic said:
    When a pronoun refers to a person whose sex(1) is unknown / unclear to the speaker, it is perfectly normal to use the "unknown sex" version of "he/him/his".

    I know quite a few people who would make a rant about your mysogyny right now. I've been at the receiving end once - it's not pleasant, especially if you like that person.

    It's not misogyny. (<<<-- Note spelling.) It seems you didn't bother actually reading a word I wrote, except just enough to create a juicy quote-out-of-context. I'll get my meme out to deal with you later.



  • @Gaska said:

    What do you mean, refactored?

    Entirely replaced with all the shiny new code in SMOD #73.


  • SockDev

    @Jaloopa said:

    Just because something's accepted as a bug doesn't mean you definitely have to drop everything to fix it.

    Again, I never said anything to contradict that.


  • SockDev

    @Steve_The_Cynic said:

    It seems you didn't bother actually reading a word I wrote, except just enough to create a juicy quote-out-of-context.

    Now you see the issue I have with him


  • kills Dumbledore

    @RaceProUK said:

    I never said anything to contradict that

    No, but that seems to be how @Gaska is interpreting your stance.



  • @flabdablet said:

    @Steve_The_Cynic said:
    I know about "he/she" and its friends

    Do you know about the singular "them" and "their" and "theirs"?


    These may have a basis in the longer history of English, but they still feel, well, wrong when I read them. (And since the same people who defend erratic spelling and grammar as being the natural evolution of languages at work also, sometimes, defend undoing some other evolution by returning to a previous form, I'm left wondering what they really believe about language...)


  • SockDev

    @Steve_The_Cynic said:

    These may have a basis in the longer history of English, but they still feel, well, wrong when I read them.

    ESL? Or just odd? :stuck_out_tongue:

    The singular 'them' and 'their' are considered normal and polite, and definitely preferable to 'it'; it may sound odd to some, but it's how it's done ;)



  • Singular "them" or "their" is the safer bet when gender/sex is unknown (or or whatever) - it's much less likely to be interpreted as making an assumption or getting it wrong.



  • @Steve_The_Cynic is français, non?



  • @Steve_The_Cynic said:

    These may have a basis in the longer history of English, but they still feel, well, wrong when I read them.

    Try and change that :-)


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.