GSoC 2019: Gamification of CritiqueBrainz (CB-308)

Personal information

Real Name: Anshuman Agarwal
Nickname: Anshuman73
IRC nick: anshuman73
GitHub: anshuman73
Twitter: anshumanagr73
Website: https://anshuman73.me
TimeZone: +05:30 UTC

Proposal

Synopsis

The basic idea of this proposal is to implement a Gamification system in CritiqueBrainz, much like that currently implemented in BookBrainz.

Motivation

The motivation behind taking such an initiative, is to simply increase interaction between users and CB, and to retain the users who have the potential to be regular users of the service.

While this feature is meant to increase activity on CB, extensive care and monitoring will be needed to make sure users do not create spammy content and write reviews just to get more badges/achievements.

Detailed Proposition

Currently, CritiqueBrainz is a lovely place to leave reviews about music, place or an event. However, over the years, it has seen a slow growth in user activity.

I propose to implement a Gamification of the reviewing system of CritiqueBrainz, which will help increase user retention.
To support for the same, I suggest the following things to be done -

  1. Creation of Badges

    1. Deciding the Acheievements and the Badges
      • Current Ideas (different milestones TBD for all suggestions) -
      1. Daily, weekly and monthly Streaks
      2. Badges for Writing reviews / giving ratings
      3. Badges for receiving number of votes
      4. Badges for revisions
      5. Time on the platform
      6. Multi-Linguist Badge
      7. Music-Related Badges
        1. For people reviewing an Artist frequently
        2. People who attend a lot of concerts / events
    2. Finding cool names for them
    3. Design of Badges
  2. Changes to the Database schema. A simple extension to the Database will have to be made as follows -

  1. A site-wide trigger function. This function will be the main function responsible to allocate badges and streaks. This function will be invoked on all badgable activities like voting, writing a review and creating revisions.

  2. Once the milestones are decided and the new database schema has been implemented, I will be writing a migration script to makes changes in the database for existing users.

  3. Another integration we can use is motivate users to review songs they recently listend to. This data can be pulled from LB (using the API), and the mbids of the release-group can be mapped to CB. Hence, as soon as the user logs in on CB, they can see the recently listened song on their dashboard. (See Front-End changes (6.2) for more)

  4. In terms of Front-end changes, I propose the following three basic changes (refer to images below)-

    1. A simple addition to the main, landing page’s statistics where we list the day’s and the week’s top contributor.
    2. “You recently listened to” section, which imports a few recently listened songs from LB as detailed in point 5.
    3. A change in User dashboard, where we show the total badges obtained by the user.

  1. An additional idea I’d like to propose is emailing the users when they’re about to break their streaks - an email about 3-5 hours before the day ends on which they would break their streak.
    I do however understand this might get irritating for the users, and will require a toggle in the settings if it is implemented.

Please note the images are merely first-look mock-ups, just to give an idea of how the final, finished work might look. The final implementations are expected to be much more crisp and clear.

Timeline

Community Bonding period (May 6 - May 27)

I plan to gel better with the MeB commumity, and use this time to gather insights about the preferences of the community on the different, creative names of the badges.
Additionally, this time will be perfect to start small bug fixes and or features that may be a pre-requiste to the work in this proposal.

Phase 1 (May 27 - June 24) (Preprocessing stage of data and making the platform ready)

Phase 1 will mostly see me exploring the Database and writing scripts and finding effiicient ways to make the migration of the data. This includes writing a script with the logic of all the badges to ensure existing users get the badges they would due to their previous works.

Things I expect to deliver in Phase 1 -

  • Changes to the Database Schema
  • Final set of badges and their milestones
  • Populate the data in the database both
    • In terms of populating the badges and their data
    • and existing user’s badges.

Phase 2 (June 28 - July 22) (Core Functionalities Stage)

Phase 2 will be the part where the core functionalities of gamification will be built. These include building the trigger functions for assigning the badges, keeping track of user progress,building the ListenBrainz integration and making changes to the front-end.

Things I expect to deliver in Phase 2 -

  • LB Integration to suggest recent listens
  • A working model of the gamification system which includes building the -
    • Trigger functions to assign badges
    • changed frontend to accomodate the badges.
    • change in statistics on the front-page in terms of top reviewer of the week and month

Phase 3 (July 26 - August 19) (Finishing Up and additional features)

Phase 3 will see me writing tests and documentation for the work done and covering up on any missed deadlines.
If time permits, design work of the badges will be done to ensure a full funtional product.
Additionally, in this phase, ideas mentioned in point(7) and extensible ideas may be taken up as well.

Things I expect to deliver in Phase 3 -

  • A fully functional gamification system in CritiqueBrainz, along with proper tests and documentation.

After GSoC

After GSoC, I plan to continue my work on increasing traffic on CB, by implementing the various suggestions in extensible ideas and future work.

Extensible Work

An extensible idea on top of this proposal is of introducing a sort of a point-based system (sort of a krama system), where each activity of a User fetches the user some points, which in turn will unlock other badges / achievements related to scoring higher points.

This also allows for a sort of a leaderboard system, which I feel is a counter-productive approach to solving the motivation behind this project, as it might introduce a higher ratio of spammy content.

A proper karma system may also enable us to tackle the spam problem, where downvoted content will reduce the user’s points.

Future Work

Implementation of this proposal opens doors for other services to use this to motivate users to join CB as well.

For example, once the gamification of CB is done, a plugin can be integrated in ListenBrainz, prompting users to go to CB and review their recent listened songs (A versa implementation of point 5)

Additionally, it may also open avenues to let users display certain high-level badges on their MusicBrainz accounts, possibly creating a network effect of people coming to CB to write reviews to make their MB profiles look better.

Detailed information about yourself

Hi, I’m Anshuman Agarwal, currently an undergraduate student at Bennett University, India. I have had the luck of being associated with MetaBrainz previously as a part of Google Code-In 2016, in which I was named one of the two winners for the Organization.

  • Tell us about the computer(s) you have available for working on your SoC project!

I have a 8 GB RAM, i7 Quad Core, 2 GB dedicated Graphics, 15-Inch HD screen HP Pavilion. My main OS is Ubuntu Budgie 18.04, however I also keep a dual boot of the latest Windows in case I ever need it for, well, Windows-specific things (Mostly gaming and occasional design work)

  • When did you first start programming?

I started programming in 9th grade, mostly inspired by and because of a competition called Google Code-In, after which I fell in love with Open-Source communities and software. My main programming language is Python, though, I have experience in C++, Java and a little bit of Go and Dart.

  • What type of music do you listen to? (Please list a series of MBIDs as examples.)

Oh, well this is going to be a long list :stuck_out_tongue:
I listen to a lot of different genres, from country and pop songs of Taylor Swift to Dance/Electronic of Skrux to Trap/Future Bass of Said the Sky (whose a couple of recordings I am proud to have been the first to add to Musicbrainz).
Over all here are a couple of my favourites -

  • What aspects of the project you’re applying for interest you the most?

I love CritiqueBrainz. I see it as a service which has a huge potential. CB not only is unbiased, it is a place of open reviews - reviews not motivated by the selling of a product, unlike of what you’d find on e-commerce sites, where most of the reviews is done for most products. I see it as a place to get true reviews of people. While I imagine, this can change in the future, I have full trust in the MeB commmunity, that we’ll come up with a solution to take care of it.

  • Have you ever used MusicBrainz to tag your files?

Yes!! I’ve used both Picard and Beets (the latter I’ve even contributed to!) to tag my files.

  • Have you contributed to other Open Source projects? If so, which projects and can we see some of your code?

I have. I have contributed to several other projects of MetaBrainz, while not necessarily great changes as I was still learning the ropes, so they might not be the best judge of my coding abilities. Here are some of the small contributions I have made:

  • If you have not contributed to open source projects, do you have other code we can look at?

I do have some of other projects I’m particularly proud of:

  • What sorts of programming projects have you done on your own time?

Mostly back-end based projects. I like to code in Flask framework and have developed a sort of an expertise in it. They include, like the above mentioned projects basic user auth, a few DB queries and basic template rendering. I have also very recently started to dabble with ML.

  • How much time do you have available, and how would you plan to use it?

Over the summer, I expect to give about 7-8 hours a day to GSoC, with a week or two off if needed for the summer. A normal day should look like 6-7 hours of coding, and another hour or two a day to keep a track of things with my mentor and discuss things, blog about my work or normally get feedback from the community on progress and if anything needs to be changed.

  • Do you plan to have a job or study during the summer in conjunction with Summer of Code?

No, I have no other commitments for the summer.

2 Likes

Hi @anshuman73, awesome proposal and good work here :slight_smile: I do have a few doubts which I need to verify but since they are related to the additional idea, they are definitely optional.

  • I think about users’ email addresses, we do have a column in the CB user table but it’s mostly empty. However, a cool thing we could add is on-site notifications for returning users to see that they gained a badge or their review received a vote. (like discourse).
2 Likes

Hi @ferbncode :wave:

That’s actually a much better idea!
I’ll include that in my final proposal.

Thanks!

This is something that’s been wanted for years across MetaBrainz’s projects/sites:

You can probably make a CB specific notification system, but if so, maybe try and keep MBS-1801 in the back of your head so it can be adjusted to whatever we end up with for that without too much difficulty. :slight_smile: (And yes, I realise it’s too late to include this in the actual proposal, but still thought I’d mention it!)

2 Likes

@Freso
Sounds good ! I’ll start looking into an implementation that can be extended to all MeB projects

Don’t get (too) sidetracked by this. MBS-1801 is easily at least one full GSoC project on its own. I’d focus on just the path you’ve outlined in your proposal for now, this is just something to have in the back of your head, not something you should be working on. There’s a reason it’s been open for 8 years without any meaningful progress, despite being one of the most wanted tickets across the board.