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

First timer impressions #144

Closed
tejasbubane opened this issue Mar 1, 2017 · 8 comments
Closed

First timer impressions #144

tejasbubane opened this issue Mar 1, 2017 · 8 comments

Comments

@tejasbubane
Copy link
Member

tejasbubane commented Mar 1, 2017

I just got started in erlang via the futurelearn mooc and pulled up some exercism problems to solve.

I found some things confusing. I might be wrong in some cases here, but just thought of putting this here so we can make the process easier for other newcomers.

  • rebar?: No explaination of what rebar is - neither on exercism site nor on their homepage.
  • app.src: Some other tracks have boilerplate code given (atleast for first few exercises). My initial impression on seeing this file in /src was this was some boilerplate code, but later found out it was some kind of app description.
  • version: The test failure for version was cryptic:
======================== EUnit ========================
file "hello_world.app"
  application 'hello_world'
    module 'hello_world'
      module 'hello_world_tests'
        hello_world_tests: version_test...*failed*
in function hello_world:test_version/0
  called as test_version()
in call from hello_world_tests:'-version_test/0-fun-0-'/0 (/Users/tejas/exercism_submissions/erlang/hello-world/_build/test/lib/hello_world/include/exercism.hrl, line 11)
in call from hello_world_tests:version_test/0
**error:undef
  output:<<"">>

        hello_world_tests: say_hi_test...ok
        [done in 0.006 s]
      [done in 0.006 s]
    [done in 0.006 s]
  [done in 0.006 s]
=======================================================

Do we need the test for version number? Can we make the output more clear. I was not aware of test_version/0 until I saw the includes/exercim.hrl.

  • make it easy: Is rebar an overkill for single module exercises as opposed to using EUnit directly?
@NobbZ
Copy link
Member

NobbZ commented Mar 1, 2017

Hello Tejas!

I really appreciate your feedback and I do feel sorry about the points you mentioned. I also have to admit, that one tends to forgot how it was when beeing new and discovering such stuff as you did today.

Since I am the only maintainer currently, there is an important piece missing here: peer review. I have to trust myself that I have covered everything. Sometimes I miss some points though.

Of course I will do some additions to the documentation which covers your points. Currently I am thinking about writing a tutorial which acts as an introduction into exercism and erlang tool chain as used in the exercises. I think the structure/content will be like this:

  • fetch the first exercise (explain exercism fetch erlang)
  • run tests on that exercise and let them fail (explain rebar3 eunit)
  • add solution module, also sidenote about *.app.src and the version_test
  • run tests again and let them pass
  • submit solution (explain exercism submit)
  • fetch next exercise
  • guide through solving it the TDD way (maybe I will change order of exercises a bit to have some good example at this place)
  • submit the solution
  • let the student fetch, solve, submit the next exercise on his own, providing some places where he can find help, as well as explaining the possibility to submit unfinished solutions.

Also I will definitively provide some stub-modules, at least for the first couple of exercises in the next days. Until then I will open up an issue free to fetch for everyone.


And also an answer to your very last question:

I introduced rebar only a couple of weeks, ago, because it is much simpler to use then the former way of compiling and running the modules on your own everytime. Also using rebar is much more uniform, the command used to test is the same throughout all exercises, without it you had to specify the module under test every time, it used to look like this:

$ erlc *.erl
$ erl -noshell -eval "eunit:test(hello_world, [verbose])" -s init stop

This was also an issue on windows installations that used choco to install, since there was no "shim" created for erlc. One could have circumvented this by providing also the necessary commands to do the same from EShell (just type erl), but using EShell in windows is even worse regarding UX.

Last but not least, rebar gives us the opportunity to not only have single module exercises/solutions but multi-module as well. I think about splitting up zypper here, because it would feel much better designed when we had the actual zypper and the datastructure to zyp in different modules.

@xymbol
Copy link
Contributor

xymbol commented Mar 23, 2017

Landed here with a similar experience. For others, I will post a solution here:

  1. Create a src/hello_world.erl with the content below.
  2. Ignore the instructions, run with rebar3 eunit.
  3. All tests should pass.
-module(hello_world).
-export([hello/0, test_version/0]).

hello() ->
  "Hello, World!".

test_version() ->
  2.

@NobbZ Having a tutorial would be nice but seems like an unrelated goal. This track is up and can't wait to be fixed. Most of the people in Exercism have probably tried a few other languages. One should not expect additional background for one particular track.

