Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

[Go] Add numbers concept exercise#480

Merged
tehsphinx merged 1 commit into
exercism:masterfrom
DavyJ0nes:go/numbers-exercise
Feb 7, 2020
Merged

[Go] Add numbers concept exercise#480
tehsphinx merged 1 commit into
exercism:masterfrom
DavyJ0nes:go/numbers-exercise

Conversation

@DavyJ0nes

@DavyJ0nes DavyJ0nes commented Feb 1, 2020

Copy link
Copy Markdown
Contributor

I've taken the approach outlined in the C# example but I'm not entirely confident that this is the correct approach for an intro exercise as it requires type conversion. This may be OK but I'd like to others opinions on it.

As Go has quite a few different numeric types, I've limited it to just int and float64 and given links in to the introduction if students want to dig in more.

This satisfies #371

@DavyJ0nes
DavyJ0nes force-pushed the go/numbers-exercise branch from 11bd262 to bc53b47 Compare February 1, 2020 18:57
@DavyJ0nes DavyJ0nes changed the title Add go/numbers concept exercise [Go] Add numbers concept exercise Feb 1, 2020
@SleeplessByte
SleeplessByte requested a review from a team February 2, 2020 16:25
@tehsphinx tehsphinx added the status/in-progress This issue is being worked on label Feb 3, 2020

@tehsphinx tehsphinx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! Very good introduction!

Just some minor changes :)

Comment thread languages/go/exercises/concept/numbers/.docs/introduction.md Outdated
Comment thread languages/go/exercises/concept/numbers/.docs/introduction.md Outdated
Comment thread languages/go/exercises/concept/numbers/.meta/example.go
@tehsphinx

Copy link
Copy Markdown
Member

I've taken the approach outlined in the C# example but I'm not entirely confident that this is the correct approach for an intro exercise as it requires type conversion. This may be OK but I'd like to others opinions on it.

Type conversion doesn't have an extra exercise planned for now, so this exercise is where it gets introduced.

As Go has quite a few different numeric types, I've limited it to just int and float64 and given links in to the introduction if students want to dig in more.

Perfect! Different float types and usage are introduced more in-depth in a later exercise.

@DavyJ0nes
DavyJ0nes force-pushed the go/numbers-exercise branch from bc53b47 to e1637d3 Compare February 3, 2020 21:54
@DavyJ0nes

Copy link
Copy Markdown
Contributor Author

@tehsphinx I've pushed another commit that changes the exercise to not require the use of conditionals. I still think that it is valid without this but when you get time if you could have a look at let me know what you think? 😄

@tehsphinx

tehsphinx commented Feb 4, 2020

Copy link
Copy Markdown
Member

On first glance it seems very simple now but maybe that is a good thing: We are after all introducing numbers and type conversion here. Maybe put a bit more emphasis on the type conversion in the intro. What do you think?

In the general flow of the exercises, this one makes more sense without conditionals:

image

@DavyJ0nes

Copy link
Copy Markdown
Contributor Author

Maybe put a bit more emphasis on the type conversion in the intro. What do you think?

Good call @tehsphinx , have added a paragraph explaining this a little bit and showing an example. Does this read OK?

Comment thread languages/go/exercises/concept/numbers/.docs/introduction.md
@tehsphinx

Copy link
Copy Markdown
Member

Does this read OK?

Yes, this looks good!

@DavyJ0nes
DavyJ0nes force-pushed the go/numbers-exercise branch 2 times, most recently from 61ba077 to 68012df Compare February 5, 2020 18:21
@DavyJ0nes

Copy link
Copy Markdown
Contributor Author

@DavyJ0nes: Perfect! Can you add the successRate function then and bring it back in line with the C# exercise? Then we can merge this smiley

Nice one, I've updated this with the comments and have squashed the commits into one.

@iHiD iHiD left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice :)

I think we need to slim the introduction down a bit else it'll feel like too much reading for someone doing the exercise, so I've made some comments about parts I'd move into hints or after.

Comment thread languages/go/exercises/concept/numbers/.docs/introduction.md Outdated
Comment thread languages/go/exercises/concept/numbers/.docs/introduction.md Outdated
Comment thread languages/go/exercises/concept/numbers/.docs/introduction.md Outdated
This is based off of the C# exercise and slightly tweaked to work for
Go. The conditional aspect of the exercise has been stubbed out to keep
the exercise focussed on the core topic and have added more detail about
Type Conversion in Go as is a required part of the exercise.
Also added links to the Go Playground to the examples so students can play
around and explore there if they want to.
@DavyJ0nes
DavyJ0nes force-pushed the go/numbers-exercise branch from 68012df to 2d87d72 Compare February 6, 2020 21:16
@DavyJ0nes

Copy link
Copy Markdown
Contributor Author

Nice :)

I think we need to slim the introduction down a bit else it'll feel like too much reading for someone doing the exercise, so I've made some comments about parts I'd move into hints or after.

Thanks for the suggestions @iHiD, I've re-jigged the structure of the docs to not give too much away up front 😄

@tehsphinx tehsphinx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! 😍

@tehsphinx
tehsphinx merged commit 206ccec into exercism:master Feb 7, 2020
@DavyJ0nes
DavyJ0nes deleted the go/numbers-exercise branch February 7, 2020 18:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

status/in-progress This issue is being worked on track/go type/new-exercise Add a new exercise

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants