Skip to content

Tricky Triplets - a storified replacement for Two Fer #1470

@kytrinyx

Description

@kytrinyx

Background

When we redesigned Exercism we gave each exercise its own icon. This made a huge difference. The tracks feel a lot more fun and approachable.

A common complaint about exercises is that they feel overwhelming or unapproachable or hard to understand. Often this is because there's too much jargon in the description. Other times it's because the domain is foreign to the reader.

Lately @iHiD, @nicolechalmers, and I have been discussing how we'd like every single exercise on Exercism to be fun and approachable, and we've been discussing how we might accomplish this.

Suggested solution

The approach that we think has a lot of merit is to ensure that each exercise has

  1. an appealing icon
  2. an inviting title
  3. an engaging storyline

We aren't going to go all out just yet and mandate that every single exercise be transformed into a story, however we would very much like to talk about stories for any new exercises that are introduced.

Also, we are open to people proposing stories to either tweak or replace an existing exercise.

There will be a balance to strike with stories. We want to hit the goldilocks zone of "not to little" and "not too much". E.g. "two fer" is not quite enough, but we also don't want to have to invent a whole new alternate universe with magical laws and a complex cast of characters.

Since this can feel really abstract to talk about without an example, we looked at what it could mean to turn the two-fer exercise into a story, and it boils down to this:

  • strip away all the details
  • determine what the technical challenge is

For two-fer, if you strip everything away, the fundamental challenge is to format a simple string with user-provided input, and provide a default/fallback for when the user did not provide a value.

It doesn't matter what the string actually says, what the values are, or what the default value is. That said, we decided to stick with the basic "one for {x, you}, one for me" that two fer already has.

Here's the story that we came up with, as a starting point:


Tricky Triplets

One year ago, Lori gave birth to three beautiful daughters - Toa, Layla, and Adra - identical triplets. She hasn't slept much since!

Lori recently started introducing her daughters to solid food and is using the time-old tradition of eating a bit herself to encourage them: "One for Toa, one for me!", substituting the name of the baby in question, of course.

Recently, her parents came to visit, and they love helping out with the triplets. Unfortunately, they can't always tell them apart.

Your task is to provide a safety net for whichever adult happens to be feeding the triplets. When they can remember the name, they'll use it, but when they can't, they'll just say "you" instead.

In coding terms, you're going to write a short program which can be called in two ways, to either encourage a specific baby by name, or to encourage whichever baby is being fed at the time.

If you call encourage "Adra", the output should be "One for Adra, one for me.". Otherwise, the output should be "One for you, one for me.".

Can you make all the tests pass and ensure that Lori's children don't end up frustrated with their grandparents' ability to tell them apart?


What we want your help with is to finalize the story.

Is this story too much? Too little? Is it missing a key component? Is it problematic in any way?

Once we're certain the story itself is what we want it to be we'll also want to do copy-editing to ensure that it's as expressive as possible, flows well, and is grammatically correct and has no typos.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions