今年夏天,我在本科毕业之前有幸被选中了 2019 年 Google 编程之夏活动。这是一个由 Google 赞助发起,全球高校学生都可以申请参加的开源远程项目。因为有许多高质量的项目和可观的美金收入,GSoC 被普遍认为是一项含金量较高的远程实习。

全球每年约 1000 位学生被选中参与各式各样的开源子项目,其中中国大陆历年录取不到 50 人,具体 GSoC 都有什么项目可以看 Google 的官方网站。近几年,国内参加过谷歌编程之夏的同学还自发创建了一个普及该项目的 Github Org, 希望通过资料共享让更多的人了解到这个项目并且提供申请攻略, 详情可见这里:gsoc-cn

我申请并且完成的是一个开源公益项目:Open Data Kit,现在该项目由美国创业公司 Nafundi 管理。这是一个开源的大数据收集和管理工具包,其中的工作是为附属的一个移动应用开发离线数据交换功能。我截取了一段发布在 gsoc-cn 里面的项目相关内容:

Open Data Kit 是一个致力于数据收集、整理的开源大数据平台。从消除脊髓灰质炎(对抗疾病)到热带雨林的保护,ODK 帮助了数千个组织快速、准确、离线和大规模的收集数据。 ODK 软件的用户包括世界红十字会、世界卫生组织、疾病控制中心、珍-古道尔研究所 (Jane Goodall Institute)、盖茨基金会、卡特中心 (Carter Center) 等等。该项目发源于 University of Washington 的计算机实验室,是一个充满公益情怀的项目。

在 GSoC 里面,你可以参与到很多知名的开源工作,如 Python, Tensorflow, Swift,同时参与到核心功能的开发当中。并且在这个过程中,每个人都有对应的导师,导师一般来说是该组织的发起者、长期贡献者或专职维护人员。如果运气好的话,你的导师可能是全球该领域的大牛,比如之前参加 Julia Programming Language 的一个我的朋友,导师就是 MIT 数学学院教授,该同学最后也正是因为该教授的一封信被麻省理工学院全奖 PhD 录取。

当然,这些都是 GSoC 带来的意外惊喜。由于这个过程是远程工作,你完全可以灵活的安排自己的时间和工作地点,像我在为 ODK 做远程项目的时候同时也在各地旅行……短短的三个月,我陆陆续续从 6 个城市为那个仓库贡献了代码。更重要的是,对于没有线上和他人合作过的朋友,这是一个不可多得的机会:学习代码托管和大型项目的维护的交流方式。

我的导师是来自印度 Google 的 Sobhit 和 Lakshya。不过由于社区不大,我和社区的发起人 Yaw 和 Hélène 和还有其他来自全球的开发者也都很熟。平常除了在社区里面交流项目和技术问题以外,还时常交流一些生活趣事:Yaw 和 Hélène 是一对美国夫妇,经常在 Slack Channel 里面晒娃。社区的还有一个热爱料理的荷兰小哥,经常给我们分享荷兰菜的做法……可以说是很欢乐了。

回过头来,GSoC 给我最大的成长应该是……和印度人言语沟通的能力了,每周的会议都要和两个地地道道的印度人聊英语。不过导师也非常理解我们对于印式口音的不适应,在他们一慢再慢的耐心指导下,后来还是克服了交流的问题,这个算是一个很宝贵的学习经历。从技术上来说,完成预期的工作没有太大的问题,主要问题在时间安排上,也许是刚开始还不懂怎么合理安排旅行日程和工作,导致第一个月进度稍微落后于计划……不过后来还是导师的帮助下,赶完了 DDL, 通过了项目。

总的来说,这是一个很难忘的夏天了,通过 GSoC 认识了很多优秀的小伙伴,也提升了自己的技术和沟通交流能力。


最后贴一下 Final Evaluation,

GSoC 2019 @Open Data Kit

This summer, I was fortunate to be selected as a participant in the Google Summer of Code 2019 with Open Data Kit. It was a fulfilling and memorable experience. I participated in an open-source project while improving my coding ability, as well as, my teamwork ability.

This post is a summary of the three-months experience, including all the mistakes, learnings and progress I have made.

Project

*Strategy to Increase Devices Supported and Validate Application Behavior

The most important task for this project was to build a secondary transferring method for Skunkworks-Crow, which allows forms exchanging in different mobile devices. Last year, we used a hotspot to send/receive data but hotspots have some limitations (e.g, in Android 9 devices, users cannot use the hotspot), so I added another method (Bluetooth) and made the two methods work well in the same application.

What I’ve Done

  • Refactor the application with a new structure (#256 closed #252)
  • Refactor the style.xml (#258 closed #254)
  • Build the bluetooth transferring method (#260 closed #253 #265)
  • Create dialogs for bluetooth transferring method (#270 closed #268 #269 #297)
  • Improve the bluetooth devices scanning progress (#272 closed #271)
  • Add unit tests for most UI works and preference (#274 closed #265)
  • Remove the unreachable bluetooth devices in list (#276 closed #275)
  • Fix the socket closed and timeout issue while using bluetooth (#277 closed #267)
  • Add the empty view of bluetooth scanning page (#279 closed #278)
  • Fix the transferring results presenting (#281 closed #280 #293)
  • Quick fix for the bluetooth devices list view (#283 closed #282)
  • Bluetooth feature with android 9 adaptations (#286 closed #284)
  • Build the default transferring mechanism and UI improvements (#290 closed #266)
  • Handle the permission with storage in API level > 23 devices (#296 closed #295)

Still In Progress

  • Add reset application option in the settings (#300 closes #299)
  • Update the README.md with new feature (#307 closes #287)

Future Work

  • Test the two methods, and fix issues to make the application more robust.
  • Add the scanning QR Code to connect feature for Bluetooth.
  • Build a better UI for both the bluetooth method and hotspot (with an icon).
  • Make hotspot feature works in Android 9 (and above) devices.
  • Design and apply an app icon for Skunkworks-Crow.

Challenges & Learnings

Honestly, during this summer, the biggest challenge was my time is limited. I’m in my final college year and have lots of work to do apart from Skunkworks-Crow, so the most difficult thing was to allocate my time reasonably. In the first month, I worked slightly slower than planned, but my mentors were very nice, they gave suggestions and favors to me during that period and finally helped me catch up with the timeline.

Another challenge was communicating effectively with mentors. I’m not a native English speaker, so the first time when I had a call with my Indian mentors, I was really nervous and tried my best to understand what they said. The good news is, @dexter21 and @Shobhit_Agarwal are very nice and patient. I still remember after making a call the first time, @dexter21 wrote a very detailed meeting record in case something missed. Many things like that help me become less afraid to communicate. And I believe that is also the real goal of the open-source culture: sharing, communication and writing better code.

From the technological aspect, I didn’t have any issues. Everything went well during this summer. The most difficult part is debugging, running the program on different devices may result in some unknown issues that slow your progress and drives you crazy. So it’s necessary for developers to know how to debug like using breakpoints and loggers. I think my ability in this area has been greatly improved during this summer.

Finally

GSoC 2019 is an unforgettable experience that has improved my abilities in all aspects. And Open Data Kit is also a very cool organization, it helps people in some challenging environments collect and manage data. With the developments of society and technology, data plays an increasingly important role. For ODK, maybe we can do something more like using learning-based methods to help users manage their large data and get more value from big and structured datasets, anyway, hope ODK gets better and better.

Last but not least, thanks to my mentors @dexter21 and @Shobhit_Agarwal! You are great mentors and it was very nice to work along with you guys this summer. And I also appreciate the suggestions and favors given by @yanokwa and @LN , not only the project but some ideas for the future.