Improve Problem description for Rectangles

Open
#2,062 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Domain
documentation

Research direction

Search the repository for the Rectangles problem description and the quoted sentence. Read the surrounding examples and existing wording, then remove or replace the confusing sentence with unambiguous text; done means the rendered description clearly explains the input shape without redefining rectangles.

Written by the indexing model from the issue text.

Description

The Rectangles problem asks users to count the number of rectangles in an array of ASCII text. In the problem description, an illustration of such an array is given, and its valid rectangles are called out.

However, there's a sentence at the end of the problem description that seems unhelpful:

You may assume that the input is always a proper rectangle (i.e. the length of every line equals the length of the first line).

What does this mean? It's confusing because:

  1. The sides of the rectangles do not need to all be equal (that's a square of course, which is a special case of a rectangle.)
  2. The "first line" means what?

I would propose that this sentence simply be removed, since knowing what a rectangle is seems pretty fundamental, and this sentence doesn't make anything clearer. If for some reason there needs to be explanatory text there, I think it should be helpful and unambiguous, perhaps like:

A rectangle's opposite sides will be both parallel and equal to each other in length. A rectangle's adjacent sides may or may not be equal to each other in length. You can see in the above examples that some rectangles have a height that is equal to their width, and some do not.

Or maybe the sentence is intended to convey something different than what a rectangle is? If that's the case, then I still think it could be clarified to communicate whatever is actually intended.

Dominant language
Ruby
Stars
362
Forks
566
Avg merge
15h 13m
Merged PRs (30d)
8

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from exercism/problem-specifications

All issues in exercism/problem-specifications

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.