karan / Projects

:page_with_curl: A list of practical projects that anyone can solve in any programming language.
https://twitter.com/karangoel
MIT License
44.66k stars 10.53k forks source link

Submitting confusion #9

Closed mikemelch closed 10 years ago

mikemelch commented 10 years ago

I'm not sure if I complete understand the guidelines for contributing. Are we ONLY supposed to commit the README change or do you want the source code to be added as well?

karan commented 10 years ago

Yes just the changes to README. The only change you'll make is adding a link to your solution in your fork of the repo. Make sure to use the right format.

amitburst commented 10 years ago

May I ask why you are not accepting source code contributions? Fellow UWer btw. :)

karan commented 10 years ago

Fair question. Because I originally planned this repo to store my code only. Now that I've received a lot of emails about it, I think it's better this way.

The purpose of this repo is not to collect solutions (or the "best" solution), but good, quality projects.

mikemelch commented 10 years ago

As a beginner GitHuber, it makes it more difficult for me to manage this since GitHub doesn't allow you to choose which commits to pull. Which means I have to create branches and cherry-pick commits. While trying to figure it all out I've managed to delete my source code (lol). But I'll certainly rewrite it and try again.

amitburst commented 10 years ago

Yeah, that could be pretty annoying. ^

karan commented 10 years ago

Do you have any other suggestions? Beyond replacing my code of course.

amitburst commented 10 years ago

You could allow people to prefix file names with their username or something, and allow for solutions in multiple languages. The repo would get REALLY popular, but could get hard to manage I suppose.

Drhealsgood commented 10 years ago

That would become much to messy. It's much easier if you just for the entire thing to your repo. If you write code and delete it without commiting anything then you are just learning to commit more often. A link in the read me, or line comments, seem to be better ideas to me.

mikemelch commented 10 years ago

Yeah exactly. Something like this.

Strings > Reverse String > Multiple Folders (Java) (C) (Python) ... > mikemelch_reverse

OR

You can keep a copy of your code and then a community code.

thekarangoel_reversestring and community_reversestring

OR

You can have a branch in which you upload your code and then the master is where it's OSS

amitburst commented 10 years ago

Honestly, I would take the above approach (the first one), but I would maintain one file for each language and invite contributions that way. It's totally up to you though, as I realize you wanted this to be an exercise for yourself. But I feel this way embraces what GitHub and the open source community is all about. :)

karan commented 10 years ago

I also like the first approach. But what if we have multiple implementations of the same project, and all are correct?

I think I'll go with this only, unless someone can present a better way.

amitburst commented 10 years ago

That's why I think a one solution per language approach would be a cool idea. But that would contradict your purpose for making the repo.

karan commented 10 years ago

Exactly. We'll wait for 24 hours for other people to chime in, before making the change to contributing instructions.

karan commented 10 years ago

Okay how about this - one file per language, but with multiple implementations as different methods?

For example, the PI project will have 1 file in python pi.py but multiple methods like pi, pi2 etc with drastically different implementations,

How's that?

mikemelch commented 10 years ago

Possible, but could be confusing and might not completely be functional.

karan commented 10 years ago

How's that?

One point though - for the bigger projects, with multiple files, this would not be possible.

mikemelch commented 10 years ago

If I write an implementation that contains multiple methods and so do you, we have many methods which makes it hard to read. Especially when dealing with the class problems.

karan commented 10 years ago

Right that makes sense. Well I'm all out of ideas.

IAmAnubhavSaini commented 10 years ago

I propose creation of a list or project that contains links to all such projects projects [sic].

I am doing it in C here.

karan commented 10 years ago

@IAmAnubhavSaini So should there by a md file with languages as headings and links to other people's repositories? Is that what you mean?

Like so:

////////////////////////// Solutions.md

Python

person1 person2

C

person3 person4 //////////////////////////

That actually sounds good.

IAmAnubhavSaini commented 10 years ago

@thekarangoel that or a gist e.g. https://gist.github.com/IAmAnubhavSaini/6087657

Though it will tough, nightmarishly tough in any way you choose to implement it.

Another idea is that you become "Linus Torvalds" here and every "unique-language"-project becomes a "sub-system" kind of project that falls under name "Mega-Projects-Project" or something. In this system, all you have to care is for few people's (respective project heads) pull requests. Lesser, infrequent pull requests might help you sleep well too.

Just thinking. :)

karan commented 10 years ago

I like the way you put that. God this is so confusing.

Actually, I'll just put a gist that links to every person's repo with language categorization.

Here's updated instructions that are much easier to follow: https://github.com/thekarangoel/Projects/blob/master/CONTRIBUTING.md

And the gist: https://gist.github.com/thekarangoel/6088143

This is the least painful way that I think we can come up with!