Garbled instructions in Role Playing Game

The instructions for the new Role Playing Game are a bit off:

The revive function should check that the player’s character is indeed dead (their health has reached 0).

If they are dead:

  • The player should be revived with 100 health.
  • The player’s mana should be incremented with the increment function. If they are alive:
  • Nothing happens to the player

The second bullet should end after the word “function” and the remainder of the text should be in a new paragraph. When I first read this, I didn’t notice the punctuation and was mystified.

I was also confused by the instructions for title:

The title function should increment a player’s name to give a title, depending on their level.

The increment helper function should be used depending on the level of the player.

  • If the player has the maximum level 42, the name should be passed to the increment function.
  • Otherwise, no title is given and the player’s name remains the same.
    .
    The title function then returns the player’s name.

It was not clear to me that the function is supposed to update the player structure as a side effect (the tests ignore the return value, by the way) and the statement that the increment function “should be used depending on the level” sounds a bit odd since in fact you do not use increment at all unless the level is 42.

I can whip up a PR to clean up the wording if you agree. Thanks again for producing all of these concept exercises. They are really helpful.

3 Likes

Thanks for catching this so quickly! We only merged this a few hours ago.

I’m not sure which time zone @depial is in currently so that response may be delayed, but I’d welcome your PR.

It’s great to see that the Julia syllabus is getting significant interest. It’s a fairly niche science/engineering language with a reputation for a steep learning curve - something we’re trying to make gentler.

1 Like

If anyone prefers a steeper learning curve, I refer you to this MIT course. Lecture 1 spends significant time on downloading and installing the software. By lecture 3 they are discussing interesting things you can do with matrix eigenvectors in image transformation. This is so MIT!

2 Likes
2 Likes

Formatting follies and ghosts of iterations past… :smiley:

Thanks @alterpatzer for catching these things and submitting your PR!

I see you are usually one of the first to complete the exercises. If you ever have any other feedback, we’d be happy to hear it!

the tests ignore the return value, by the way

@colinleach I’ll be addressing this in another PR (it was taken out in a previous iteration and not put back in)

2 Likes

I am a big fan of Julia and have used it since its early days (for instance, when ‘$’ was the xor operator). To my simple tastes, it is about as concise and intuitive as Python, but with far better performance and many attractive features. I am awestruck at the powerful abstractions that the hardcore users produce, though they flutter at the outer limits of my comprehension. I find your syllabus both crystal clear and very well motivated. Thank you for making the effort.

4 Likes

To my simple tastes, it is about as concise and intuitive as Python, but with far better performance and many attractive features.

I agree with your here. Also, after learning Julia, I couldn’t help but feel Python was a bit “clunky” in comparison.

I find your syllabus both crystal clear and very well motivated. Thank you for making the effort.

This is great to hear coming from someone so familiar with the language; Thanks again for your feedback!

Edit: Of course I should point out that @colinleach has been the driving force behind the syllabus’ clarity and motivation, and wouldn’t exist otherwise