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

Convert the repository into a Java project #474

Closed
varunu28 opened this issue Jul 29, 2018 · 74 comments
Closed

Convert the repository into a Java project #474

varunu28 opened this issue Jul 29, 2018 · 74 comments

Comments

@varunu28
Copy link
Contributor

varunu28 commented Jul 29, 2018

@christianbender @AnupKumarPanwar @dynamitechetan

This is something which something which we have discussed in the past and have been raised by multiple users of the repo. The repo can be converted to a complete Java project with correct package structure, JUnit tests and Java language standard checkers. I want that anyone who is adding a new algorithm should add respective tests and follow a set coding standard so that the repo can become more usable for users who can then clone it into a local IDE and work on it.

Similar to Scala Repo

I propose that we create a development branch on which we can start making the changes and replace it with the master once it fulfills the above-mentioned requirement. I would like to take the initiative and start this task.

Please share your feedback.

@burnz248
Copy link

Hey Anup. I would like to help with this as well. Let me know what you need help with

@MarisaAfuera
Copy link
Contributor

Hi Anup. Great idea. I also can help if you need.

@rahul-vishwadhaar
Copy link

Hello Anup,

This seems to be great thing. Please let me know if I can contribute.

@ahmedsameha1
Copy link

I'm in.

@mkabdullahi
Copy link

Also, I am in and happy to contributes

@lq920320
Copy link

lq920320 commented Aug 10, 2018

So great, happy to join and contribute.

@esarella
Copy link

Presently working on solving most problems. I'm more than willing to help and contribute.

@asdiamond
Copy link

I can definitely help and contribute to this.

@giannisal
Copy link

I'd love to contribute to make this repo a java project.

From what I've seen so far, the development branch is identical to the master in terms of structure and content. I'm used to working with maven in Java, however I saw that the scala repo is based on Travis CI. Would you like me to work on either of them, create the project and test for some of the existing classes?

@varunu28
Copy link
Contributor Author

varunu28 commented Aug 23, 2018

@giannisal I initially created the development branch. I would move the code to that branch in a project structure by the weekend and would update the README for the test case format. After that we can start accepting contributions to the development branch for the tests
We are using ScalaTest spec in the Java repo

@varunu28
Copy link
Contributor Author

I have updated the development branch and added a instructions to the README. We can start with the migration.

@christianbender Please make sure every PR is adhering to the points mentioned in README on Development branch

@lq920320
Copy link

which build tool should be used, maven or gradle? @varunu28 I didn't see on the Development branch.

@asdiamond
Copy link

What about bazel?

@varunu28
Copy link
Contributor Author

@lq920320 As of now we are concentrating on adding test coverage. We would be deciding on the build tool later

@lq920320
Copy link

@varunu28 ok

@SatyaPrakashDwibedi
Copy link

Hi, all I have started working on sorting algorithms
@varunu28 Are we following java 1.8 here?

@varunu28
Copy link
Contributor Author

@SatyaPrakashDwibedi Yes. We are following Java 1.8.

@Leoat12
Copy link

Leoat12 commented Aug 27, 2018

I'm happy to contribute as well. :)
Just to understand better, it is to transfer the already done algorithms from master to the new branch, in the appropriate package and then make test cases for them, right?

@varunu28
Copy link
Contributor Author

@Leoat12 Exactly(While following the correct coding standards and practices)
So just have a look at the README in development branch and if you see some code which is not according to the Java standard coding guidelines then feel free to refractor it.

@MarisaAfuera
Copy link
Contributor

I would like some help to collaborate with you. When I read Steps to raise a PR, what do you mean with "by using the command git checkout Development". Where do I write this commad? In my local repo or in the github web?

@varunu28
Copy link
Contributor Author

@MarisaAfuera You would have to fork the repo first and then when you cd into the repo on your local machine, you need to switch to development branch using git checkout Development

@MarisaAfuera
Copy link
Contributor

MarisaAfuera commented Aug 27, 2018 via email

@varunu28
Copy link
Contributor Author

@MarisaAfuera I suppose eclipse also has a very good Git support(Not sure about exact setup)

If you face any issues on eclipse, I would advice you to run this command through a terminal

@MarisaAfuera
Copy link
Contributor

MarisaAfuera commented Aug 27, 2018 via email

@burnz248
Copy link

@varunu28 is there any progress on this issue? if not much, I will work on this tonight, and create a PR

@varunu28
Copy link
Contributor Author

@burnz248 The Development branch is created and instructions for opening a PR have been updated in the README of the branch

@Leoat12
Copy link

