Page MenuHomePhabricator

Proposal for Outreachy/Gsoc 2020 - Add leaderboard based on user's edits using Commons Android app
Closed, DeclinedPublic

Description

Profile Information

Name: Anushka Singh
Institute: Sardar Vallabhbhai National Institute Of Technology, Surat
Email: anushka318singh@gmail.com
Github Profile: https://github.com/318anushka
LinkedIn Profile: https://www.linkedin.com/in/anushka-singh-ab1587179
Location: Surat, India
Timezone: UTC + 5:30
Typical working hours: 4PM - 3AM

Synopsis

About App
The Wikimedia Commons Android app allows users to upload pictures from their Android phone/tablet to Wikimedia Commons.
Commons is not only the image repository for Wikipedia but an independent project that seeks to document the world with photos, videos, and recordings. Wikimedia Commons accepts only freely licensed media files (that are not subject to any copyright). Users can upload images and then add various tags specific to them such as category, title, description, and license.

About Project
The project is about adding a leaderboard based on user's edits using Commons. The feature will include only edits made with the mobile app, and users who have shown interest in this activity.
Commons Android App Repo (for UI): https://github.com/commons-app/apps-android-commons/
Commons Misc Repo(for APIs): https://github.com/commons-app/commonsmisc

Why is this feature needed?

  • Currently, in the achievements section, user level is displayed based on number of uploads and used as statistics.There is no way user can know his/her ranking in comparison to other users.
  • Adding a leaderboard will encourage user to contribute more to the Commons.
  • This will increase user's desire to excel thus increasing number of uploads per user.

Possible Mentor(s): @Nicolas_Raoul @maskaravivek

Have you contacted your mentors already? Yes, I have contacted the mentor and this idea has been discussed.

Idea

Leaderboard can be created next to Achievements and will display username ranking, avatar. The score could reuse some numbers from achievements, but should only count edits done with the mobile app because otherwise, Vicuna/etc users will dominate the top of the leaderboard even if they don't use the mobile app.

On tapping the name of a user in the leaderboard, gallery of that user's pictures should open, probably as a browser URL for now. Knowing they are being watched by their peers will probably reduce the temptation to "cheat" (for instance by uploading 1000 pictures of the same spoon).

We will only list those user in the leaderboard who have ever opened achievements activity. We will keep track of that information server-side. So the leaderboard would only list app users who have an interest in this kind of game.

We can add auto-scroll to the user's current rank and highlight it so that users don't have to look at all results to see the rank, also a button can be added which will automatically jump to the user's rank on clicking.

The user's name should be highlighted.

The length of the leaderboard could be dynamic, for instance, if I am 3rd it could be 10 people, but if I am 13rd it could be 20 people. Or just make more people appear when scrolling down.

There could be weekly (last 30 days) rankings, yearly (last 365 days) rankings, all-time rankings. Also ranking could be for uploads, nearby and used.

To make it more visually attractive. Users like to personalize their avatar, so we could also offer the option to select one of the user's uploads as an avatar picture, but that may lead to more selfies, so this option could be a privilege to unlock (only users who are above level 5 for instance).

Implementation

The leaderboard lists should probably be calculated on the server where we currently perform achievement calculations, and cached (re-serve the same results if less old than 1 hour).
The user will probably upload a few more pictures in 5 minutes and come see the leaderboard again. So we could recalculate only that user's new scores (and let the other people's scores the same until the next hour comes). In other words, only the users who keep looking at the leaderboard would have their score grow at smaller intervals than 1 hour. That 1-user-only recalculation itself should be cached something like 1 minute because a picture can not be neatly uploaded in less time, and to avoid useless server load.

The avatar miniatures (generated by mediawiki) should be cached by the app for like a month.
We can add user to the leaderboard, once he/she performs one of these actions:

  • login
  • upload
  • nearby upload

In our backend, we will have:

  • a list of users(with option 1 or 2) for whom we need to calculate statistics
  • periodically fetch the statistics (every 1 or 4 hours). Update the statistics in our tools forge DB
  • When the Commons app does an API call to get leaderboard info, serve the statistics using tools forge DB instead of calculating real-time.

UI Mocks

Screenshot 2020-03-31 at 4.25.46 AM.png (1×676 px, 94 KB)

Timeline

Community Bonding Period

  • Communicate and bond with students and mentors
  • Create specific issues for the project and solve them.
  • Getting familiar with app architecture and go through documentation once again
  • Study in detail Wikimedia API functionality, dig deeper in concepts of RxJava and Retrofit.

Week 1: Update UI of achievements activity to display level (current activity) in first tab and Leaderboard in second tab (based on uploads).

  • The achievements activity will have two tabs, level will be displayed in first.
  • Create Leaderboard fragment UI in the second tab.
  • Study about Wikimedia APIs and Restful API implementation.

Deliverables:
Updated UI of Achievements activity with leaderboard screen.

Week 2: Designing and implementing the APIs for calculating and displaying ranks of the User (all time, monthly, weekly). These would be Python APIs in commons-misc repo

  • Discuss with mentors the design of API.
  • Re-use the numbers(only edits done via app) from achievements fetch from API.
  • Implement the code in Python.
  • Test it in Postman API testing tool.

Deliverables:
API that calculates rank of users(all time, monthly, weekly).

Week 3: Display user's Avatar and rank on Leaderboard screen fetched from API.

  • Discuss with mentor which one of user uploads will be avatar.
  • Display avatar fetched from API.
  • Fetch the ranks from API created and display it on leaderboard.

Deliverables:
Leaderboard with user rank along with username and avatar.

Week 4: Designing and implementing the APIs for displaying leaderboard (user list) based on 2 parameters - duration (all time, monthly, weekly), type (uploads, nearby, images used).

  • Discuss with mentors the design of API and schema of db.
  • Host a DB on tool forge to fetch statistics on API call.
  • Implement API based on type - uploads, nearby, used.
  • Test it using Postman.

Deliverables:
DB to fetch info on api call.
API that fetches rank based on type of edits and duration.

Week 5: Use the APIs to fetch leaderboard (user list) based on uploads via mobile app (all time) and display it in Leaderboard screen.

  • First Evaluation
  • Fetch the results from API.
  • Modify UI to display ranks based on uploads and all time .
  • Display the fetched results in the leaderboard.
  • Write a blog post.

Deliverables:
Leaderboard which displays rank based on uploads and all time.
Blog post about progress.

Week 6: Start writing unit tests for API

  • Write unit tests for rank calculation.
  • Write unit tests for displaying user rank.
  • Bug fixes if any.

Deliverables:
unit tests for api.

Week 7: Add pagination in the leaderboard screen to load more users on scrolling down.

  • Implement pagination in RecyclerView to scroll through users.
  • Improve UI.
  • Add feature to jump to user's rank.

Deliverables:
Scrolling feature in leaderboard.

Week 8: Write unit tests for pagination

  • Write unit tests for scrolling feature.
  • Bug fixes if any.
  • Discuss the final UI with mentor for duration filters.

Deliverables:
Unit tests for pagination.

Week 9: Add duration filters in leaderboard screen and show results based on selected filter (weekly, monthly, yearly, all time). Change the UI to show and select filter.

  • Second Evaluation
  • Implement the duration filter Classes.
  • Improve the UI to select filter options.
  • Write blog post

Deliverables:
Duration filters in leaderboard.
Blog post about progress.

Week 10: Change the UI to show 3 different results (based on uploads, nearby, used). - add 2 more tabs

  • Add two more tabs for nearby and used images.
  • Modify UI to display results gracefully.

Deliverables:
Updated UI with 3 types of edits.

Week 11: Tapping the name of a user in the leaderboard should open the gallery of that user's pictures, probably as a browser URL for now.

  • Add onClick listener to open user gallery on tapping any username.- this will prevent users from cheating.
  • Write tests for click event.

Deliverables:
Tapping username will direct you to user gallery
Unit tests for this feature.

Week 12: Write unit tests , documentation, fix bugs and Release (at least in alpha) - (2 weeks)

  • Write unit tests for features implemented.
  • Add documentation and prepare report.
  • Bug fixes, if any.

Deliverables:
Unit test, documentation and bug fixes.

Week 13: Add option for users to change Avatar, Store user's Avatar in cache for a month and final Over-all Evaluation

  • Final Evaluation
  • If user is above a certain level, allow to change avatar.
  • Store avatar in cache for a month.
  • Fix bugs, if any and get feedback from community.
  • Overall blog post.

Deliverables:
Final evaluation.
Final blog post.

Participation

  • I will remain active on IRC channel, Zulip and hangouts during my working hours.
  • Write weekly progress reports and post it on mailing lists.
  • I will maintain two branches. Code will be uploaded to the leaderboard branch periodically and will be merged with the master branch once review and testing is done.
  • I will use GitHub to manage bugs and task.
  • I will keep mentors updated about my progress and what's preventing me from reaching goals.

About Me

I am a 3rd year student pursuing my Bachelor's degree from Electronics and Communication Engineering, Sardar Vallabhbhai National Institute Of Technology, Surat.
I have been doing Android for 2 years now and it's my passion for coding that draws me towards development despite being an electronics student.
I also have experience working with database and API implementation.
I am Head of development team and work as a Frontend developer for Research and Innovation Cell, SVNIT. I have conducted various Android Workshops headed by the council.
Secured position in Dotslash 3.0 hackathon at SVNIT.
I started programming with Java during my first year in college and never felt the need to switch to some other language. It's because ease, ability to create modular programs with reusable code and platform independency. I am equally comfortable with python for development.
I am not joining any company for internship during summer so will be available with full- time commitments for this project.
I am a patient learner and like to work in collaboration. To me dedication to one's work is the primary ingredient of satisfaction.

How did you hear about this program?
I read about Outreachy in a magazine (OpenSource For You) later had a discussion with a student who has been past outreachy intern in college, she explained me more about it. Since then, i had been an open source enthusiast and wanted to be a part of community.Later I had interactions with a few more past interns of Outreachy and GSOC. The programs is a wonderful initiative. I will be obliged to be a part of this program through Wikimedia.

Will you have any other time commitments, such as school work, another job, planned vacation, etc, during the duration of the program?
I have no other commitments this summer. I am not working as an intern in any company. So I'll be able to give 40 hours or more per week. I am ready to commit extra time if needed in order to finish up the goals of the project. My summer vacations end on July 17th and even after that for the first month i can dedicate upto 30 hours a week to the project as there are no exams during this period. I'll not be taking any vacations so my top-most priority this summer would be the project.

We advise all candidates eligible for Google Summer of Code and Outreachy to apply for both programs. Are you planning to apply to both programs and, if so, with what organization(s)?
I am eligible for both programs. I am applying for Wikimedia Commons App project only.

What does making this project happen mean to you?
The kind of exposure and experience a platform like this would provide me is a biggest why i wanted to be a part of it. I sincerely love the goal of Wikimedia Foundation "Global movement whose mission is to bring free educational content to the world” and would be more than happy to work towards it. It would be really great for me to apply my skills and contribute to such an organization.I have been contributing to Commons app for some time now. I am inspired and thrilled by the vision of wikipedia of making contents available in every natural language. I think contributing to wikimedia will impact the world in a very positive manner.I have developed a lot of apps during my college days, but I always wanted to develop apps that really help people at a global scale. Specially, this project encourages users to contribute more to commons thus narrowing the education gap. At the same time for me it will push the horizon even farther by letting me collaborate with the excellent wikimedia community members.

Why should i be selected for this project?
I am keenly interested in open-source projects and have been passionately working on them. I am an excellent team-player and have experience of co-ordinating among team members. I am a quick learner and can easily adapt myself. If required, i can push myself to the boundaries, come out of my comfort zone to get the job done. I believe I have the required skills and sufficient experience to finish the proposed project. I believe I will follow the practices that will give best performance to the application. I have been contributing to Wikimedia Commons app for about a month now and will continue contributing to it even after the Outreachy period.

Past Experience

I have been programming in Java for 2.5 years and have excellent problem solving skills. I have successfully completed internship in Android for frontend development.
I have successfully completed Udemy course on Complete Android Oreo Development
I am also familiar with RxJava and Retrofit and had published a blog on Beginner's guide

My most recent project and the one i'm most proud of was developed concerning increased number of women crime around the world. It's called Iris
IRIS: A Women Safety App
Unlike normal women safety apps, which sends live location of user, this app is concerned with connecting nearby users of the app so that they can help each-other in time of emergency by sending a notification to all users who are online along with sending users live location to emergency contacts on a shake. I used agora.io sdk for creating a channel.
Further scope of project includes implementing a verification feature to allow only genuine users to log in(i am currently working on this feature).

I also have experience with Object Oriented Designing and had implemented a car parking lot as a task for gojek.
Car Parking Lot
Used object oriented and functional designing skills to design a parking lot which takes input from user and creates lot, park, unpark car handling errors and exceptions.
It is designed using MVVM pattern.

Apart from these I have developed around 15 apps some of which include clones of Instagram, WhatsApp, twitter and snapchat and a bookmarker.

Contributions to Wikimedia Commons App:
Till now have 3 PRs successfully merged.
https://github.com/commons-app/apps-android-commons/pull/3511
https://github.com/commons-app/apps-android-commons/pull/3569
https://github.com/commons-app/apps-android-commons/pull/3598

I have also opened issues one of which was successfully merged.
Beside these I have 2 open PRs:
https://github.com/commons-app/apps-android-commons/pull/3593
https://github.com/commons-app/apps-android-commons/pull/3597

I am still working on few issues assigned and will continue contributing to Wikimedia during and after Outreachy/GSOC period is over.

Relevant Skills :

  • Android SDK
  • Android UI design
  • Familiarity of RxJava and Retrofit
  • Knowledge of Wikimedia action APIs
  • Familiarity with Python
  • Unit testing for Android
  • Restful API implementation in python
  • Version control - git and github

Other skills that I have: Database management- MySQL, Frontend Webdev(HTML, CSS, JavaScript), SQL,PHP, Data Analysis, data visualization, IOT and Arduino , worked with Actions on Google.

Event Timeline

Pavithraes subscribed.

@318anushka We are sorry to say that we could not allocate a slot for you this time. Please do not consider the rejection to be an assessment of your proposal. We received over 100 quality applications, and we could only accept 14 students. We were not able to give all applicants a slot that would have deserved one, and these were some very tough decisions to make. Please know that you are still a valued member of our community and we by no means want to exclude you. Many students who we did not accept in 2019 have become Wikimedia maintainers, contractors and even GSoC students and mentors this year!

If you would like a de-brief on why your proposal was not accepted, please let me know as a reply to this comment or on the ‘Feeback on Proposals’ topic of the Zulip stream #gsoc20-outreachy20. I will respond to you within a week or so. :)

Your ideas and contributions to our projects are still welcome! As a next step, you could consider finishing up any pending pull requests or inform us that someone has to take them over. Here is the recommended place for you to get started as a newcomer: https://www.mediawiki.org/wiki/New_Developers.

If you would still be eligible for GSoC next year, we look forward to your participation!

Sure @Pavithraes i'd like to know the reason, this will help me in improving and presenting a better proposal next time.

@318anushka You have created a very thorough proposal! The GSoC student accepted for this project (see proposal) has been contributing to this project for a long time, which gave them a clear advantage. I believe they also applied last year and did not get accepted, but continued contributing.

Commons Android App has been regularly participating in GSoC for a few years now and might participate in the upcoming rounds, so I'd suggest you continue contributing. :) It would prove valuable for any project you apply for in the future rounds. I'm not sure if you received feedback from your project mentors during the application period. This is an important step, so I'd also recommend that you start working on your proposal early in the next round, to have enough time to get feedback from your mentors and incorporate it.

I hope to see you as an intern soon! Cheers!