Doing Terrible Things To Your Code

In 1992, I thought I was the best programmer in the world. In my defense, I had just graduated from college, this was pre-Internet, and I lived in Boulder, Colorado working in small business jobs where I was lucky to even hear about other programmers much less meet them.


This is a companion discussion topic for the original entry at http://blog.codinghorror.com/doing-terrible-things-to-your-code/
5 Likes

Regarding falsehoods about Gender…
Some humans naturally change sex

This can be an issue if the customer doesn’t believe in that “liberal nonsense” due to their religious convictions. When requirements don’t match physical reality, nothing you can do can save the project.

4 Likes

Let’s start with Patrick McKenzie’s classic Falsehoods Programmers Believe about Names:

IMVHO a much better resource with respect to problem with names is W3C Internationalization’s Personal names around the world, mostly because it has examples for each uncommon case, instead of being bare bones plain-list of falsehoods.

2 Likes

Here are two videos that also nicely make this point:

On Time:

On Internationalization:

1 Like

Something tells me you wrote this article in the answer to a real case happened recently in Discourse, behind the scenes? Just curious.

I’m not sure about the medical forms you saw but the ones I saw typically list “sex” rather than “gender”.

1 Like

So, what are intersex individuals listed as?

And so what if someone does say they want to be considered third gender, regardless of physical sex? Outside of the medical usecase, what’s the point in preventing them? Does it really matter to anyone?

2 Likes

Perhaps people remember the “time to first crate” used for older fps games… the time it takes for the first destructible crate to appear on a level.

I assure you, QA has a “time to first bug” contest going on the new software release. Nothing like a nice, target rich environment for a good day of testing.

2 Likes

Add more Tom Scott: https://www.youtube.com/watch?v=46ehrFk-gLk

I still think that the Chinese have the right idea: no more timezones!

Although…think about how much would break if suddenly time zones were NOT a thing any more…

1 Like

Add to the list “People will have administrator rights on their machine to install my program”.

2 Likes

As somebody who works in healt-care, I can assure you it’s not politically bullshit. The doctors here work with varying definitions of gender depending on what they are trying to do. You are right it’s a medical issue. Also, hermaphrodites are naturally born once in a while.

3 Likes

1992 wasn’t pre-Internet - it was pre-web. The Internet was very much around, and I’m surprised that, whilst you were at college, you didn’t have any knowledge of it or interaction with it.

If capturing gender is a requirement of the system, then, as part of good design, one should consider edge cases. The list simply provides examples of cases encountered. Nothing to do with political correctness; it is about data integrity.

If you don’t like the fact that systems capture gender (or over-collection of data in general) that may be interesting to consider during the requirements phase, but not related to an article about testing.

3 Likes

Disclaimer: this will probably be just a self note which will make no sense to anyone else…

In my case, I never thought I were the best programmer (or anything, for that matter) anywhere. Maybe because there were always someone better than me near enough… And to yet another opposite thing, Test Driven Development was always so much in my blood that I never really cared that much for abstracting it. Testing was just a natural thing to do. Also reason why I always hated having to deal with date and time. That is until good libraries came around, at some point in 2000’s.

I had this argument as a mid-level developer working on a government project. In hindsight it seems about as important an argument as who is the best Dr. Who.

The forms we were building all used the term “gender” in place of “sex” which I thought was goofy, because the rationale was that the word “sex” was not politically correct, despite the possible values being “male/female” versus “masculine/feminine”. I just did what they asked me to and shrugged my shoulders. Not even close to the top of the list of bad government design decisions on that project.

How about leaving gender as an enumerated numeric data type and letting the customer worry about how to label the values?

I worked on a medical application where there were valid reasons to have other values in the place of “Male/Female”, so I created an open-ended enumeration started with “Male/Female” and walked away. Unless there are any evaluations required, this is a moot argument. If there are evaluations required, why not (JSON):

[
  {
    id: 0,
    label: 'Male',
    evaluateAs: 0,
  },
  {
    id: 1,
    label: 'Female',
    evaluateAs: 1,
  },
  {
    id: 2,
    label: 'Male, born Female',
    evaluateAs: 0
  },
  {
    id: 3,
    label: 'Female, born Male',
    avaluateAs: 1
  }
]

But to make the developer guidelines an argument about conservative vs. liberal and political correctness is simply obnoxious, is wholly unprofessional, and misses the point of the post, which is about testing code, not about the politically correct customer and how stupid he may or may not be.

3 Likes

I was having a particularly rough day today, and just had a feeling that you would be able to help. Thanks for this post, as it has reaffirmed my position to delete and remove as much crappy dead software as possible. This blog post is going on my internal team wiki as we are all new owners of some really old crappy, crufty stuff that has a lot of opportunity for improvement.

Many thanks for yet another gem.
/Em

1 Like

:slight_smile: Back in the day i managed to crash an A17 then Unisys largest mainframe by doing agressive testing :slight_smile:

1 Like

Chinese did not do any test during software development?

That’s not a bad solution, except that in a medical environment, the glaring bug is liable to result in someone’s injury or death. Medical is a 0%-margin-of-error industry (even though it doesn’t seem like it sometimes…)

In a non-medical environment, this offends the people who think there are 0 sexes. Or 9. Or an infinite number of gradations.

And what of the people who believe that you can be one sex Monday, a different sex Tuesday, and yet another Wednesday?

3 Likes