Department or Program

Computer Science

Additional Department or Program (if any)

Computer Science

Primary Wellesley Thesis Advisor

Franklyn Turbak


MIT App Inventor is a blocks-based programming environment in which users connect puzzle-shaped blocks to build apps for Android devices. App Inventor supports a Python-like list data structure typically manipulated with loops, but it lacks important list operations that can greatly simplify list manipulation.

I have extended the implementation of App Inventor to include new blocks that map, filter, reduce, and sort lists. Since App Inventor does not have first class functions, many of these blocks incorporate the parameter and body declarations of functional arguments associated with these operators. For example, the mapping block has a socket for the input list, a parameter declaration to name each item in the list, and a socket for the expression that denotes the result of transforming the item. There are three sorting blocks: one using a default comparator that arranges the list items in increasing order; one with a key function that returns a proxy value used for sorting the list with the default comparator; and one that uses a comparator provided by the user.

In addition, I also addressed the problem that some App Inventor list operators are destructive (they change their input list) while others are nondestructive (they return a new list). This inconsistency can be limiting and confusing to users. To solve this problem, I have implemented a mechanism for many list operators that allows users to choose between making the operator destructive or nondestructive. This flexibility eliminates complicated programming workarounds necessary in the current system.

To test the usability of the map, filter, reduce and sort operators, I conducted a user study with 18 students at Wellesley College who had previous experience working with App Inventor. Most users, even those with no previous exposure to map, filter or reduce, were able to successfully complete a majority of the tasks. Two common problems that users faced, however, was manipulating a list of lists using map, filter and/or reduce and sorting a list with two keys. In future work, the results and feedback from this study will be used to iterate through the design of these new blocks.