Intern 2021: Finale!
Published 21/09/19
Project Summary
For the summer of 2021 I did an internship with Google Blockly. Blockly is a library for adding blocks-based coding editors to web applications.
My project for this summer was to build an upgraded serialization system for Blockly (codename: Project Cereal). Blockly already has a serialization system, but its architecture has some problems, and the format that it exports (XML) isn't great for developers. The job of my project was to correct those issues.
Project Cereal had four goals:
-
Allow devs to serialize to different, more compressible formats.
This includes formats like JSON, CBOR, or schema-ed protobufs.
-
Allow devs to programmatically manipulate state more easily.
This is compared to the current XML system, which is terrible to work with programmatically.
-
Allow devs to add custom serialization, to support plugins.
For example, this would add support for serializing the blocks in the recent backpack plugin.
-
Lay the groundwork for a future blocks-language versioning system.
This topic deserves a whole blog post of its own.
The code
Work for this project was done in a feature branch because the Blockly team was concurrently doing a big refactor of all of the files. There were also several pull requests put up in blockly-samples to make plugins compatible with the new system.
If you follow the links, each PR includes a detailed description of what it accomplished and how it was tested.
Design
But this was not just an implementation project, this was also a design project. First the high-level goals had to be defined, and then a plan for achieving them had to be defined, which required several design iterations.
My original idea was to use a builder pattern which I outlined in a blog post a while ago. But this architecture was designed before Blockly had the concept of plugins, and it didn't really work now that extensibility was a key requirement.
My second idea (which we ended up using) was to have Blockly export simple JSON, since there is already a lot of support in the web ecosystem for converting JSON to other formats. In this design we had one serialization system which was parameterized with different serializers. Each serializer was responsible for serializing and deserializing one system (eg blocks). These serializers would return JSON, which the serialization system would then concatenate together and output.
This solved our goals of allowing devs to save to different formats, making the state more writable, and making the system more extensible.
Once that was decided, there were still lots of internal documents I had to write and design meetings I had to run to figure out the details of the system. Eg, how the new JSON system would relate to the old XML system, and how the new JSON format would be structured. But eventually we landed on a design which you can see outlined in my design document.
Documentation
I also wrote extensive documentation for this project.
Many of the pages on the dev site had to be updated to include info about the new JSON system (eg custom fields, extensions and mutators, and the toolbox).
Many of the codelabs also had to be updated, which I did in this PR.
And finally I created a migration guide to help developers transition from the XML system to the JSON system.
My Growth
Before starting this internship I feel like I already had a lot of experience with professional development from my time working on Blockly and my time working with App Inventor last year. However, I still feel like this summer allowed me to add some really important tools to my toolbox.
Meetings are Hard
The first thing I learned was that meetings are hard! I had to run a lot of design meetings at the beginning of my internship to figure out how the new system was going to work. And through this I learned how to do the right kind of prep to make sure that meetings stay effective and on track.
-
Clearly indicate the process for discussion (with time boxing)
This helps you as the meeting leader know how to direct conversation.
-
Compress the background information
People need to get up to speed quickly to be able to make decisions. They don't want to read three pages of text.
-
Include room for notes
This may be obvious to most people, but it was something I had to learn. You need to leave room for notes so you can have a record of what was discussed.
Meetups are Fun
Throughout my internship I got to meet with a bunch of amazing people at Google. My team members (and especially my hosts) worked really hard to introduce me to people, so I was meeting with a new person basically every week.
At first I was a bit nervous to reach out to people, because I thought they would be annoyed at me wanting to take up their time. But I was shocked and delighted to discover that people were always very excited to share in my excitement about what they do.
I got to meet with people who work in a bunch of different areas. Including:
- Android
- Waymo
- Google Maps
- Education
- Golang
And I got to meet with people in a bunch of different roles. Including:
- Product Managers
- User Experience Researchers
- Technical Writers
- Software Engineers
- Site Reliability Engineers
Conclusion
I feel like this summer helped me grow so much as a team member and programmer. I learned so much about working with other people, and how different roles relate to each other. Plus I also got to complete a really impactful project with lots of interesting challenges!
I feel particularly thankful for everyone I got to work with directly. Especially my hosts Abby and Maribeth, who were always so supportive and helpful. My mentor Xindi, who taught me so much about Google culture. And my whole team for their incredible guidance during my project, and always making me feel welcome.
I feel like I grew so much from this experience, and I am so so thankful for it =)
← Previous