GithubHelp home page GithubHelp logo

joshsoftware / code-curiosity Goto Github PK

View Code? Open in Web Editor NEW
84.0 31.0 57.0 4.32 MB

Open-source is now fun and rewarding!

Home Page: https://codecuriosity.org

License: MIT License

Ruby 60.05% JavaScript 13.63% CSS 0.46% HTML 2.65% CoffeeScript 0.51% SCSS 2.49% Haml 20.21%

code-curiosity's Introduction

Code Climate Test Coverage Build Status

What can be measured, can be improved!

Everyone knows that running is a great exercise. However, by using a wearable like the Fitbit™ to measure your activity, it has motivated people to run regularly.

CodeCuriosity aims to be the Fitbit™ for open-source contributions

Code Curiosity is a platform to encourage open source contribution, build a cohesive and collaborative open source community and reward open source contributors across the world. It measures open-source contributions (code commits, issues and comments) and gives points that can be redeemed against Github or Amazon Gift Cards!

CodeCuriosity aims to reward everyone (experts or newbies) and everything (minor changes to features).

Out of the 30M+ open-source developers on Github, if we can motivate even a fraction to contribute more, we are sure we can make the open-soure community more vibrant and rewarding! We reward open-source contributions from our own pocket, so "The more money we lose, the more the open-source community gains."

Are you or your company interested in supporting CodeCuriosity?

If you or your company wants to support this cause, please contact us at [email protected].

You do not have to donate any money! We would expect you to pledge an amount in USD and fulfill redemption requests from registered CodeCuriosity users. Here is the list of companies that are supporting this cause:

What is CodeCuriosity all about?

Here are some questions that should help you get going. A lot more questions that are answered in the FAQ.

Who should use CodeCuriosity?

Everyone who contributes to open source. It's not only fun but you're also making a difference! Since all commits are rewarded and everyone (experts and newbies alike) is rewarded, it's always encouraging. There are so many repository owners that are looking out for help from developers and CodeCuriosity not only helps you help others but also rewards you while doing it. It's about having your cake and eating it too!.

How does it work?

We gamify open source contributions.

  • Sign-up with your GitHub account on CodeCuriosity. After that, we do the rest!
  • The system analyses your commits and activities and they are automatically scored and shown on your dashboard.
  • Choose your monthly goal and try to achieve it.
  • Every month-end, the cumulative scores are added to your wallet and if you have achieved your goal, you get bonus points!

What are points and how do they work?

Points are the scores you have accumulated for your contributions. You can redeem these points for Github or Amazon Gift cards. We also support other stores and if you send us details, we shall ensure you get rewarded!

New to Open Source and don't know where to start?

Don't worry! Start with Code Triage. It's a very good way to choose which language and repositories you want to contribute to. It sends you some GitHub issues that you can look at everyday!

Still too complex for you? Start by reading and contributing back some documentation at DocsDoctor.

Contributing to CodeCuriosity

If you have some cool ideas, comments or feedback - you can mail us at [email protected].

We don't have a Slack / IRC channel or mailing list yet -- we shall work on it soon.

To contribute to code, fork this repository, raise issues, suggest features and help us make the change!

To test this locally,

  • create .env.<environment> file based on your environment i.e .env.development, .env.production. For local development, use .env.local
  • Add github app id and secret to .env.<environment> file. Refer env.sample

code-curiosity's People

Contributors

ansell avatar apsc92 avatar bandanapandey avatar dependabot[bot] avatar gautamkrishnar avatar gautamrege avatar haines-the avatar hashnuke avatar iamanujvrma avatar jahio avatar jiren avatar pooja-mane avatar prasadsurase avatar prathamesh-sonpatki avatar pratik14 avatar rahuljadhav11 avatar sagareganesh avatar sahilbhatia avatar sethu avatar shwetakale avatar spatil avatar tanya-saroha avatar tejaswini-gambhire avatar vishalzambre avatar vivganes avatar wyhaines avatar zhedar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

code-curiosity's Issues

Fetch commits and activities from round start date

  • To avoid people adding activities before add repo in their team
  • Fetch all commits and activities from round start date
  • To avoid duplicate commits added uniqueness in commit model on message and comment_on. Same thing need to add in activity model.

Admin updates

Need 2 updates on the Admin menu:

  • Need a groups menu to see which groups have been created by people. We also need checkbox near it to say if we are going to feature it on the home page!
  • Need a filter in Redeem requests. By default I want to see only the open redeem requests. It can be a tab or a select box that shows us the closed requests too. I need an option to "delete" redeem requests.
  • Pagination is lost after filter fix! /cc @BandanaPandey

Royalty Bonus

When a user signs up, we analyse the profile and calculate the Royalty Bonus score.

  • This is only for repository that the user owns that have more than 50 stars. Repositories that the user contributes as part of organisations or other user profiles are not counted for this.
  • The royalty factor depends on the user followers too! More followers means higher royalty bonus factory for each popular repository.

For example, user "jiren" owns 2 repositories "filterjs" and "streamable" that have 442 stars and 363 stars respectively. He also contributes to "rails/rails". He has 35 followers.

Royalty for users

[stars for filterjs] + [stars for StreamTable]

(442 * 100 + 363 * 100) * (60 / 100) = 65,980 points.

The equation:
SUM [ (stars * 100) ] * (followers / 100)

Caveat: If the royalty calculation comes over 500k points, show the message: "You're way over the top - contact the team and we shall work out a fixed income per month for you ".

These users are already celebrities and CodeCuriosity is not for them. In such cases, rather than have the person participate monthly, we involve the person in making CodeCuriosity better product. If we get enough grants / funds or money, we would love to reward such stalwarts!

We shall improvise the process over time

Levels and Leaderboards

We need to ensure that we level the playing field for people who sign-up. That means, when a user signs up, we analyze the profile and identify a group that they fit into. The people in that group compete equally.

To start with we shall have 3 groups, where each group can have at most 50 people. When the number increases more than 50, we "balance" the groups and create 1 more group by dividing the group into a 50-50 ratio of 25 to 30 people each.

The initial groups are going to be as follows:
Horses: "Prancing among the horses".
Wolves: "Dancing with wolves"
Eagles: "Flying with the eagles".

Eagles criteria:

  • People with more than 50 followers AND
  • People owning at least 2 repositories with more than 50 stars OR
  • People contributing to at least 3 repositories with more than 500 stars.

Wolves criteria:

  • People with more than 15 followers AND
  • People owning at least 1 repository with more than 50 stars OR
  • People contributing to at least 1 repositories with more than 500 stars.

Horses:
Everyone else.

As time flies, if any group becomes more than 50, then we re-evalutate the criteria and balance the users into new groups!

Leaderboards

  • Each level will have the top 5 users listed.
  • When the user clicks on "Leaderboards", we show the users group leader board but the user can select the graph boxes at the bottom of the page (similar to what we see in the Dashboard) to select other groups and see their leaders.

After each round is complete - the top 5 users get the following points winning their rounds:

  • 1st place: 3000 points
  • 2nd place: 1500 points
  • 3rd place: 750 points
  • 4the place: 500 points
  • 5th place: 300 points.

These are points in addition to their scores per round. All users get only the points they have scored in that round, consolidated into their eWallet.

Community Edition of Code Curiosity

This is a parent ticket (tagged with community label) that will be built in a separate branch called 'community'. Once we are ready with this, we shall migrate this to 'master' and take Code Curiosity to a whole new level!

How is it different from the current application?

  • Anyone can register using their github handles. (Open for all) #22
  • You can contribute individually or as a team. #23
  • Each round starts from the 1st 00:00 of the month till the 26th 23:59 of each month. #24
  • You can add members to your team (you cannot remove them though till the end of the round) #23
  • Prizes are given to top contributors every round i.e. every month. #24
  • You can add repositories anytime during the round. #25
  • You can invoke a forced sync to update scores. #25

I will add separate tickets for details on each point above and update this ticket with the ticket numbers.

Why are we building this ?

Instead of involving only Josh Software, we realised why not involved the community. This has far reaching consequences as you are actually making money with open-source contributions every month.

This can be pretty expensive. How are we going to sustain the prizes?

Once we have a quorum i.e. more than 500 users actively using this application, we may make this a subscription per month. So, if we decide to have a subscription fee of say $10 per month, we have a bounty of say $ 5000 between 500 users. 95% of this money gets distributed to the top 10% of the contributors? 5% is the administration fee for maintaining the systems. So, this could potentially be self-servicing portal.

Given there are so many contributors, who will be judging?

We shall invite some well know authorities on github (and some repository owners) to be judges. We could gamify the proceedings since we have scores from contributors and some top contributors could be made judges?

*What's in it for them? * We pay the judges a fee for taking the effort to judge the work. When this happens, we my keep more than just 5% of the bounty to ensure that judges are happy!

Is this going to be restricted to Ruby or will this be open for all languages?

Yes, this will be open for all languages. We shall contact language experts as the repositories from different languages start coming in. Let's see where this goes 😄

Subscribe to Organisation event feed

This will enable us to get real time feeds about commits / pull requests and issues and we can then avoid the daily rake task to fetch. It will also create a real-time dashboard.
Note: We have have to move away from heroku hosting for this.

Registration

Anyone with a github account can register on Code Curiosity.

  • When you successfully register, you will automatically be part of the current on-going round.
  • You can manage your team.
  • You can manage your repository.
  • You can see dashboards for different rounds.

Points eWallet management

eWallet View

  • Earned points history overview
  • View points by rounds, date range

Points earning and distribution and deduction

  • On signup gives "X: 500" number of points
  • For round subscription deduct "X: 150" points
  • Thought: Transfer points to other users only for subscription.
  • Round completion: Add earned point to user's wallet and add to wallet history

25 star is not enough

There are many projects on github that don't have 25 stars because maybe they are repo that contain translations or with few star on github but with many download.

Dashboard chart changes

Details are mentioned below the tasks.

  • The drop down should have "Team Commits", "Team Scores", "Individual Commits"
  • There should be a button "Publish Results".
  • Progressive Chart should be visible without authentication and we should be able to embed on intranet.

Team Scores

See ticket #2 for details on how scores are created. The chart should reflect team scores.

Publish Results

See ticket #3 for details on Snapshot. When we click "Publish Results" (seen only by admin), a complete snapshot of scores, commits, team distribution etc. is taken and put in a separate table for the duration and marked as completed i.e. one round on the competition is over.

Progressive Chart

See ticket #4 for details. This is the chart where we can see based on published results. This chart has a dropdown for selecting rounds and we can see how the team scores and individual scores have progressed over time.

Competition Round completion: Snapshot

When one round of competition is completed, we need to save a snapshot of the competition. Information that is saved will be graphically represented in the Progress Report.

  • Number of commits done by each individual in this round.
  • Total score for each individual in this round.
  • The team association: who was in which team
  • Duration of the competition. (this can be taken from the date picker :from and :till field.
  • Validation: We cannot have overlapping rounds.

Details of how this data should be shown is in #4

Judging: Team Scores and weighted averages

When a judge logs in

And clicks on "Teams"

  • Team should have a green call out (bs-callout bs-callout-success) if there are more than 3 judges have scored ALL the commits for that team.
  • Team should have a orange call out (bs-callout bs-callout-warning) if there are any commits that do not have at least 3 scores from judges.

And clicks on "Show commits for a team"

  • Each commit should have weight field (type: number range from 0 - 10, default: blank)
  • A commit should have a green call out (bs-callout bs-callout-success) if there are more than 3 judges who have given a score.
  • A commit should have a orange call out (bs-callout bs-callout-warning) if there is at least 1 score but less than 3 scores given by judges.
  • A commit should have a red call out (bs-callout bs-callout-danger) if there are no judges who have scored the commit.

CSS Reference: http://cpratt.co/twitter-bootstrap-callout-css-styles/

Rules for Judging commits

I'll create a Wiki page on this but in short:
0: Commit should be ignored - eg. typo fix or code type etc.
1 - 3: Very trivial / minor fix -- one word added, mistake corrected.
3 - 5: Trivial issues fix and good documentation added.
5 - 7: Good fix, test cases added, fixed failing builds, good code and commit with substance.
7 - 10: Excellent code, complex issue fixed, feature added, etc.

Test Coverage!

We need to get test coverage completed for Code-Curiosity - we need to practice what we preach!

User Management : Profile, Dashboard

Registration

  • Registration using github
  • On registration user earns X points(i.e 500) and added to user eWallet

Public profile

  • Profile info i.e name, organisation, contact detail, Github, twitter handle etc
  • Badges and awards
  • Contributed repositories
  • Progress report and Ranking(optional, if user want to publish or not)

Private profile and Dashboard

  • Profile edit/update
  • Points earning history
  • Each round commits and activity history
  • Progress report and Ranking
    • User can publish to his/her public profile.

Subscription management

  • Start/Stop participation

Repository management

  • Add and remove repositories

Point redemption

  • User can redeem points after earning minimum "X"(i.e 1500) amount of points

allow to update repository URL

  • This should be moderated by admin before acceptance.
  • Later on, we shall add metrics to see if a repository can be added - minimum number of forks, stars, watchers, commits etc.

Team management

By default, your teams name will the same as your Github handle and your team consists of 1 member - you.

  • You can change the name to something unique (alpha-numeric only)
  • You can add another person to be part of your team using their github handle.
  • The person must be a registered on Code Curiosity. If not, this will send an invitation email to the person. Once the person accepts the invitation, the person can login and can choose to join your team.
  • A person can be part of only 1 team for a round. That means, if you choose to be part of another team, your own team is no longer part of that Round.
  • After the round is over, you have the last few days of the month, to change your team or be on your own.
  • Each team can have at most 3 members.
  • Having more members in your team changes the scoring and the average scores are taken across the entire team. So you choose wisely.

Home Page requires more information

The home page needs rework. We need to showcase the following things:

  1. Dynamic updates on users count and redemption!
    "X users have contributed Y points and $Z has been rewarded back to W contributors!”..
    example:
    "274 users have contributed 19,197 points and $100 has been rewarded back to 10 contributors!”
  2. Show the companies supporting CodeCuriosity and a line below all of them saying "Our sponsors have graciously contributed $X to reward open-source contributors". $X is the total committed amount by all companies!
  3. Show a line chart of the followings:
    X axis: Months
    Y axis: Number of users per month, Number of contributions per month, Number of redemptions per month.
  4. Feature all the groups that have been created on the system. Use their embed iframe and promote. A line below should say "Know more about Groups" with a link in the FAQ
  5. Feature Repository widget and showcase the FollowMyVote widget. A line below should say "Know more about Repository Widgets" with a link in the FAQ

Points distribution (amateur round)

We distribute the scores according the their percentage slot and the money is distributed against the percentage.

Below image details 18 users with various scores and a distribution example of 2700 points.

  • Anyone who has even a single contribution gets some points back based on percentage slot.
  • Those who have no contribution don't get anything.
  • The more you contribute and get scored, the more you earn.

screen shot 2016-01-12 at 1 28 02 pm

"Teams" page should be seen without authentication

Everyone should be able to see the teams and the repositories that the team is working on.

Currently, we have to inform the team by email about changes. It should be quite clear from DAY-1 of the round. Also, it's important that the teams see what others are working on.

  • The "bs-callout (green / red / orange), Active From and Actions should NOT be shown without login.
  • You cannot create new teams without logging in.

FYI - you can remove the "Active From" column entirely - the Round has the dates in it.

Gamification Terminology.

We need some good names for the following:

Terminology for scores.

We earn them and use them for each round as a subscription fee. Lets get a new terminology for this i.e. rather than saying points, coins, dollars etc. lets say we earn "-----" something easy to type and pronounce and it should be catchy, so you are proud of it.

Badges

What type of badges can we give for what criteria. Example, in Fitbit, you get a "Serengeti badge" if you run 804 km till date. Some criteria:

  • A badge for consistently getting more than 20 points in 3 consecutive rounds? What would be a good name.
  • A badge for a big leap of more than 40 points in consecutive rounds.
  • A badge for consistently participating in 5 consecutive rounds.
  • A badge for consistently participating and not scoring more than 2 points in 2 rounds! (some badge like medication to encourage more participation).

Other criteria which matter to you? Suggestions welcome.

While fetching commits, we should parse all branches and remove duplicates.

We currently fetch commits for the team only from master.

  • We should fetch commits from all the branches
  • Remove duplicates / merges.

Alternatively, we will have to ask the team to tell us which branch commits to parse but that could have it's own set of problems.

[From Rishi's email]
It is ideally suggested while working on open-source projects, you should keep the remote master and your local master copy in sync. So you should not merge your new feature branch into local master. Instead wait for the author to accept your PR and then you can pull from remotes master into local master.

If you follow this process, it helps in long term too. Now imagine one member of team alpha (say Rishi), he has done some changes on the local master(instead of new feature branch), and sends a PR. But it got rejected by the main author (Jiren), so now he has a master which has some commits which is not acceptable. So what he can do now(because he do not need those faulty commits):

  1. git reset the commits and then checkout.
  2. Delete the repo and re-clone it.

or it could get worst, if Rishi does not work on filterjs for some months and then he comes back, so Rishi will just pull the remotes master into local master(which also has those unaccepted commits) to get the latest copy. Rishi may not remember that there are few commits which were not acceptable. And now he has a master which is not true copy of remote master and it might screw up his future work.

I am going to put this in Wiki as guidelines to contribute to Open Source!

Rounds

This is the competition rounds - the way you make MONEY!

  • Each round starts from the 1st 00:00 of the month till last 3 days of the month.
  • The last 3 days of the month will be for consolidation and re-conciling Code Curiosity and completing the scoring.
  • Results are declared at the month end before the next round starts. i.e. before the 1st 00:00
  • Current participation status is carried forward for next round: i.e. if you are participating and you don't do change it in the last 3 days of the month, you will be automatically assumed to be participating in the next round.
    [use case] If there are less than 150 points and your current participation status is "on", then you will not be participating in next round unless you top-up your wallet. Basically, we shall not charge a credit-card directly.
  • Prize money is kept in your wallet on the system.
  • You can choose to take money out of your wallet into your bank account - (Technical details will be handled out when the time arises)

Prize money distribution.

** To be thought out properly -- views and opinions desperately wanted **

Idea 1:

Initially our judges will be pro-bono. At this time, 95% of the bounty will be distributed to the top 10% of the contributors. For example, if we have 500 subscribers, we have a bounty of $5000

Till the first 500 paid subscribers:

  • 50% of the bounty will be distributed among the top 10 contributors.
  • 25% of the top contributors (apart from the top 10) will get get 45% of the bounty, evenly distributed between them.

Idea 2: (thanks @spidergears and @deXterbed )

We have divisions among the people who join. We score them on their "existing github profile" and assign them in a division. We try and reward about 70% of the subscribers, so that they are encouraged.

Judging: scoring widget for more granularity and transparency.

Changes to scoring by judges should be as follows:

  • We show a drop-down from 0-5 (as we have currently). 0 should be a grouped selection with the following options:
    0 - Redundant
    0 - Duplicate
  • Judge should be able to add a comment for any score.
  • A check-box should be shown that says "Public Comment". By default, all comments will be visible to other judges only. If the "Public Comment" is checked, then this comment would be visible in #19 along with the average score. (The judge's name should not be shown).
  • All private comments will have the judges name.
  • Scores given by other judges should be seen by all judges for each commit or activity.
  • When the 0 score is selected, the reason "Redundant" or "Duplicate" should be added to the comment. Judge can edit this comment further.

Respositories

You can add repositories any time and click the Sync button to sync up any commits / activities. This is more like a self-serve option.

You cannot remove a repository (not sure why someone would want to do that anyway)

Judging

In community edition, there are no teams - it's all individuals. Scoring is from a range of 0-5.
Each commit and activity has to be judged by any 3 judges before we lock the score.

Distribution of work between judges

  • based on expertise in languages.
  • time availability.

Based on these factors, the system should send commits or comments for judging. This is the minimum effort expected based on their settings of language and time. The remuneration for judges will be decided on these factors. The judges can also explore other commits and activities and their incentives would be based on how active they are.

note A judge can be a contributor, so the system should never send judges own activities to himself or herself.

Process (keeping the judges on their toes)

Judges will not be able to see others scores until they have judged the commit or activity. (just like a poll). After that, they can not only see what other have scored but can also change their score if they fell they should. They must then confirm their score.

This will ensure that judges have to score based on their judgement and not others judgment. Since the discrepancy and score change are metrics that judge the judges, this will introduce a good checks & balances system for judging.

Judging the judges

Criteria needs to be decided but broadly these are the factors:

  • Number of discrepancies for your score. If there is a discrepancy in score, both judges discrepancy count is incremented.
  • How often did the judge change their scores.
  • Number of scores given.
  • How often have they completed their minimum assigned work
  • How much of extra scoring did they do. i.e. over commitment to the system.

Recommendation Scores

To start with, these are guidelines given to the judges!

0 - ignore because its a duplicate or irrelevant comment.
1 - documentation changes, typos, etc.
2 - minor code change, bugs (less than 5 lines changed)
3 - large code change, bugs, build passed (more than 5 lines and less than 50 lines)
4 - features added, critical bug (more than 50 lines)

note: system will never recommends 5. That is at judges discretion.

As we start seeing how the judging is done, system will start to recommend a score to reduce the judges effort.

Score discrepancy

If there is a difference of 2 between any scores, then a comment is mandatory and a notification goes to the other judges who have score difference of more than 2. The other judge must then complete some action: either leave a comment "retain my score" or change the score to within a factor of 1 from other judges.

Baseline: All scores must have a difference of 1 unless the judge(s) has explicitly retained their score.

Trends chart is still confusing to people.

We need to work out a chart to show the following:

  1. How far is the user from reaching his / her goal for the month! I liked the fitbit charts.
    img_0728
  2. We need a chart to show how the user fares among all the others in that Goal. Ideas welcome.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.