Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Jeffrey Sander
@jssander
Ok, after those two commands do I commit again? It says there is nothing new to commit.
Jeffrey Sander
@jssander
Now I'm not able to push to new-go-counting. It says the tip of the current branch is behind its remote counterpart.
Norbert Melzer
@NobbZ
As you are (hopefully) the only one pushing to that remote, you can git push --force
Jeffrey Sander
@jssander
Will I lose anything if I do that?
Norbert Melzer
@NobbZ
Yes, everything thats not on your local fork. But usually thats exactly what you want. It only gets hairy if there are more than one person with push access to that repo.
Jeffrey Sander
@jssander
Thank you, it works now.
Jeffrey Sander
@jssander
I'm having trouble rebasing now. There are merge conflicts in go-counting I guess now that my commit has been merged.
Jeffrey Sander
@jssander
I'm trying to implement the dominoes exercise, but struggling with git again. Even after making a new branch and cherry picking a commit, the changes to my previous exercise are still there.
Jeffrey Sander
@jssander
hmmm, I think I got it
Victor Goff
@kotp
The old xjava room can probably be deleted by now.
michaelspets
@michaelspets
I had some troubles importing exercism/java in intellij
michaelspets
@michaelspets
i opened exercises but while i could work properly in .meta source i couldn't in src tests
Has anybody faced this problem?
Norbert Melzer
@NobbZ
@michaelspets I do not use IntelliJ, its too bloated for my little RAM… But what do you mean by "couldn't [work] in src tests"
John Reese
@jpreese
would anyone have a moment to help me with a general Java issue? I'm just trying to import a project (a java project from github) into a new project, and use the code from that imported project.. no matter how I slice it, I just cant seem to import the project. I come from a C# background and have no idea what I'm doing in the Java IDE
once I get that set up, I can fumble around with the syntax
Norbert Melzer
@NobbZ
@jpreese don't learn the IDE first. Just open the files in a plaintext or smarteditor like vscode, atom, notepad++, Emacs, vim and learn the language. After you feel comfortable with the language you can choose a different set of tooling.
Also you should not start by importing parts of a bug project into yours. Either try to extend the big project such that it suits your needs or write your stuff from scratch or use a library. This advice is only about the best way to learn and does not consider legal issues.
John Reese
@jpreese
yeah I'm trying to import it so that I can extend it, it wouldnt really make a whole lot of sense to start from scratch
Norbert Melzer
@NobbZ
So you want to import the project as a whole? Then its either prepared for IntelliJ and has proper project definition files, or you should ask in an IntelliJ group how to do it properly. Or just use the IDE/editor that is used by that project as the main tool
John Reese
@jpreese
I would think its just a general Java question.. similar to in C# you just Add New Project, then right click Add Project Reference to the main project and.. there you go, you can use that project now. It's just, in Java, even if I add it to my pom with Maven, or edit the Gradle file.. or <insert build approach here> it wont find it
Norbert Melzer
@NobbZ
In C# you have an ecosystem dictated by MS, all tooling is centered around whatever MS wants them to be centered around, so its easy there. But its different with Java where you have a plentora of tools that differ in features and how they work. If that project is not prepared for IntelliJ, I think it will not be easy to properly open it in IntelliJ.
That question is also not related to Java, it is related to IntelliJ, since there are a lot of other tools you can edit Java in. Eclipse, Emacs, Vim, Notepad++, Atom, yes, even plain windows Notepad works
John Reese
@jpreese
it.. doesnt have to be IntelliJ, I'll do it in anything
Norbert Melzer
@NobbZ
Then I'd suggest to just use Atom, Sublime or VScode, they usually work out of the box with very little configuration, simply by opening a projects base dir
Assuming correct plugins for a language are installed
Lee Stewart
@zantetsuken88
I wonder if anyone can help me out. Complete newbie to java - although I've completed the codecademy course (which is super short and basic). But I'm having trouble even starting the exercism course. I'm on the 2nd exercise and I just have no idea where to begin.
Norbert Melzer
@NobbZ
Which one is the second for you?
Lee Stewart
@zantetsuken88
It's the 'Twofer' task
I actually managed to get the first two tests to pass now. But yeah in the beginning it's a bit overwhelmingly contextless and I had no idea how to start
Lee Stewart
@zantetsuken88
Sam Warner
@sjwarner-bp
Hey @zantetsuken88, sorry to hear you found it overwhelmingly contextless - do you have any tips as to how we might improve it? :smile:
Lee Stewart
@zantetsuken88

@sjwarner-bp That task has a huge README on TDD which is great, really helpful to understand how to work your way through these tasks in general. But at that stage I wasn't ready for the task itself. I needed a nudge in the right direction.

As it was, it turned out I just needed to understand that if I simply deleted the exception and return the string in the test, that the test would pass.

Once I understood what exactly the test was doing and what it was expecting, (and that I needed to return the value rather than print it), I've been pretty much fine ever since.

Sam Warner
@sjwarner-bp

Thanks for the feedback @zantetsuken88 - I'll relay this info to the other track maintainers and see if we can improve this for future users!

If you have any ideas of what you'd like to see added as hints to the readme / anything else for that exercise, feel free to open a PR for it too - we love having the community grow and raise these issues!

Norbert Melzer
@NobbZ
I glanced over the tests implementation, and I am wondering why there is an object created, also I'm wondering if there are better alternatives than passing null for "whatever the default value is".
Norbert Melzer
@NobbZ
I think using a static object at this state of the track would be much easier for the student.
static class, sorry…
Sam Warner
@sjwarner-bp

Hi @NobbZ, you raise a good point. I think that the only reason we pass null is because that is what happens in the canonical data, but we could deviate (overloaded methods seem obvious here, but might be a more complex idea this early in the track).

As for static, one of our POLICIES is to prefer instance methods. I don't think this would simplify the exercise particularly, though maybe I am the wrong person to ask and we should seek a beginner's input.

Above, Lee has only expressed an issue with the README, something that we might add hints to. I'd be interested in seeing what the others thought here though :smile:

Norbert Melzer
@NobbZ
Then those policies needs to change, to be honest... There is no state in this object. It needs to have an instance for no obvious reasons. I think this is a bad example for the next API design lesson. I have to be honest though, it's a mostly functional mindset speaking here, I'm not sure about Javas idioms, but at least there's the Math class IIRC, which doesn't get instantiated as well.
Sam Warner
@sjwarner-bp
I certainly understand your point - this task is certainly one that requires no state (and a handful of others exercises also spring to mind), but it seems like we've implemented them all with some OOP in mind. It is interesting though, now you've brought this up I can certainly see a very obvious case for them. It might be (slightly) odd if we start new users on a track that begins more functionally (hello-world, two-fer) before becoming very OO, but definitely worth a discussion with the rest of the Java team. I'll ask around! :smile:
FridaTveit
@FridaTveit
@NobbZ if you have a look at the reference for that policy (https://github.com/exercism/java/issues/177#issuecomment-261291741) you can see we've had an extensive discussion around why we want to prefer instance methods. Basically this is because in Java it's considered best practice to write more object oriented code, unlike other more functional languages. So even though these small exercises could easily be implement using static methods, we want to use instance methods so that people learning Java get familiar with them as they'll be more useful later on when writing Java code in general. I hope that makes sense, though of course everything is up for discussion so feel free to open an issue if you still think it would be worth changing :)
Norbert Melzer
@NobbZ
As I said, I'm not aware of Javas idioms, so I totally have to trust you when you say its more idiomatic to have the overhead of useless allocations… At least I have to admit, that in functional languages its very common to copy (and therefore allocate) nearly every value on change ;)
Mpatziakoudi Katerina
@katmpatz
Hi!! I am student in Software Engineering and I really want to contribute in excersism :smile: !! I have already read the contribution guide and I have seen the open issues, but I realized that the majority of them have been implemented. I would like to contribute on code. I am thinking of implementing one of the existing exercises that have not been implemented in java or adding a new exercise. Do you have suggestions for something else that I could contribute or do you have some advice on adding exercises?If I decide to add an exercise that has not been implementing in java, should I open an issue to report which exercise I am going to add? Thank you!! :smile:
Sam Warner
@sjwarner-bp

Hi @katmpatz!! That's great to hear - we always like to get new contributors :smile:

All of the issues should be unresolved. Not all of them require an entire exercise to be implemented, some will be small changes - this can often be a good starting point! At the moment, most of the issues are about updating some of the tests we have. There is a pretty large range of issues to pick up at the minute :smile:

If you would like to implement an exercise that isn't completed in Java yet, the list can be found here. If you let one of the Java team know, we will be more than happy to open an issue and assign you to it, so no-one else will take the same thing!

Does that all make sense? I'm happy to discuss more questions any time :fireworks:

Mpatziakoudi Katerina
@katmpatz
Ok!I will start by trying to solve some open issues. Thanks for your response! :smile:
Sam Warner
@sjwarner-bp
No problem! There is normally someone on here that can answer questions 😊
Jeffrey Sander
@jssander
Could you recommend another open source java project to contribute to? Hopefully one with a relatively small and friendly community like this one.
Logan Stucki
@Smarticles101
deleted the xjava room just now, not sure why it was still open for so long
Victor Goff
@kotp
Thanks @Smarticles101
vincemizuki
@vincemizuki
does anyone know how to fix this error when fetching an exercise java $ exercism download --exercise=matrix --track=java Error: Get /solutions/latest?exercise_id=matrix&track_id=java: unsupported protocol scheme ""