Leoat12 commented Aug 28, 2018

After forking, cloning and checking out to the Development I noticed that the structure of the project is not conventional, at least as I far as I've seen. The structure we usually see is this:

  • src\main\java\com\example
  • src\test\java\com\example

With this we have the same packages for both source and tests: com.example
I don't know about Eclipse because I will not using it right now, but IntelijIDEA complains a lot with the current structure. I think we can agree that a package structure which appears the "src" folder like here "src.main.com.java.conversions" is not conventional.
What do you think? Would it be better to make this change, it would be too much trouble for the rest of the collaborators?

@varunu28
Copy link
Contributor Author

@Leoat12 I have the project opened in IntelliJ and it shows a green mark in the IDE. I have a vanilla setup of IntelliJ and it is showing no issues. Can you please check if you have any kind of checker enabled?

@asdiamond
Copy link

asdiamond commented Aug 28, 2018 via email

@Danpatpang
Copy link

Danpatpang commented Apr 2, 2019

I have started working on sorting algorithms, search algorithms.
@varunu28 May I implement DepthFirstSearch, BreadthFirstSearch and RadixSort?

@smitamoonka
Copy link

@varunu28 I can contribute as well, if needed!Thanks

@SmitaMoon
Copy link

@varunu28 Is this still on going task?

@varunu28
Copy link
Contributor Author

@smitamoonka @SmitaMoon Yes. This is active. Refer to the README on the development branch and raise a PR against Development.

@AnupKumarPanwar
Copy link
Member

Actually converting the repo into a Java project will not solve the purpose of this organization. We want to create this organization as an open source learning resource for data structures and algorithms which is easy to understand for beginners also and every program is capable of independent execution. This will also make it convenient to automatically fetch the code and execute it in case we go for building a website for learning the DSA.

@mainrs
Copy link

mainrs commented Aug 25, 2019

I've added a PR #815 that cleans up the code base to make working on it easier. After it gets merged I'll start with adding tests and all missing algorithms to the repo.

@jayyusi
Copy link

jayyusi commented Sep 14, 2019

is this still going on ? If yes, I want in on it !! Which algorithms need JUnit tests ?

@mainrs
Copy link

mainrs commented Sep 14, 2019

Just take a look at the development branch. Everything in there is OK. Everything else needs a port plus Junit tests

@jayyusi
Copy link

jayyusi commented Sep 14, 2019

Just take a look at the development branch. Everything in there is OK. Everything else needs a port plus Junit tests

Here's a question before I dive into this.
CombSort.java exists in the master branch, but doesn't exist in the development branch. So based on what you said, it needs a test, can you confirm ? and what do you mean by port ?
Thanks

@mainrs
Copy link

mainrs commented Sep 14, 2019

If it doesn't exist in development you have to get the code from master and add it to development. After that, you need to write unit tests for it. The tests should cover up most of the behavior of each algorithm. Like exceptions that might be thrown, wrong input formats etc.

By port I meant taking the algorithm from master and adding it to development. They need some tweaking because you don't need the main method anymore. The stuff in main should be covered by the tests.
You also need to add package statements because the project structure changed to maven.

@jayyusi
Copy link

jayyusi commented Sep 14, 2019

If it doesn't exist in development you have to get the code from master and add it to development. After that, you need to write unit tests for it. The tests should cover up most of the behavior of each algorithm. Like exceptions that might be thrown, wrong input formats etc.

By port I meant taking the algorithm from master and adding it to development. They need some tweaking because you don't need the main method anymore. The stuff in main should be covered by the tests.
You also need to add package statements because the project structure changed to maven.

Great, thank you, I will get to it soon, I'm gonna do CombSort.java first.

@jayyusi
Copy link

jayyusi commented Sep 14, 2019

I've added PR #825, which has 2 new files:

  1. CombSort.java ( copied from master as is, with minor changes to import statements and class interface implementation to accommodate project structure changes )
  2. CombSortTest.java ( which has 4 tests within it, Integer, String, Double, Character )

@mainrs
Copy link

mainrs commented Sep 15, 2019

Looks good.
Edit: Added some changes that you should make to match with java's coding style.

@renjithgr
Copy link

Hi all,
I raised a pull request to change the build tool from Maven to Gradle. #902

Nowadays, Gradle is the most common build tool for new Java projects.

@burnz248
Copy link

Is this still something that needs to be addressed?

@Adhikaribharath
Copy link

Is this still on going task? If so I would like to contribute :)

@Detective-Khalifah
Copy link

Excellent Idea!

@stale
Copy link

stale bot commented Mar 20, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests