DEV Community

Laura Ojala (she/they)
Laura Ojala (she/they)

Posted on

How many mistakes can you spot in this exercise?

Content warning: This post contains sexist material that might make your brain melt.

Update (June 2020): Course provider has promised to change the wording of their exercises! That is great!

I could not believe my eyes when I saw this programming exercise on a C++ course that is widely offered in Finnish Universities.

How many mistakes can you spot here?

“Write a program that asks the users gender and age. Finally the program prints a sentence based on the following rule:

  • Male 0-55 years: “You are a man in his prime!”
  • Male 56-100 years: “You are a wise man!”
  • Female 0-55 years: “You are like a blooming flower!”
  • Female 56-100 years: “You look young for your age!”
  • Else “Error encountered!” Age is handled as an integer variable and gender as string variable (m/f). Letter case is ignored.”

And if someone does believe this is true, here's a screencap of it:

Screencap from exercise. Text is posted below.

This might be some wicked way of pointing out sexism in IT industry. In my opinion, simply, not cool!

Discussion (2)

sjarva profile image
Senja Jarva

Some mistakes come to mind:

1: What about those who identify as non-binary?
2: What a "nice" way to promote some age-based discrimination...
3: And hmmn, of course men get a comment on their intelligence, and women about their looks.

juanicolas profile image

As a problem, there is problem to solve. As a sexism approach, it can or cannot be one.
the lgbtq isn't worldwide, either feminism.