• (nodebb)

    So you could be Male, Female, Transgender, FILE_NOT_FOUND, Business, Company, and/or a number?

  • Solitario (unregistered)

    And gender and sex of a person can differ.

  • G (unregistered)

    2 : ISCOMPANY 3 : ISACROWD

  • Abhijeet (unregistered)

    6 and 9 for sex. Is it just me or does the programmer have a dirty mind too?

  • Ex-lurker (unregistered)

    Been there, witnessed the idiocy, learned a lot of things I should never do. In my first job I had to maintain a bunch of broken WTF-laden bug-ridden projects. One of the systems I was afflicted with had a char(1) Gender field in its Customers table that would hold 'M', 'F' or 'J'. Naturally 'J' meant that that customer was a company, but that was really one of the minor WTFs I experienced while I was there.

  • MiserableOfGit (unregistered)

    Makes you wonder what clients this company was catering to ... !

    And I remember having some pointless argument with a some know-it-all on linkedin who was banging on about NoSQL. His entire argument seemed to rest on how difficult it was for him to write SQL statements that would cope with his gender field, which he'd set as a nullable Boolean "isMale".

    Several people telling him "do it properly first, then come back and present a better example!" didn't seem to dissuade him.

    Just looked him up, he now describes himself as a Big Data Architect, god help his poor clients.

  • bvs23bkv33 (unregistered)

    comapny? co_map_ny?

  • Oliver Jones (google)

    TWF?

  • (nodebb) in reply to bvs23bkv33

    Trypogaphical error, most likely...

  • Dave (unregistered)

    I see lots of this sorts of stuff. It's taking a standard, misunderstanding then misapplying the misunderstanding.

    ISO5218 defines gender code 9 as being Not Applicable.

    A company is a legal person, a person has gender but gender is not applicable to an organisation. Not even Ann Summers.

    The best data modelling advice I was ever given was to model your data for the physical thing you are modelling. Don't force a physical thing to comply with a logical construct, you will rue the day.

  • Chronomium (unregistered)

    TRWTF is the reversed indentation on the cases.

  • jmm (unregistered)

    so have the actual integer values been changed to protect the submitter? Or is that REALLY what they used?

  • Gummy Gus (unregistered)

    I created a similar mess when our database admins would not let me add a few boolean flags. I ended up stuffing the flags into an unused "FAX phone number" field. Not proud of that!

  • calspach (unregistered)

    I worked on a system for several years that had Gender defined as 0, 1, or 2. 0 Was unknown or N/A, 1 was Male, 2 was Female. On some screens and reports, those got converted to U, M, and F, but on most they just showed the number. Worked a project that converted most of the data into a relational database, at the time we decided it was time to just start storing U, M, and F on the table. Was a lot bigger mess to make that work than you would think.

  • Sole Purpose Of Visit (unregistered) in reply to Steve_The_Cynic

    Pogaphical or pogaphical not: there is no try. (Although, if there were one, it would presumably use instanceof.)

  • Brad (unregistered)

    Misspellings like ISCOMAPNY are reflections of either confusion or lack of attention to detail. They are bigger red flags than some may think. Maybe foreign contractors less so, but just maybe.

  • Thomas (unregistered) in reply to Gummy Gus

    Yep. Currently work at a company where the "FAX" field is used to store about 5 different types of information, none of which are anywhere close to being a phone number & you require a (basically none existent) data dictionary to map between many of the database fields original use and current use.

  • Scott (unregistered)

    It is also possible that SEX does not mean gender. I worked with Apple quite a few years ago; one of the columns they sent us was SEX, but this was physical location data (maybe apple stores, I forget). No longer remember what SEX stood for, but there were literally hundreds of these three-letter acronyms which defined some aspect of whatever locations we were interested in.

  • David Green (unregistered)

    Unfortunately, I've seen something like this more than once. This is likely "we don't want to create a new field in the database, so take this dis-used field and just use it for whatever you need."

  • Fedaykin (unregistered) in reply to Gummy Gus

    The Real WTF is DBAs that believe they can dictate what can an cannot be in the database (rather than just dictating structure)

  • Jeff Grigg (unregistered)

    So now companies, legal entities, have gender identities? I see that there are TWO values for "is a company" sex/gender. So, which is a 6, and which is a 9? And what if a company is transgendered? ...or any of the other gender identities?!?!?!?

    (Well if legal corporate entities can "have" religions, and freedom of religion rights, then I suppose that corporate gender identity makes sense too. :-/ )

  • (nodebb)

    INB4 Corporations are people too.

  • Parametamolcil (unregistered) in reply to Steve_The_Cynic

    Did that myself, last week, had a parameter listed as "FOBOAR" when of course it should be "FOOBAR". Now I'm propagating the misspelling through stored procedures and SQL jobs. Why? Because I don't yet get to change the web site code in production where the spelling error is. Oh sure, I can just add a real "FOOBAR" parameter, but then the SQL code has to explain why there are two very-similarly named parameters existing. And when I correct the spelling next time, of course I'll remember to search-and-replace it throughout the database.

  • siciac (unregistered)

    you know that many assumptions are wrong.

    And yet you avoid maybe the first dozen and possibly a few domain specific ones, your app will run correctly long after you're gone. Even most of the gender stuff is only an issue if you work for Tumblr, everyone else can, in practice, treat "changing gender" exactly the same as correcting a typo.

  • There are three HARD problems in computer science... (unregistered)

    Naming things, and counting things.

  • Brian (unregistered) in reply to Brad

    At my former company, we had an online coding test that we would give to job applicants. Whenever I was grading a test and saw obvious misspellings in comments - or worse, in function or variable names - I would call it out as at least a yellow flag, if not a red one. If you can't take a minute to proofread your code before submitting it, then yes, I question your attention to detail and to writing maintainable code.

  • Peter Bouillon (unregistered) in reply to Brad

    … or an indication that some programmer needs to visit their local optician for new spectacles :-)

  • (nodebb)

    Whenever I was grading a test and saw obvious misspellings in comments - or worse, in function or variable names - I would call it out as at least a yellow flag,

    Give them an API with a few subtle misspellings and see if they keep that too. A few APIs we use (external and internal) have misspellings. Instead of fixing it they just get documented.

  • Barf4Eva (unregistered)

    Are the values 6 and 9 (69!) the ACTUAL values from the actual code? Cause for sex, that's pretty awesome.

    And 69 is definitely company. :)

  • (nodebb)

    Gender is really quite simple: Have an integer that counts the number of X chromosomes. That ought to do it.

  • Chris (unregistered)
    1. A person’s gender never changes.
    2. OK, it might change but only once in a lifetime.
    3. A few times in a lifetime?
    4. Surely not multiple times a day?

    Oh dear, people are confusing "gender" with "mood" again.

  • Chris (unregistered) in reply to Zemm

    Transgender is still male or female, just not immutable.

  • OFFS (unregistered)

    Sex <> Gender

  • Cat (unregistered)

    Gender and sex are annoyingly complicated in medical software.

    First, because it's critical to know not just the patient's gender identity, but also the state of their reproductive biology. A transgender individual might be a male but have functioning female reproductive organs, and thus one might need to take a potential pregnancy into consideration when considering a course of treatment. Both of these are critical but separate pieces of information, and each of these is also potentially distinct from the patient's legal gender as it appears on official identification, which can also be distinct from their insurance subscriber details.

    Second, because medical systems need to exchange data with hundreds or thousands of external systems even within one single hospital system, huge numbers of systems only accept a single "M" or "F", and even the newest standards for information exchange lump gender identity, sex, and legal gender into a single field with no support for anything except "Male", "Female", "Unknown", or "Other". Even if your system has the right information, a round trip through a third party can cause all kinds of headaches because the vocabulary of the standard is insufficient to describe the data you're exchanging.

  • CompleteMisogynist (unregistered)

    I expect this crap of liberal arts majors, not programmers. If a simple system covers 99.99% of cases, and the other 0.01% don't really matter, then don't make it more complicated than it needs to be. Gender is Sex, and it is binary almost all the time. People who don't fall into the binary categorization know they're special, and they can deal with it.

    What programmers need to know about gender:

    1. Does your system really need to track gender? If not, DONE
    2. Are you running a survey? If so, the consumer of the survey is looking for the big picture. Subtle variations of gender reported by respondents are just noise. If your survey is not specifically about gender, just use MALE/FEMALE.
    3. Are you building a system for medical records? If so, specify biological sex as MALE/FEMALE (/OTHER?), and let the doctors fill in the patient specific details.
    4. Are you building a dating system? Believe it or not, your users will care about the biological sex of the other users.
    5. Are you building a nutrition/fitness system? Include a field for MALE/FEMALE body type, because this is what actually matters.
    6. ...

    The list of cases where MALE/FEMALE is sufficient just goes on and on and on. There are so few exceptions to the MALE/FEMALE dichotomy that they aren't worth wasting time on.

  • Olivier (unregistered) in reply to CompleteMisogynist

    On the point 4, so people are attracted to TG, so it would be better that your dating site takes care of them too.

  • Olivier (unregistered)

    Sex 6? 9? Depends, is it metric or imperial?

  • M-L-D (unregistered) in reply to herby
    Gender is really quite simple: Have an integer that counts the number of X chromosomes. That ought to do it.
    Nope! Even leaving aside modern gender theory, the "count the chromosomes" method doesn't even pass muster when it comes to biology. https://en.wikipedia.org/wiki/Turner_syndrome

    Pro-tip: when an expert says something is complicated...believe them.

  • CompleteMisogynist (unregistered) in reply to Olivier

    Fair. Conversely, some people will not be interested in TG. But "M/F looking for M/F" covers the vast majority of cases. Look, people know what they want. On a dating system they want sex, and they want a particular kind of sex. That means they're looking for people with the right anatomy: specify that, and the system can start finding matches. The details can go in the bio. I know things get complicated. They want someone with the right political views, the right religious beliefs, the right age, the right tax bracket. But the sex? Not really so complicated.

  • Anonymous (unregistered) in reply to Zemm

    A few APIs we use (external and internal) have misspellings. Instead of fixing it they just get documented.

    It might be a right call as changing name would probably break everything that uses this API,

  • Alan Sugar (unregistered) in reply to Parametamolcil

    You're fired.

  • Quite (unregistered) in reply to Zemm

    Yes, we have a few of these. When I see them, I insist that whoever is responsible for maintaining this code put a comment upside this code telling anyone else with good attention to detail that this is a known misspelling, and please do not at this stage suddenly decide you're going to fix it.

  • Kaewberg (unregistered)

    6 = Male, 9 = Female, null = Not a person = Is a company. Or?

  • Quite (unregistered)

    I am also reminded of an advert in a local paper which had obviously been written by a complete numpty, advertising a local clothing store. "Clothes for all sexes," it crowed, "men, women and children!"

  • (nodebb) in reply to Chris

    Transgender is still male or female, just not immutable

    I guess "Intersex" or "Androgynous" would have been more correct for the term I was aiming for.

  • Decius (unregistered) in reply to CompleteMisogynist

    I thought that business sex was prohibited. Clearly the author of that pattern should be arrested for pandering.

  • Thargy (unregistered)

    @completemisogynist,

    I agree with the gist of your comment, KISS is always good advice. However, as to the specifics of gender, in medical applications one cannot simply "leave the doctors to fill in the details". Male and Female require different handling from someone who is female born male and v.v. Those men who choose to become women require significant doses of drugs to maintain their dubious femininity. For a clinician treating such a patient, knowing this information could be crucial. Also, since there's no paper involved, where exactly does a clinician fill in the details? How does one clinician leave a record of why the diagnosis and/or treatment for this female is apparently wrong - unless the system makes provision for it?

    Apart from that, I totally concur with your comment.

  • Lerch98 (unregistered)

    Gender used to be a Boolean, then enum, then an integer. What's next, double precision float?

  • IllegalAlpaca (unregistered) in reply to Thargy

    Wouldn't a medical application include a medical history section for patient records? Just put it there.

  • MiserableOldGit (unregistered)

    Sex is the biological bit, gender is what you identify as, that's how it is used in a medical context. Whether you need to make the distinction, depends on what you are using the data for .... lazy assumptions are the problem, as always with databases.

    And neither are or ever were binary, that's the reality. Again, it might be for your application binary is good enough, but assuming it's immutable is assuming your data is always cleanly entered, and that's never true!

    Anyway, this WTF seems to be that they couldn't be bothered categorising client type and just relied any record with something else in that field as being a company. I get 9 being the ISO for not applicable, but what's 6? If you are going to use a scruffy hack like that at least put a grovelling apology in the comments field.

Leave a comment on “One's Company”

Log In or post as a guest

Replying to comment #:

« Return to Article