Crafting the Building Blocks of Accessible Code

Beka Westberg, a software engineer on Google’s Blockly team, is dedicated to lowering the barrier to entry for programming.

Beka Westberg works as a software engineer on Google’s Blockly team.

What if I told you that my job is to program a programming language that helps other people learn programming? Sounds meta but it’s true! I work as a software engineer on Google’s Blockly project, which is a free, open-source library for creating block-based programming languages. Block-based programming is a form of coding that allows users to drag and drop blocks instead of typing out code, making it an approachable way to learn how to program. 

Blockly makes it easy to create your own block-based programming language because it handles visualizing blocks, connecting blocks, and converting blocks to code. This allows you to focus on which blocks to create to communicate programming concepts to your end users. Many block-based programming languages are built on Blockly, including MIT App Inventor! I feel incredibly lucky that everyday I get to help applications like App Inventor make programming more accessible for everyone. The path I’ve followed to get to this point has been anything but traditional.

Becoming a Programmer

I first learned to program in elementary school using Scratch, a block-based language that is similar to App Inventor but targeted towards younger students who want to express themselves with a computer. Playing with Scratch gave me a taste of what it’s like to be a software engineer—communicating with a computer, running into issues, and finally creating what you envisioned.

Eventually I moved onto text-based programming languages like C# and Kotlin that allowed me to program games and UI libraries. While building a game about creating a Japanese garden, I discovered L-Systems, a kind of program that is great for generating plant structures.

Unfortunately, L-Systems were difficult to play with. Because the infrastructure was not publicly available, I had to reimplement it myself, and it was not intuitive to interact with. I thought that a block-based programming language could solve these problems. I always loved how block-based languages abstracted away syntax and used plain language to describe behaviors. I decided that to make L-Systems more intuitive, I would create my own!

Example of plant structures created with L-Systems.

Programming for Other Programmers

Around 2017 I was looking for a library to help me build my L-Systems playground, and I discovered that Blockly was the only game in town. After building an application with it, I decided to dig deeper and contribute to the library itself. Being open source means that anyone can contribute to Blockly’s code to make improvements or add features. I was excited to be programming something that helped me learn to program!

By contributing to Blockly, I became even more passionate about block-based languages and making programming more accessible for users. Text-based programming languages almost always use English keywords such as for, if, and return. This makes programming more difficult for non-English speakers, who have to remember words in a different language in addition to their special behaviors. On the other hand, block-based languages can be easily translated into a user’s native language, allowing them to focus on learning the concepts behind programming.

Block-based languages are an incredible tool for lowering the barrier to entry and making programming accessible to everyone.

Block-based languages also eliminate common sources of confusion for new programmers. For example, they provide guard rails to prevent users from passing incorrect information into functions. They offer a much more intuitive interface for interacting with data; instead of specifying colors as RGB strings, users can simply pick a color from a color selection tool. Block-based languages are an incredible tool for lowering the barrier to entry and making programming accessible to everyone.

I got to see this in action when I worked on MIT App Inventor in 2020 for Google Summer of Code. Summer of Code is an online mentoring program in which Google connects new contributors to open-source projects. They pay you to “spend a summer flipping bytes instead of flipping burgers!” For my Summer of Code project, I implemented “helper blocks” in App Inventor, which make it easier to interact with data. Instead of manually typing in the name of an asset, helper blocks allow you to pick the name from a dropdown. 

For her Google Summer of Code project with MIT App Inventor, Beka Westberg implemented helper blocks (in red), which make interacting with data more intuitive.

My experience working with App Inventor was wonderful. I felt so lucky to have access to a group of incredibly smart people. I could see the team’s passion for mentorship in the time and effort they poured into all of their contributors. I learned so much more about block-based programming from them. They also helped me practice countless soft skills like communication and time management, which helped me arrive at where I am today.

Working with block-based programming languages has been an incredible journey for me, from learning to program with Scratch, to contributing to Blockly, to seeing them in action with App Inventor. Over time I’ve only become more convinced of the power and versatility of this tool. In my opinion, block-based programming languages are the best way to teach programming as it exists today. I hope to continue working in this space long into the future.

Previous
Previous

Q&A with David Kim, Software Developer with MIT CSAIL

Next
Next

App Inventor Foundation Launches Regional Appathon in Taiwan