Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
MikeIsAnAsset
@MikeIsAnAsset
never thought about that lol
Sam Warner
@sjwarner-bp
class Twofer {
    String twofer(String name) {
        throw new UnsupportedOperationException("Delete this statement and write your own implementation.");
    }
}
This is what you'd start out with. The error message comes from here. If you've deleted the third line (throw new UnsupportedOperationException) then you shouldn't be getting that message.
MikeIsAnAsset
@MikeIsAnAsset
nope same error. in place of that 3rd line is the first var code block I posted
that if else block
Sam Warner
@sjwarner-bp
Is the file you are editing in the correct place? i.e. two-fer/src/java/main/TwoFer.java or something like that?
MikeIsAnAsset
@MikeIsAnAsset
just got it to pass!
forgot semicolon after String expected = ""
Sam Warner
@sjwarner-bp
What was the problem?
MikeIsAnAsset
@MikeIsAnAsset
forgot semicolon after String expected = ""
Sam Warner
@sjwarner-bp
Hmm that is odd. I would have expected you to get compiler errors instead of a failing test.
MikeIsAnAsset
@MikeIsAnAsset
I had a lot in my terminal, so maybe I overlooked it
oh
so I think the first time it was a save problem (failed test) second was compile error
thanks for all your help!
Sam Warner
@sjwarner-bp
That's ok! No problem, that's why we have this channel :smile:
Drop another message if you run in to any more problems
MikeIsAnAsset
@MikeIsAnAsset
awesome. thank you!
Jeffrey Sander
@jssander
I would like to try and implement the go-counting exercise for the java track, but there is no canonical data file for it as far as I can tell. What should I do?
Sam Warner
@sjwarner-bp
Hmm
Let me take a look quickly 🙂
So it looks as though Python has a (fairly minimal) test suite, which we could mimic
The F# track looks like it uses almost the same tests
So I'd suggest doing that. If you are feeling particularly outgoing, it would be super useful to raise a PR for implementing canonical data in problem specifications! That way other people won't run in to issues, and we can properly version this suite. Because the tests are already in two places, it might even be quicker than making it from scratch.
What do you think?
Jeffrey Sander
@jssander
I've never done a PR for problem specifications before
Jeffrey Sander
@jssander
It looks like there is already an issue on github for the go-counting canonical data in the problem specifications repository
maybe I will take care of that first
Sam Warner
@sjwarner-bp
Whichever you prefer - of course all of this is up to you! 🙂
Jeffrey Sander
@jssander
go-counting has two large 2-dimensional arrays which are used as input to the tests. I am unsure how to put this into the canonical data file
Sam Warner
@sjwarner-bp
I would look at the diamond exercise for inspiration - have you checked that out?
Jeffrey Sander
@jssander
ok
Well in diamond the 2-dim array is different for every test. Here it is the same array for many of the tests. Is there a way to have a constant or should I repeat the array for every test case in the canonical file? Does that make sense?
I think I will just copy it over a new for each test case in the canonical file and then see what they say about that.
Sam Warner
@sjwarner-bp
Implement it as sensibly as you can, and then submit a PR - we will then be able to review it and see if there is anything extra we can do to it 🙂
Jeffrey Sander
@jssander
ok
thanks
What should I use as the version number?
Jeffrey Sander
@jssander
I submitted a PR, but the build failed.
Sam Warner
@sjwarner-bp
I'll take a look now :smile:

Oooh, looks like some of the guys have beaten me to it! There are some pretty comprehensive comments and even a gist with a pointer :smile:

If you're still wondering about the version number, I'd go with 1.0.0

Jeffrey Sander
@jssander
Is there a standard way of having a java function return a X, Y coordinate pair in exercism?
Norbert Melzer
@NobbZ
There are functions in Java?
Sam Warner
@sjwarner-bp
@jssander I would point you to the Point class (pun intended) :laughing:
Would that help your issue? :smile:
Jeffrey Sander
@jssander
I submitted a PR for adding the go-counting exercise, but there are conflicts regarding config.json. I guess it still has the entry I added for two-bucket.
Could you take a look when you get a chance?
Also I'm not sure why everything in my comment is showing up as what looks like bold text.
Sam Warner
@sjwarner-bp
That's ok! Don't worry about it. Frida and myself have left comments, let me know what you think 🙂
Jeffrey Sander
@jssander
Ok, can you help me rebase or merge with master?
Jeffrey Sander
@jssander
I tried git rebase upstream/master, but it said it is up to date