**Week 1: Dec 7 - Dec 13**
Task: {T119278}
Day 1:
- Commenced testing WikiData API to see how it performs in categorizing our sample pictures. Used [[ https://tools.wmflabs.org/wikidata-todo/tabernacle.html?wdq=&pagepile=885&props=373%2C625&items=&show=1 | TABernacle ]] to run queries.
- Filled out [[ https://github.com/nicolas-raoul/apps-android-commons/wiki/Location-based-category-search | GitHub wiki ]] with findings.
- Reading up on Commons:Commons API and Commons:API/MediaWiki.
Day 2:
- Trying to refine my analysis of test results according to feedback
- Talked to mentors about how to progress from here, as Commons:Commons API does not work for our purpose and Commons:API/MediaWiki appears to only return pages whereas we need Commons categories. Trying to find a way around this.
- Brainstormed with mentors at https://etherpad.wikimedia.org/p/commons-app-android-nearby-categories on how to solve this problem. After discussion, we concluded that I should try "Search for existing pics at that location" strategy.
Day 3:
- Commenced testing "Search for existing pics at that location" strategy (using [[ https://commons.wikimedia.org/wiki/Special:ApiSandbox | Commons Mediawiki API Sandbox ]] with geosearch generator, 100m ggsradius and 10 ggslimit)
- Filled out GitHub wiki with findings
- Modified 'manual categorization' according to mentor feedback (the benchmark has to be perfect)
Day 4:
- Identified false positives in results for WikiData and "Search for existing pics at that location" tests. Listed them in GitHub wiki.
Day 5:
- Calculated scores for WikiData API and "Search for existing pics at that location" strategy for each sample picture, and their total scores.
- Wrote small [[ https://github.com/misaochan/rating-calculator/blob/master/calculator.py | Python script ]] to automate the calculations (not required, but it saved time and was fun :)).
- Results are listed at T119278 .
Day 6:
- Performed additional tests using "Method D" (described by mentor on task thread) to test effect of widening search radius. Added results to GitHub wiki.
Day 7:
- Wrote [[ https://cookiesandcodeblog.wordpress.com/2015/12/13/outreachy-week-1/ | blog post ]] for Outreachy Week 1.
**Week 2: Dec 14 - Dec 20**
Task: {T119279}
Day 1:
- Searched for library to extract picture coords. After finding ExifInterface, searched for a method of converting the (degrees,minutes,seconds) format to decimal degrees.
- Read these tutorials ([[ http://www.edumobile.org/android/exif-info-from-a-picture-file-in-android-programming/ | link 1 ]], [[ http://android-er.blogspot.co.nz/2010/01/convert-exif-gps-info-to-degree-format.html | link 2 ]])
- Combined the code in both of them in order to write a [[ https://github.com/misaochan/exif-interface | 'mini-app' ]] that displays the latitude and longitude of a selected picture, and converts it to decimal degrees
Day 2:
- Trying to find out which part of the existing code would be a good place to put in the coord extraction method (from Day 1).
- Familiarizing myself with how to write and read the logcat, and tried (unsuccessfully?) to fix existing logcat errors in the code.
- Meeting with mentors. Decided on Method D as the answer to Week 1's task. Discussed how to implement the ExifInterface method in the existing codebase, and created a 'debugging' state in the app to simplify testing (we don't have to submit pics to Commons database during initial tests).
Day 3:
- Made a very silly mistake and wasted a few hours wondering why only some of my logs were showing up, before finding out that when filtering logcat messages in the DDMS, if you want to filter for the "image" tag, you should filter for "tag:image" and not just "image". :(
- Successfully got exifInterface methods working in ShareActivity.java, but stopped working after refactoring to put it in its own class. Issue described in more detail at T119279 .
Day 4:
- Fixed refactor problem with help of mentor and [[ http://itekblog.com/android-context-in-non-activity-class/ | this ]] tutorial. Code works in its own class now and logs the latitude/longitude of a picture.
Day 5:
- Implemented methods for conversion of coords from degrees,minutes,seconds to decimal degrees (required for next step)
- Submitted [[ https://github.com/nicolas-raoul/apps-android-commons/pull/31 | pull request ]] to official repo.
- Modified submitted code according to mentor's feedback. Pull request merged.
Day 6:
- Wrote [[ https://cookiesandcodeblog.wordpress.com/2015/12/20/outreachy-week-2/ | blog post ]] for Outreachy Week 2.
- Learnt how to use 'git stash' to prevent committing code that is only used for debugging and that cannot be included in a release.
Day 7:
- Started on Week 3's task (T119280) ahead of time to make up for the extra day off that I intend to take during Week 4 (previously discussed with mentors and approved).
- Read up on MediaWiki API documentation, and methods of implementing the http requests to the API asynchronously.
- Meeting with Niedzielski (meeting with Nicolas will have to be held separately this week due to clashing schedules). Details of discussion described at T119280.
**Week 3: Dec 21 - Dec 27**
Task: {T119280}
Day 1:
- Trying to build off of a dummy Volley app that @Niedzielski wrote, that sends requests to the MediaWiki API and receives responses as JSON objects.
- Managed to get dummy app to display categories alongside page ids, namespaces and filenames. However, having issues with constructing a Category model for responses. Talking to Niedzielski about how to solve these issues.
- Meeting with Nicolas scheduled for Wednesday.
Day 2:
- Implemented UrlBuilder helper class in ShareActivity.java to build URL for MediaWiki API calls based on coordinates of uploaded image
- Added incomplete APICalls class based on dummy app, that sends asynchronous calls to the API with the URL above. Imported necessary GSON libs via Maven.
- Still having problems with parsing and constructing a Category model for the responses received. Committed new (but incomplete) code to [[ https://github.com/misaochan/apps-android-commons/commits/api-calls | api-calls ]] branch of my own repo.
Day 3:
- Waded through lots of confusing GSON/JSON tutorials before finding [[ http://www.javacreed.com/simple-gson-example/ | this ]] helpful one.
- Finally got JSON unmarshalling to work for categories (I just found out that that means 'deserialization'...). Example output listed at T119280 and [[ https://github.com/nicolas-raoul/apps-android-commons/pull/33 | pull request ]] submitted to official repo.
- Meeting with Nicolas. Discussed how to handle issues such as no GPS coordinates, no connection to server, etc. Pull request merged.
Day 4:
- Modified code according to mentor's feedback
- Implemented null checking to prevent crashes when invalid picture or picture without GPS coordinates is selected. Tested and found that app does not crash when MediaWiki server not accessible.
- Attempting to add categories to a Set in preparation for week 4's task ( T119281). Encountering problems which are described at https://github.com/nicolas-raoul/apps-android-commons/pull/34
Day 5:
- Wrote [[ https://cookiesandcodeblog.wordpress.com/2015/12/25/outreachy-week-3/ | blog post ]] for Outreachy Week 3. Reading up on static Java classes and methods.
- Managed to get categorySet working, now have a collection of unique categories for next step.
- Managed to get app to display categories found alongside previous categories (that was quicker than expected, amazing what the rare night of good sleep does!). Works but needs to be tidied up. [[ https://github.com/nicolas-raoul/apps-android-commons/pull/34 | Pull request ]] submitted for feedback.
Day 6:
- Tested app with real uploads (instead of in debugging state previously). Used pictures sent by Nicolas. Made minor fixes to app (put nearby categories on top of recent categories instead of below, implemented checking for null pages).
- Used [[ http://www.geosetter.de/en/ | GeoSetter ]] to add GPS info to my existing pictures. Tested with these pictures, and also with pictures with no GPS info. Some examples of test results shown at T119281.
**Week 4: Dec 28 - Jan 3**
Task: {T119281}
Task: {T122568}
Note: Will be traveling for 3 days from Dec 30 - Jan 1
Day 1:
- Final tests, versioning and tagging, wrote changelog. Released updated app on [[ https://play.google.com/store/apps/details?id=fr.free.nrw.commons | Google Play Store ]] with mentor's approval.
- [[ https://github.com/nicolas-raoul/apps-android-commons/pull/34 | Pull request ]] waiting for merge. Reading up on next week's task (T119282) in the meantime.
- Learnt more about how [[ https://commons.wikimedia.org/wiki/Commons:Geocoding | Commons geocoding ]] works, found an issue that I discussed at T119281#1905714. Opened [[ https://github.com/nicolas-raoul/apps-android-commons/issues/35 | GitHub issue ]] for it.
Day 2:
- Reading up on dictionaries/maps in Java, thinking about how to map an 'area' (which involves a range as well as latitude and longitude values) to a 'category'. Going through existing codebase to try and figure out how 'recently used' categories are cached in the app
- Meeting with Nicolas (Niedzielski advised us that he would be traveling during this period). Discussed caching task and decided that we will need to use a 3rd party library to map a 2-dimensional area with radius to a category.
- Determined that an additional task (T122568) is required before starting on caching. Will spend the remainder of this week on that task after I return from traveling.
Day 3:
- Arrived back from traveling. Made some modifications to last week's pull request according to mentor's feedback.
- Worked on additional task in separate branch. Managed to get the functionality up, submitted separate [[ https://github.com/nicolas-raoul/apps-android-commons/pull/36 | pull request ]].
- Discovered bug with this functionality (described at T122568 ). Working on it...
Day 4:
- Read up on [[ https://github.com/varunpant/Quadtree | QuadTree ]] library recommended by mentor for next week's task. Read up on how to send multiple requests with Volley in order to fix yesterday's bug. [[ http://code.tutsplus.com/tutorials/creating-a-weather-application-for-mars-using-volley--cms-23812 | This ]] and [[ https://www.captechconsulting.com/blogs/android-volley-library-tutorial | this ]] tutorial seem helpful.
- Last week's pull request [[ https://github.com/nicolas-raoul/apps-android-commons/pull/34 | merged ]].
- Meeting with Niedzielski, worked through some problems that I was having. Conclusions: (1) API code needs to be refactored, ShareActivity.java should supply the Listener instead. (2) For sending multiple API requests, RequestQueue should be refactored into a singleton pattern. (3) Radius/caching logic for next week's task should be in a separate class. (4) We both face similar issues when trying to import Maven dependencies in Android Studio. I will import the 3rd party library for next week's task manually first, and we will sort the issue out later (5) The 'for' loop in my current code is running infinite loops because it isn't extracting the current request's radius. There is actually no need for a 'for' loop, we just need to check if there are enough categories and if the radius is within limits.
Day 5:
- Trying to do the refactoring mentioned above (Listener in separate class, singleton pattern, changing the 'for' loop). Encountering problems that are described at T122568. Current state of code can be found at [[ https://github.com/nicolas-raoul/apps-android-commons/pull/36 | pull request #36 ]].
**Week 5: Jan 4 - Jan 10**
Task: {T119282}
Day 1:
- Still trying to fix yesterday's bug. Reading up on passing objects and nested classes in Java. Posted on [[ http://stackoverflow.com/questions/34583960/null-object-reference-error-when-referencing-member-variable-object-with-nested | StackOverflow ]] about my issue.
- Wrote [[ https://cookiesandcodeblog.wordpress.com/2016/01/04/outreachy-week-4/ | blog post ]] for Outreachy Week 4.
- Reading javadocs for [[ https://github.com/varunpant/Quadtree | Quadtree ]] library that Nicolas recommended using for caching task.
Day 2:
- Came up with a rough plan for using the Quadtree library to store points along with the associated categories and to query an area for previous points' categories. Details at T119282.
- Trying to get basic functionality up. Had to copy over Quadtree source files manually due to Maven/AS issues that were discussed previously with Niedzielski.
- Managed to get app running QuadTree and displaying dummy categories (that were set manually) for a given point. Code in [[ https://github.com/misaochan/apps-android-commons/tree/caching | caching branch ]]. Need to figure out a way to store QuadTree information persistently, as well as how to structure categories for real queries.
**Week 6: Jan 11 - Jan 17**
| Day | Notes
|1 | |
|2 | |
|3 | |
|4 | |
|5 | |
**Week 7: Jan 18 - Jan 24**
| Day | Notes
|1 | |
|2 | |
|3 | |
|4 | |
|5 | |
**Week 8: Jan 25 - Jan 31**
| Day | Notes
|1 | |
|2 | |
|3 | |
|4 | |
|5 | |
**Week 9: Feb 1 - Feb 7**
| Day | Notes
|1 | |
|2 | |
|3 | |
|4 | |
|5 | |
**Week 10: Feb 8 - Feb 14**
| Day | Notes
|1 | |
|2 | |
|3 | |
|4 | |
|5 | |
**Week 11: Feb 15 - Feb 21**
| Day | Notes
|1 | |
|2 | |
|3 | |
|4 | |
|5 | |
**Week 12: Feb 22 - Feb 28**
| Day | Notes
|1 | |
|2 | |
|3 | |
|4 | |
|5 | |
**Week 13: Feb 29 - Mar 6**
| Day | Notes
|1 | |
|2 | |
|3 | |
|4 | |
|5 | |