Some ideas to make it better:

  • If rebar3 is the way to go then drop erl instructions
  • Provide placeholder files with comments for first exercises
  • Add more meaningful notes and pointers

For example, in the "hello world" exercise we have a version_test() function with an assertion for a test_version() function returning a meaningless value of 2. Why, really?!

I would put extra care in the first few exercises and run them through new users. Getting your feet wet is the raison d'être for Exercism. Someone with a minimum experience in a particular language would not go through the pain otherwise.

Please let me know if I can help.

@NobbZ
Copy link
Member

NobbZ commented Mar 24, 2017

If rebar3 is the way to go then drop erl instructions

Please point me to where you have still found erl instructions? I was under the impression I already had removed them all.

Stubfiles and more/better hints are definitively on my TODO list, but I am alone in this track currently, having a dayjob, a newborn, her older brother, my wife, I am studying, and I do exercism if I find some time for it.

So, yes, help is appreciated and I welcome it, but I do not think, that I will be able to do anything beyond typo fixes before Easter, then lecture phase begins and I might be able to dedicate an hour or two per week to xerlang during longer pauses between lectures. Until then PRs are welcome.

@xymbol
Copy link
Contributor

xymbol commented Mar 24, 2017

Please point me to where you have still found erl instructions? I was under the impression I already had removed them all.

First exercise? Most others don't even have a README file. https://github.com/exercism/xerlang/blob/4ddca0e1ec8a550d360ee179a221c8e596349123/exercises/hello-world/README.md#running-tests

... but I am alone in this track currently, having a dayjob, a newborn, her older brother, my wife, I am studying, and I do exercism if I find some time for it.

Please, don't take any of this personally. Trim down the files, lower the number of exercises and make it clear that help is needed and, that material can be incomplete or outdated. Asking for help or stepping down are always options.

@NobbZ
Copy link
Member

NobbZ commented Mar 24, 2017

I don't take it personal. Just the other way 'round. I really appreciate your suggestions. But since I am the last maintainer in the track, stepping back is one of the last options I consider. I do not wan't to get xerlang orphaned, since the language is beautiful (well, the language minus its syntax ;))

Also, I won't reduce the number of available exercises, since it will make no difference if there are 10 or 100, the work that needs to be done is pretty much the same, since most of it is around the exercises.

You are right though. At some point I will need to check if all exercises are up to date with x-common and take action. But currently there is nothing forcing me to update the tests, keeping them in sync with upstream is only cosmetic.

For that dangling README.md which fools us... I never considered to look right beneath the exercises itself. since in theory the README gets auto-created from a couple of sources. But it seems as if the README in the repository is prefered over the auto-generated, which would be much more accurate. I will simply delete that dangling README, that should fix at least that issue (after @kytrinyx does the next deploy).

@kytrinyx
Copy link
Member

We've got documentation about how the exercise READMEs are generated here: https://github.com/exercism/docs/blob/master/contributing-to-language-tracks/fixing-exercise-readmes.md (not sure if it helps in this case).

If there are language-specific hints that would help they can be added to a HINTS.md file, and it will be included in the final README.

xymbol added a commit to xymbol/xerlang that referenced this issue Mar 27, 2017
Updates instructions for running tests using `rebar` and versioning.
Uses the Elixir, C, Go and Ruby tracks as inspiration. See exercism#144.
xymbol added a commit to xymbol/xerlang that referenced this issue Mar 27, 2017
Updates instructions for running tests using `rebar` and versioning.
Uses the Elixir, C, Go and Ruby tracks as inspiration. See exercism#144.
xymbol added a commit to xymbol/xerlang that referenced this issue Mar 27, 2017
Updates instructions for running tests using `rebar3` and versioning.
Uses the Elixir, C, Go and Ruby tracks as inspiration. See exercism#144.
xymbol added a commit to xymbol/xerlang that referenced this issue Mar 27, 2017
Updates instructions for running tests using `rebar3` and versioning.
Uses the Elixir, C, Go and Ruby tracks as inspiration. See exercism#144.
@stale stale bot added the wontfix label May 23, 2017
@stale
Copy link

stale bot commented May 23, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@NobbZ
Copy link
Member

NobbZ commented Jan 30, 2021

As with v3 everything will change in regard of UX and workflow, I will close this issue.

@NobbZ NobbZ closed this as completed Jan 30, 2021
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

4 participants