Skip to content
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

Exercises do not provide a named file for the code to be delivered #137

Closed
16 of 63 tasks
Trevoke opened this issue Sep 15, 2016 · 22 comments
Closed
16 of 63 tasks

Exercises do not provide a named file for the code to be delivered #137

Trevoke opened this issue Sep 15, 2016 · 22 comments

Comments

@Trevoke
Copy link
Contributor

Trevoke commented Sep 15, 2016

In other tracks, there is a file that people can use to write their code (whether bob.el or bob.rb or bob.ex). In the Scala track, currently, that file does not exist, so we have to guess what the file name is supposed to be.

This issue tracks the exercises that still need to be updated. No checkmark means the exercise still needs to be updated.

  • Hello World
  • Bob
  • Hamming
  • Word Count
  • Pangram
  • Anagram
  • Nucleotide Count
  • Phone Number
  • Grade School
  • Robot Name
  • Leap
  • Etl
  • Meetup
  • Space Age
  • Grains
  • Gigasecond
  • Scrabble Score
  • Difference Of Squares
  • Accumulate
  • Sublist
  • Rna Transcription
  • Triangle
  • Binary
  • Roman Numerals
  • Prime Factors
  • Raindrops
  • Allergies
  • Atbash Cipher
  • Bank Account
  • Crypto Square
  • Kindergarten Garden
  • Robot Simulator
  • Queen Attack
  • Binary Search Tree
  • Hexadecimal
  • Largest Series Product
  • Luhn
  • Clock
  • Matrix
  • House
  • Minesweeper
  • Ocr Numbers
  • Octal
  • Trinary
  • Wordy
  • Food Chain
  • Linked List
  • Custom Set
  • Nth Prime
  • Palindrome Products
  • Pascals Triangle
  • Pig Latin
  • Pythagorean Triplet
  • Saddle Points
  • Say
  • Secret Handshake
  • Series
  • Sieve
  • Simple Cipher
  • Connect
  • Parallel Letter Frequency
  • Acronym
  • Forth
@ricemery
Copy link
Member

It doesn't necessarily matter what the class file is named. If the user wants the class file named to match the class used by the tests, then this is easy enough to deduce from the tests.
Unless we include stubbed out classes and objects, the user is going to have to figure out the class name from the tests anyways.

I'm not necessarily against having an empty class file for the user. But, it seems like a bunch of unnecessary work to me.
BTW: Having the empty file to fill out is not standardized across all the tracks. I have been working through the Rust track. There are not empty files for the Rust solutions.

@Trevoke
Copy link
Contributor Author

Trevoke commented Sep 15, 2016

I was under the impression that exercism required a particular file name for recognizing submissions. Is that not the case?

@ricemery
Copy link
Member

Not to my knowledge. The exercism command line takes the filename as a param.

exercism submit filename

@Trevoke
Copy link
Contributor Author

Trevoke commented Sep 15, 2016

You're right, I'm wrong, it just depends on the provided root directory name for the exercise. So this is just a matter of convenience for the end user.

(If the Rust track doesn't provide a file, it should! :D )

@abo64
Copy link
Contributor

abo64 commented Nov 24, 2016

Part of the fun can be to figure out the types and signatures.
But especially for beginners this might be too demanding. So maybe have them added?

@ErikSchierboom
Copy link
Member

Well, the way the Elm track does it, is by only providing an empty implementation file (albeit with a module definition on top). As @abo64 said, people should be able to figure out the types and signatures themselves, unless we want to guide them towards taking a specific path of course. So what about having empty files? Or maybe even better, use the ??? placeholder for the first few exercises to help people get started. E.g. the bob exercise could have a default file with the following contents:

object Bob {
  def hey(statement: String): String = ???
}

That way we can gradually ease users into learning Scala, and when the user has done a few exercises, we no longer provide a default implementation.

@abo64
Copy link
Contributor

abo64 commented Nov 24, 2016

Sounds good to me, @ErikSchierboom
Perhaps let's make it a rule then that if we provide such a non-empty file we always add some comment about it in the exercise's HINTS.md similar to the Haskell track?

@ErikSchierboom
Copy link
Member

That seems like a very good idea! The ecmascript track also added some comments to the code:

//
// This is only a SKELETON file for the 'Bob' exercise. It's been provided as a
// convenience to get you started writing code faster.
//

class Bob {
  hey(message) {
    //
    // YOUR CODE GOES HERE
    //
  }
}

export default Bob;

I wonder if we should do both. Do people always read the README fully? Sometimes I don't, and I just look at the tests.

@abo64
Copy link
Contributor

abo64 commented Nov 24, 2016

Yeah, why not.
But here is a fun fact: The Haskell guys decided to not include any comments into the code, partially as an educational measure to force people to read the READMEs.
Question is whether this really works out. :-)

@ErikSchierboom
Copy link
Member

I am away bit skeptic about that 😀 I think we should only add the comments in code in the first exercise. Then the next couple of exercises could have only a stub implementation file.

@rbasso
Copy link

rbasso commented Nov 24, 2016

The Haskell guys decided to not include any comments into the code, partially as an educational measure to force people to read the READMEs.
Question is whether this really works out. :-)

I'm pretty sure most people don't read the README at first @abo64, but maybe they do after suffering for a while. 😁

At first we used comments @ErikSchierboom, but the users - surprisingly - where not removing them before submitting. It was so frequent that started to be annoying to review the solutions. I really don't understand people...

@ErikSchierboom
Copy link
Member

Hmmm, I think @rbasso has a point. The ecmascript track also has comments in the code, and a quick sample showed that around half of the people still had the comments in their code when they submitted. Perhaps we should then not put the comments in code, but only provide the stub implementation.

ricemery added a commit to ricemery/xscala that referenced this issue Dec 15, 2016
…d Allergies.scala to src dir - refs exercism#137. Add topics to config.json - refs exercism#125
ricemery added a commit to ricemery/xscala that referenced this issue Dec 15, 2016
ricemery added a commit to ricemery/xscala that referenced this issue Dec 15, 2016
… Add CryptoSquare.scala - refs exercism#137. Add topics to config.json - refs exercism#125
ricemery added a commit to ricemery/xscala that referenced this issue Dec 15, 2016
ricemery added a commit to ricemery/xscala that referenced this issue Dec 15, 2016
…d Raindrops.scala - refs exercism#137. Add topics to config.json - refs exercism#125
@ricemery ricemery mentioned this issue Dec 15, 2016
ricemery added a commit to ricemery/xscala that referenced this issue May 16, 2017
ricemery added a commit to ricemery/xscala that referenced this issue May 16, 2017
ricemery added a commit to ricemery/xscala that referenced this issue May 16, 2017
ricemery added a commit to ricemery/xscala that referenced this issue May 16, 2017
ricemery added a commit to ricemery/xscala that referenced this issue May 16, 2017
ricemery added a commit to ricemery/xscala that referenced this issue May 16, 2017
ricemery added a commit to ricemery/xscala that referenced this issue May 16, 2017
ErikSchierboom added a commit that referenced this issue May 16, 2017
Add file with expected interface. Refs #137
ErikSchierboom added a commit that referenced this issue May 16, 2017
Add file with expected interface. Refs #137
ErikSchierboom added a commit that referenced this issue May 16, 2017
Add file with expected interface. Refs #137
ErikSchierboom added a commit that referenced this issue May 16, 2017
Add file with expected interface. Refs #137
ErikSchierboom added a commit that referenced this issue May 16, 2017
Add file with expected interface. Refs #137
ErikSchierboom added a commit that referenced this issue May 16, 2017
Add file with expected interface. Refs #137
ErikSchierboom added a commit that referenced this issue May 16, 2017
Add file with expected interface. Refs #137
@ErikSchierboom
Copy link
Member

@ricemery Great work @ricemery. I've updated the starting comment to reflect the recently merged changes.

@ricemery
Copy link
Member

Should we close this issue?
Or, should we remove any interface definitions that have been checked in for the exercises that are past the first 10?

@abo64
Copy link
Contributor

abo64 commented May 28, 2017

I think we can be relaxed here and just keep the ones past the first ten.

@ErikSchierboom
Copy link
Member

Agreed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants