Profile Information
Name: Shashank Kumar
Email: shashank.kumar.phe22@itbhu.ac.in
Education: Indian Institute of Technology (BHU), Varanasi
Github : shashankiitbhu
LinkedIn : Shashank Kumar
Location: Varanasi, India
Other Communication modes: Discord, Zulip, Telegram
Typical working hours: 9 am - 10 pm (IST) UTC+5:30
Synopsis
- Wikimedia Commons Android App is an App that Enables user to Upload and Review Images (Contributions) through their Android Devices. The goal of this GSOC Project is to Migrate the project from RxJava to Kotlin Coroutines and Flows.
As our project continues to evolve, leveraging the most efficient and modern technologies is imperative for maintaining our competitive edge and optimizing our development process. Kotlin Coroutines offers a contemporary approach to asynchronous programming, aligning with our goal to adopt modern, concise, and efficient codebases.
As Also Suggested Here RxJava2 is "end of life" , and the optimal path for this project should be to directly migrate to Kotlin Coroutines and Flows Instead.
- Mentors - @Nicolas_Raoul @RitikaPahwa4444
Have you contacted your mentors already?
Yes
Deliverables
There are Main Three Divisions of this Project:
1. Migration from RxJava to Kotlin Coroutines & Flows
2. Split Nearby into a fast query for coordinates + a details query for each pin #4560
3. Report that a Nearby item is not at the specified location #2425
Implementation Strategy
Migration from RxJava to Kotlin Coroutines & Flows
The discussion here provides a very good overall Idea as to what needs to be done for this migration, I am using this information and my own analysis of the project to construct the following Implementation strategy:
Here is how I plan to Implement this Migration :
1. Code Analysis & Planning
Planning the migration, identifying parts of the code to convert, and mapping RxJava patterns to Coroutines/Flow equivalents
2. Java to Kotlin Conversion
This could be partly automated using Android Studio's conversion tool, but manual adjustments and review will be necessary.
3. Migration of RxJava Constructs to Kotlin Coroutines/Flow
- 1. PublishSubject to SharedFlow
- 2. BehaviorSubject to StateFlow
- 3. Completable to Suspend - 8 files in production, 3 in tests.
- 4. Single to Suspend Function - 41 files in production, 32 in tests.
- 5. Observable Cases - 44 files in production, 18 in tests. These require a case-by-case analysis to determine whether to use collecting a Flow or converting to a suspend function.
Split Nearby into a fast query for coordinates + a details query for each pin #4560
The current problem is that when users access the Nearby feature, especially in dense urban areas, the app attempts to load a comprehensive dataset for each POI(Points of Interest), including detailed information like name, description, class, and existence. This process is based on a single SPARQL request that fetches all these details simultaneously. Given the large number of POIs in such areas, this request becomes exceedingly complex and time-consuming, leading to long loading times or even timeouts.
As also suggested in the Issue description itself we have to divide the data retrieval process into two distinct phases - Fast Query for Coordinates and then a second query separate asynchronous requests for each pin to fetch the detailed information.
The following needs to be done to implement this:
- Designing a Simplified SPARQL Query For Initial Coordinates Retrieval and Separate queries for detailed Information. I think we already have a pretty good query for this here
- Asynchronous Loading Strategy for separate queries
- Implement the simplified query to fetch and display basic POI data quickly.
- Develop the logic for asynchronously fetching detailed POI information, including error handling and performance optimization.
- Fine-tune the asynchronous detail retrieval process, possibly by batching requests or prioritizing visible pins. (as suggested here )
- Test the new implementation in various scenarios, especially in densely populated areas, to assess improvements.
Report that Nearby item is not at specified location #2425
As Suggested here possible solutions Include adding a "Report" Button.
- Implement a "Report" that lets the user report the point and gives them the ability to choose from the following:
- The item is not found around that point
- The point is a bit further
- The item does not exist anymore at that place
Timeline
Period | Task Description | |
---|---|---|
May 4 to May 26 | Community bonding period | - Join community and connect with Mentors |
- Introduction and connecting with other contributors | ||
- Start Code Analysis and Identify what part of the code needs migration | ||
- Create a Report on what code parts are going to be migrated from RxJava and also what are necessary Java to Kotlin Migrations Required | ||
- Start on Java to Kotlin Migration for required files | ||
May 27 to May 31 | - Refractor and Review and Test after Java to Kotlin Migration | |
May 31 to June 2 | - Finalise migration strategy and take feedback from mentors and contributors | |
June 2 to June 4 | - Start RxJva Migration: PublishSubject to SharedFlow, and write tests | |
June 4 to June 8 | - BehaviorSubject to StateFlow, write corresponding tests | |
June 8 to June 16 | - Completable to Suspend , write corresponding tests | |
June 16 to July 8 | -Single to Suspend Function , and write corresponding tests | |
July 8 to July 12 | Mid Term Evaluations | - Code Cleanup, Testing and Progress Report/Blog |
July 13 to August 1 | - Migration of Observable , and write corresponding tests | |
August 1 to August 8 | - Report that Nearby item is not at specified location #965 | |
August 8 to August 18 | - Split Nearby into a fast query for coordinates + a details query for each pin: #4560 | |
August 18 to September 22 | - Finalise Changes , Code Quality Review and Improvements | |
August 22 to September 26 | - Update Documentation for changes, Write and Submit Report/Blog for all the Tasks Completed and Accomplishments, Learnings | |
August 26 to September 2 | Final Evaluations | - Mentors submit final GSoC contributor evaluations |
Participation
- I plan to communicate through GitHub, Zulip, and any other suggested mediums
- I plan to report the successful completion of tasks through detailed blogs on either Hashnode or Medium
- I am available online during my working hours and I am always available on my Email.
- I am also available during my working hours for Online meetings through Google Meet or Other Mediums if required.
Previous Contributions to Commons
I started Contributing to Commons in December 2023 and have made several pull requests since then. You can look at those here
Pull Requests Created By Me
Total : 33 :: BUGs : 16 Enhancements: 8 Migrations: 9
Merged: 31
Open: 4
S.No. | PR No. | Issue No. | Description | Status |
---|---|---|---|---|
1 | PR #5544 | #5522 | BUG Precise error message if the password has become invalid after password change | Merged |
2 | PR #5466 | #5437 | BUG Crash in Upload Wizard when changing Android font size | Merged |
3 | PR #5618 | #5277 | Custom picker: Show different pictures that are currently being uploaded | Merged |
4 | PR #5468 | #5448 | BUG Nearby banner shows Item without image | Merged |
5 | PR #5576 | #5558 | Do not reload everything after marking a picture as not for upload | Merged |
6 | PR #5500 | #5474 | BUG App Crashes when Switched Between Dark/Light Mode in Location Picker Activity | Merged |
7 | PR #5510 | #5505 | BUG Edit Category Crashes when Previous Button is Clicked | Merged |
8 | PR #5525 | #5521 | BUG Methods Usage Incompatible with Android API Level 21 | Merged |
9 | PR #5590 | #4664 | Migrate Upload Package To View Binding from Butterknife | Merged |
10 | PR #5503 | #5473 | BUG Changes Lost and App Crashes when Switched between Dark-Light Modes in Edit Description and Captions | Merged |
11 | PR #5665 | #4611 | Make custom image selector available from Nearby | Merged |
12 | PR #5655 | #5556 | [Bug]: Set Wallpaper Not Working Correctly | Merged |
13 | PR #5636 | #5630 | Option to Remove Specific Images from Upload Wizard | Merged |
14 | PR #5594 | #4664 | Migrated Bookmarks Package From Butterknife to ViewBinding | Merged |
15 | PR #5601 | #4664 | Migrated Media Package to View Binding | Merged |
16 | PR #5595 | #4664 | Migrated CategoryDetailsActivity , MainActivity to View Binding | Merged |
17 | PR #5593 | #4664 | Migrated Contributions Package From Butterknife to ViewBinding | Merged |
18 | PR #5592 | #4664 | Migrated Explore Package From Butterknife to ViewBinding | Merged |
19 | PR #5591 | #4664 | Migrated Profile Package from Butterknife to View Binding | Merged |
20 | PR #5478 | #5477 | BUG Selected 18 pictures for multi-upload, but Upload Wizard only asks metadata for 1 picture | Merged |
21 | PR #5550 | #5547 | BUG App Crashes after clicking on Explore in bottom Navigation | Merged |
22 | PR #5543 | #5537 | BUG Unable to upload DNG / RAW images | Merged |
23 | PR #5492 | #5470 | Show Details About Icon Labels when long pressed | Merged |
24 | PR #5493 | #5470 | Show Details About Icon Labels when long pressed | Merged |
25 | PR #5534 | #5532 | BUG Can't Open Privacy Policy | Merged |
26 | PR #5604 | #4664 | Migrated Review Package to View Binding | Merged |
27 | PR #5519 | #5516 | BUG Peer Review Buttons not get disabled after voting an Image for deletion | Merged |
28 | PR #5660 | #4664 | Remove Butterknife from Project & Complete Migration from Butterknide | Merged |
29 | PR #5640 | #5627 | BUG Custom picker: thumbnails sometimes blank | Merged |
30 | PR #5639 | #5628 | BUG Custom picker sometimes crashing when marking many pictures as "not for upload" towards the bottom | Merged |
31 | PR #5648 | #5644 | BUG Fix Custom picker: "uploading" overlay icon disappears when marking another pic as "not for upload" | Merged |
32 | PR #5643 | #5642 | BUG No Precise Error Message After Error Due to Password Change | Open |
Issues Created By Me
S.No. | Issue No. | Description | Status | Type |
---|---|---|---|---|
1 | #5547 | App Crashes after clicking on Explore in bottom Navigation | Closed | BUG |
2 | #5521 | Methods Usage Incompatible with Android API Level 21 (Target SDK Version) | Closed | BUG |
3 | #5505 | Edit Category Crashes when Previous Button is Clicked | Closed | BUG |
4 | #5474 | App Crashes when Switched Between Dark/Light Mode in Location Picker Activity | Closed | BUG |
5 | #5532 | Can't Open Privacy Policy | Closed | BUG |
6 | #5516 | Peer Review Buttons are not disabled while the next image is Loading After Nominating it for deletion | Closed | BUG |
7 | #5473 | Changes Lost and App Crashes when Switched between Dark-Light Modes in Edit Description and Captions | Closed | BUG |
8 | #5630 | Option to Remove Specific Images from Upload Wizard | Closed | Enhancement |
9 | #5470 | Show Details About Icon Labels when long pressed | Closed | Enhancement |
10 | #5642 | No Precise Error Message After Error Due to Password Change | Open | Enhancement |
PR Reviews By Me:
- Reviewed Pull Request #5575 and made this[[ https://github.com/commons-app/apps-android-commons/pull/5575#pullrequestreview-1911563193 | Comment ]]
- Review Pull Request #5578 and added some suggestions.
About Me
I am Shashank Kumar, a Sophomore at the Indian Institute of Technology (BHU), Varanasi, pursuing a B.Tech in Pharmaceutical Engineering & Technology. I have been programming since I was 12 and I have an immense love for building products and solving problems through programming.
How did you hear about this program?
I got to know about this program from a fellow developer at the farewell event of Google's Appscale Academy.
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 only applying to Google Summer of Code.
Past Experience
I have been coding since I was 12 and I have been working in Java since then and even got certified as Oracle Certified Associate, Java SE 8 Programmer at 13. My Journey to Android App development started soon after and even became Google Certified Associate Android Developer at 14. I have been developing Android Apps since then and I have worked on a few Android app projects since then, a notable one which I made when I was in High School Android-Java Tutorial App which got more than 35000 Installs on Play Store.
One of the main Android App I built for - Opined, which is a Social Media Platform that I founded and where I handled all the tech ( Web and Backend in PHP - Laravel ) and
The Android App - Opined App :
- Opined is an Anonymous Social Media Platform that eliminates the problem of biases created by personalization algorithms
- The app is Built on Java and Kotlin/Jetpack Compose
- Uses Sentiment Analysis to Rank User's Opinions
- Fetches Latest News & Headlines and allows users to put their opinions on them
- Got More than 10000 Installs on the Play Store
- Got Selected in the 2022 Batch of Google Appscale Academy
Relevant Skills
- Android App Development with Java and Kotlin
- Jetpack Compose
- Git and GitHub
- Retrofit and REST APIs
- Room Database and SQL
- Unit Testing and Understanding of Robolectric
- RxJava and Multi-Threading
- Understanding of Wikimedia's APIs
Volunteer Experience
- Core Team Member of Club of Programmers (Software Development Group), IIT (BHU) Varanasi
- Backend Lead at Tech Team of Training and Placement Cell, IIT (BHU) Varanasi
Availability
Are you eligible for Google Summer of Code?
Yes.
Do you plan to submit any other proposal apart from this one?
Yes, I am also submitting this proposal
Do you have any other plans during the period of GSoC?
No, I do not have any other plans during the contribution period.
How many hours per week can you dedicate to this?
I can devote at least 40 hours per week and can extend it further if needed, I will have no major commitments during this period, and because of my end-of-semester breaks I won't have any academic commitments during this period either.
Have you been accepted to GSoC before?
No. I am applying to the GSoC program for the first time.
Post GSOC :
I like this project personally and I love how active and enthusiastic the whole contributors community in Commons Android. This community is something that I want to be part of for a long time and keep contributing to and improving this project even after GSOC and I'll be more than happy to be a part of major changes in this project. I have tons of ideas for this project and would love to discuss and implement those over a long period.