Skip to content

Is "write a program" accurate? #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
petertseng opened this issue Aug 6, 2016 · 12 comments
Closed

Is "write a program" accurate? #321

petertseng opened this issue Aug 6, 2016 · 12 comments

Comments

@petertseng
Copy link
Member

petertseng commented Aug 6, 2016

We have a lot of descriptions that say "write a program". As exercism/exercism#2746 explains, this may set up a wrong expectation from students that they are writing e.g. something with a main function (or equivalent entry point in language of choice).

But it seems that most tracks I've seen simply ask the student to write a function. Most languages then verify the behavior with unit tests against that function.

In the interest of setting up expectations correctly, shall we replace "write a program" with "write a function"?

Things I would like to check before doing that:

  • Are there any tracks that do, in fact, expect the student to write a full-fledged program?
  • Are there any tracks in which the equivalent concept is not called a function? (Perhaps it's called a procedure instead? Or something completely different?)
    • Even if there aren't, what if we add such a track in the future?
    • If there currently are or could be in the future, should we do anything about it? In other words, do we decide that we'll simply use a "function" as a generic terminology, regardless of how this concept maps onto the target language?

Anything else I'm missing?

Appendix:

$ grep -li "write a program" *.md
change.md
crypto-square.md
etl.md
food-chain.md
grains.md
luhn.md
protein-translation.md
scale-generator.md
sum-of-multiples.md
transpose.md
two-bucket.md

$ grep -li "write a program" *.yml
allergies.yml
all-your-base.yml
anagram.yml
beer-song.yml
binary-search-tree.yml
binary-search.yml
binary.yml
change.yml
flatten-array.yml
food-chain.yml
gigasecond.yml
grains.yml
hamming.yml
hello-world.yml
hexadecimal.yml
house.yml
kindergarten-garden.yml
largest-series-product.yml
leap.yml
luhn.yml
matrix.yml
minesweeper.yml
nth-prime.yml
ocr-numbers.yml
octal.yml
paasio.yml
palindrome-products.yml
parallel-letter-frequency.yml
pascals-triangle.yml
phone-number.yml
point-mutations.yml
protein-translation.yml
proverb.yml
queen-attack.yml
raindrops.yml
rna-transcription.yml
robot-name.yml
saddle-points.yml
say.yml
scale-generator.yml
scrabble-score.yml
secret-handshake.yml
series.yml
sieve.yml
space-age.yml
sum-of-multiples.yml
transpose.yml
triangle.yml
trinary.yml
twelve-days.yml
two-bucket.yml
word-count.yml
wordy.yml
zebra-puzzle.yml
@kotp
Copy link
Member

kotp commented Aug 6, 2016

Perhaps "write a program" is the most generic way to address this? In the case of Ruby, I don't think I have yet to see a "Write a method" request, on its own, the final result is usually a class or a module, and many solutions don't require either, which is perfectly fine with me. It leaves the implementations open.

Most generically, it may be "write instructions" to accomplish something.

Once you ask for a function or procedure or method, you are probably being too specific, even the tests in many cases may be considered too specific, driving a certain way to solve something, which may be impossible to avoid, or just may be hard to avoid.

@NobbZ
Copy link
Member

NobbZ commented Aug 6, 2016

What were if we ask for writing a library? This leaves everything open
while not suggesting the io stuff.

KOTP [email protected] schrieb am Sa., 6. Aug. 2016 12:20:

Perhaps "write a program" is the most generic way to address this? In the
case of Ruby, I don't think I have yet to see a "Write a method" request,
on its own, the final result is usually a class or a method, and many
solutions don't require either, which is perfectly fine with me. It leaves
the implementations open.

Once you ask for a function or procedure or method, you are probably being
too specific, even the tests in many cases may be considered too specific,
driving a certain way to solve something, which may be impossible to avoid,
or just may be hard to avoid.

@Insti
Copy link
Contributor

Insti commented Aug 6, 2016

"write some code"?

(Library sounds big and scary.)

@kotp
Copy link
Member

kotp commented Aug 6, 2016

"Write code" sounds cryptic... just kidding. But yeah, the same "generic" flavor.

@petertseng
Copy link
Member Author

I agree that library seemed potentially too large in scope. It's admitted to me that there are some tiny libraries, but maybe such a thing would not be as apparent to students.

"Write code" seems suffciently generic. I think I would prefer it to "write a function".

Here is another possible suggestion I have: Just remove the words completely. As an example, binary-search, before:

Write a program that implements a binary search algorithm.

Binary search, after:

Implement a binary search algorithm.

Seems to avoid duplication if every exercise has "write code" in common

@kotp
Copy link
Member

kotp commented Aug 8, 2016

I agree with this, the removal allows the "obvious" interpretation regardless of terms the individual user should choose to replace with the implied statement. We don't care if they write it or craft it or conjure it, whatever it is, as long as the tests pass and they get the learning experience from it. (And even the tests passing are only a guide and a common reference, in their experiences context.)

@kytrinyx
Copy link
Member

I like the idea of removing the words where possible, and if not, go with a super generic "some code" to avoid the but this is not an X argument.

@robkeim
Copy link
Contributor

robkeim commented Jan 30, 2017

Here's a PR for this: #528

robkeim added a commit that referenced this issue Feb 1, 2017
Removes "write a program" from descriptions to address #321
@kotp
Copy link
Member

kotp commented Feb 2, 2017

Looks like it was merged in, so closing.

@kotp kotp closed this as completed Feb 2, 2017
@robkeim
Copy link
Contributor

robkeim commented Feb 2, 2017

Thanks @kotp I forgot to close this.

@kotp
Copy link
Member

kotp commented Feb 3, 2017

No problem. Don't forget that if there is a "fixes #000" in the commit, it will do so automatically when they are brought in.

@robkeim
Copy link
Contributor

robkeim commented Feb 3, 2017

Thanks for the explanation @kotp. I had "addresses #000" in the commit, so it didn't pick that up as a keyword.

Insti added a commit to Insti/x-common that referenced this issue May 23, 2017
Pull Request exercism#775 prepended a problem's blurb to its description. This
resulted in a few descriptions having obvious duplication in the first
few lines.

This PR reviews all descriptions and:
* Removes gratuitous duplication.
* Ensures the first line does not exceed 80 characters.
* Fixes a few spelling/grammar errors.
* Re-arranges a few descriptions for clarity.
* Removes a few occurrences of 'write a program'

Refs:
[PR 775](exercism#775)
[Write a program](exercism#321)
Insti added a commit that referenced this issue May 29, 2017
Pull Request #775 prepended a problem's blurb to its description. This
resulted in a few descriptions having obvious duplication in the first
few lines.

This PR reviews all descriptions and:
* Removes gratuitous duplication.
* Ensures the first line does not exceed 80 characters.
* Fixes a few spelling/grammar errors.
* Re-arranges a few descriptions for clarity.
* Removes a few occurrences of 'write a program'

Refs:
[PR 775](#775)
[Write a program](#321)
@Insti Insti added the policy label Nov 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants