DEV Community

Laura Ojala
Laura Ojala

Posted on

1

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!

AWS Q Developer image

Your AI Code Assistant

Ask anything about your entire project, code and get answers and even architecture diagrams. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Start free in your IDE

Top comments (2)

Collapse
 
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.

Collapse
 
juanicolas profile image
JuaNicolas

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.

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay