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

[Lasagna] revision to existing concept exercise #780

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

colinleach
Copy link
Contributor

For discussion on the forum

This revision (the most recent of many):

  • Rewrites and shortens the introduction.md to meet Exercism guidelines.
  • Enforces use of a constant, in place of magic numbers within the code.
  • Points the top-level config.sys to the basics concept, instead of 3 older ones.

The old documentation isn't wasted: I moved some to basics/about.md and some to later concepts.

Including the introduction.md.tpl was my mistake. It should probably be removed now we no longer need to combine bits from 3 concepts.

Copy link
Contributor

github-actions bot commented Sep 9, 2024

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@colinleach
Copy link
Contributor Author

Update: one test is failing on Julia 1.6, the current LTS version, but passes on 1.10, the current latest release.

I'll add a guard clause to this test and push a revision.

FYI - 1.6 will probably be dropped by the end of this year, when 1.11 is released and 1.10 becomes LTS.

exercises/concept/lasagna/.meta/design.md Outdated Show resolved Hide resolved
exercises/concept/lasagna/.docs/introduction.md Outdated Show resolved Hide resolved
exercises/concept/lasagna/.docs/introduction.md Outdated Show resolved Hide resolved
exercises/concept/lasagna/.docs/introduction.md Outdated Show resolved Hide resolved

julia> -1234
-1234
Global variables, created outside any function, are:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The heading refers to constants but we don't mention constant until later. Perhaps we should introduce what a constant is first and then discuss global variables to show why a constant is preferred.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extensively reworded. What do you think of the new attempt?

exercises/concept/lasagna/.docs/introduction.md Outdated Show resolved Hide resolved
exercises/concept/lasagna/.docs/introduction.md Outdated Show resolved Hide resolved
exercises/concept/lasagna/.meta/exemplar.jl Outdated Show resolved Hide resolved
exercises/concept/lasagna/.docs/introduction.md Outdated Show resolved Hide resolved
exercises/concept/lasagna/.docs/instructions.md Outdated Show resolved Hide resolved
colinleach and others added 3 commits September 9, 2024 12:19
Co-authored-by: András B Nagy <20251272+BNAndras@users.noreply.github.com>
Co-authored-by: András B Nagy <20251272+BNAndras@users.noreply.github.com>
@colinleach
Copy link
Contributor Author

There's stuff I need to do for the next couple of hours. I'll go through your suggestions again later today and push the changes.

This exercise has been rumbling around for about 5 years. so it would be good to finally get it right!

Fixing the requested change I missed in the previous commit.
@colinleach
Copy link
Contributor Author

Once we agree on the introduction.md here, I'll copy (most of) that to basics.

@colinleach
Copy link
Contributor Author

I'm trying to keep this first exercise to a minimum, so leaving out implicit multiplication was deliberate. I'm thinking of adding a numbers concept, to deal with this, the various sorts of division, float vs int vs bignum, with a brief mention of rational. Python uses the currency-exchange exercise for this, which may be worth copying.

I haven't made progress on this in the last few days, other than reading around some other tracks. Blame some passing infection and associated fever (the sort of non-specific thing that epidemiologists lump together as ILI (Influenza-Like Infection) and normal people might call "something going around"). Not an aid to clear thinking.

@depial
Copy link
Contributor

depial commented Sep 13, 2024

I hope you feel better soon!

exercises/concept/lasagna/.docs/instructions.md Outdated Show resolved Hide resolved

julia> -16
-16
These mostly work conventionally:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence is a little confusing since we don’t detail what’s not conventional in the next few lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update tomorrow.

exercises/concept/lasagna/.docs/introduction.md Outdated Show resolved Hide resolved

Depending on which other programming languages you know, you may expect parameters, variables or return values to have explicit type annotations.
For now, assume that Julia will infer the types automagically and don't worry about them, we will get to the specifics of the type system in later exercises.
By convention, variable, constant, and function names are *lowercase*, with underscores kept to a reasonable minimum.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe some examples just to be clear?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like something that should be expanded in basics/about.md. I'm trying hard to keep introduction.md to the bare minimum needed to solve the exercise. Jeremy has said repeatedly that this is what he wants, and I'm not disagreeing.

colinleach and others added 2 commits September 21, 2024 21:44
Co-authored-by: András B Nagy <20251272+BNAndras@users.noreply.github.com>
oops...

Co-authored-by: András B Nagy <20251272+BNAndras@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

None yet

3 participants