BlocklyVR: Exploring Block-based Programming in Virtual Reality

As programming is typically a static activity in front of a screen, we perform an initial exploration around the capabilities of block-based programming in the immersive space using Virtual Reality

(VR) to make an early charting on how programming could involve moving the programmer's body.We created a block-based programming interface in a VR space called BlocklyVR based on the existing Blockly programming environment.To investigate programmer performance and experience in BlocklyVR, we conducted a controlled lab experiment (N = 20) with eight programming tasks that covered mathematical operations, if-statements, and function creation.Our initial exploration contributes by classifying movement types made by BlocklyVR programmers and reflecting on how these movements are related to the programming tasks.Additionally, our data suggests that participant performance in BlocklyVR was not affected compared to the 2D Blockly, even if participants were physically moving in VR space.We also found that the virtual

INTRODUCTION
Researchers in Human-Computer Interaction have a long-going interest in creating engaging interfaces for programming [15,55,63].Two forms of programming interfaces became particularly interesting to explore due to their playfulness and suitability for nontech-savvy users: block-based and tangible.For this, researchers proposed and developed numerous block-based and tangible programming interfaces that made programming more accessible to non-programmers [4,5,29,47,50,65,74,75]. Block-based interfaces conceptually focus on making programming easier by presenting programming concepts as visually distinct blocks.However, the traditional method of engaging with the blocks on a computer screen using a mouse or touch interface hinders the user's ability to fully immerse themselves in a physically engaging way rather than an external party behind the glass screen [52].Tangible programming interfaces bring the interaction away from the computer screen but are limited by the physical materials representing the program constructs [68].Virtual Reality (VR) provides an interesting opportunity to create engaging programming interfaces without these constraints.Several projects have begun to explore the combination of VR and block-based interfaces [60,64,67,72].However, there still needs to be a greater understanding of what advantages the Virtual Reality space can introduce for block-based programming.
Previously, researchers have employed block-based programming languages in educational settings for learning programming [43,53,58], and as an easy-to-use approach for constructing simple software for end-users, e.g., hobbyist electronic projects, mobile apps, and games [5].Likewise, tangible programming interfaces have been used for similar purposes, such as fostering computational thinking [24,46,70], creating 3D models [35], and supporting visually impaired people [25].Tangible interfaces can foster physical sensemaking and engagement [7,22,48], but are limited by the physical constraints imposed by the materials.VR can provide an alternative to tangible interaction by facilitating embodied physical interaction since users can freely move while assembling blocks into programs.Previous block-based VR interfaces have been engaging for both novice students [72] and K-12 children [60], and direct object interaction instead of pointer-based interfaces might be a contributing factor.Incorporating both hands in the interaction [72] and standing up instead of sitting [64] could be additional advantages, but there is a lack of empirical evaluation confirming these assumptions.
In this paper, we explore the possibilities and limitations of blockbased programming in Virtual Reality spaces with the long-term aim of enriching the desk-bound programmer's work.For this, we created an early exploratory prototype for interactive programming in Virtual Reality called BlocklyVR, based on the block-based interface Blockly 1 .With this, we aim to facilitate spatial, direct, and two-handed interaction with programming blocks.To evaluate the effectiveness of BlocklyVR regarding the extra time the programmer might spend due to movement in space, we conducted a controlled lab experiment (N = 20) comparing our proposed system to the existing 2D Blockly programming environment.Additionally, for the BlocklyVR participants (N = 10), we measured physical activity and conducted video observations to identify types of movements in a physical programming environment.We found that task completion time is comparable between Blockly and BlocklyVR, except for one task characterized by low complexity and unproductive movement.We also classified four distinct types of interaction and movement in BlocklyVR.Our findings suggest implications for efficiently incorporating physical activity in productive VR interfaces, which sets a future research direction for designing Virtual Reality systems.

RELATED WORK
Although few empirical evaluations have focused on exploring block-based programming in Virtual Reality (VR) and its influence on user performance and physical movement, researchers have created and investigated many systems to support block-based, tangible, and VR programming.In this section, we outline these two pillars of the previous work we build on in this paper: (1) block-based & tangible programming and (2) programming in VR.

Block-based & Tangible programming
Block-based programming grew from the MIT MediaLab on LogoBlocks research in the 1980s [47].Seymour Papert, one of the principal creators of the Logo programming language used in LogoBlocks, stated that he intended to create an "immersive environment" for learning mathematical concepts [49].It has gained significant popularity in the last decade due to the rise of platforms like Alice [5], Scratch [47], Snap! [29], and Blockly [4,75].These platforms offer versatile interactive environments for novice users to explore programming for robotics [61,75], tangibles [39], IoT [4,59,74], and the LEGO Robotics ecosystem [65].
Block-based programming is conceptually based on making programming easier and more accessible.Drawing on the principles behind the move from text-based to graphical user interfaces in the 1980s, it relies on direct manipulation, with a main principle of having the "knowledge" -in this case, the programming syntax -available in the "world" (on the screen), rather than in the "head" [62].Apart from the direct manipulation mode of finding and arranging commands, the blocks draw on principles of mapping, grouping, and visual affordance, with the shapes and colors of the blocks indicating their type and affordances.However, today's block-based programming experience primarily focuses on the 2D space, where a user sits in front of a screen and indirectly manipulates the blocks using a mouse and keyboard or touch input on a smartphone or tablet [2].In our work, we go beyond the interaction "behind the glass" and explore the possibilities of embodied physical engagement with blocks for programming as we explore the design space of "raising programmers from the desk".
One possibility of incorporating physical interaction for programming is through tangible interaction.Along with the development of block-based interfaces, researchers employed tangible interaction for learning to program for over 30 years [34,51] and discovered that it could foster enhanced physical sensemaking and engagement [7,22,46,48].Using Virtual Reality sacrifices some of the richness of touching and sensing physical material but could still provide an embodied experience compared to a sedentary desktop setting [52].Some affordances of a tangible interface can also be mimicked in VR.For example, audio and haptic feedback can simulate weight sensations [73].More importantly, since all material is virtual in VR, it facilitates dynamic modifications central to any programming activity, e.g., interface actions such as making copies, changing the behavior of objects, and changing shape and size related to object manipulations, which we build on in our work.

Programming in Virtual Reality
Programming in Virtual Reality covers a plethora of programming activities, such as live programming, virtual scene creation, code comprehension, and learning.Live programming [23] provides immediate feedback on output changes and the benefits of immersion in the virtual space.For example, Castelo-Branco et al. [10] studied live programming in VR for architectural 3D models and received positive feedback from end-users.However, users found using a physical keyboard cumbersome and suggested direct manipulation techniques for code interaction, which we employed in our work.Another research direction explored the creation of virtual scenes with virtual controls.For instance, EngtangleVR [11] used a hybrid approach in which certain details of VR scenes can be edited with sliders and checkboxes within the virtual environment and the rest of the scene -with a visual-programming interface.The example of FlowMatic [77] put a visual-programming interface inside the VR scene.Users can thereby directly program the behavior of objects in the scene without taking off their VR headsets.Some projects have employed VR for program comprehension [19] that entails tracing a program flow [12] by visualizing it on a 3D spatial layout.For example, Dominic et al. [16] compared programmers' comprehension of Java code in VR with a desktop setting and found that their implementation made comprehension more difficult.In contrast, a study on ExplorViz [31], a tool for 3D-visualizing Java code in VR, demonstrated that participants solved more comprehensive tasks correctly in ExplorViz compared to browsing the textual code base, but zooming in and out of the 3D-visualization was found cumbersome.Lastly, research projects focused on learning programming in immersive spaces [37,64,67,71].For example, Cubely [72] and VR-OCKS [60] are two block-based environments that allow the users to walk around and directly interact with the blocks instead of sitting down and interacting with a ray-cast pointer.Participants preferred Cubely over the desktop interface Blockly due to its immersiveness and two-handed interaction [72].
While Cubely and VR-OCKS are similar to our system, our questions are different, and the data we gather for exploratory purposes enables us to draw specific early lessons on transferring a deskbound activity to VR.We introduce BlocklyVR, a Virtual Reality version of 2D-based Blockly for desktops, as an initial step in exploring non-desk-bound programming.To assess its effectiveness, we compare the performance with Blockly.Since we designed our interface to use physical space for interaction, we measured users' physical activity and related that to performance and activities.The following sections detail design considerations, our proposed system BlocklyVR, and evaluation.

BLOCKLYVR
BlocklyVR facilitates programming in Virtual Reality through immersive interaction with virtual blocks.The interaction is enabled via a VR headset connected to two controllers in a room-size physical space.In the following four subsections, we describe the design considerations for BlocklyVR, the programming environment, interaction concept, and implementation.

Design considerations
While the basic structure and appearance of BlocklyVR are similar to the desktop-based Blockly interface, we have introduced several design considerations necessary for block interaction in a VR space.
3.1.1Spatial working area.The first design consideration concerns physical space for walking and interaction in a 3D environment.For example, to drag and drop blocks, a user can walk near a block and move it to a new location.A spatial work area should allow users to position blocks nearby and at any height to iterate different solutions quickly in 3D space avoiding arm fatigue and discomfort [21,36].
3.1.2Direct and two-handed interaction.Using a pointer in 3D space for selection is common but can be frustrating [64] and time-consuming [67].Therefore, the second design consideration concerns walking to the blocks for direct manipulation.Directly grabbing the blocks, e.g., using controllers, mimics a tangible programming experience, which could support users' sense-making [22,48] and engagement [60,72].While block-based programming in 2D involves interaction with a mouse with one hand, 6DOF VR controllers and 3D space facilitate the use of both hands for the manipulation of blocks.For example, users can interact with blocks by holding them in one hand and manipulating them with the other, as typically done in everyday interaction [26].

Block design.
The third design consideration concerns visual cues indicating a possibility of connecting the blocks.Compared to 2D space, in 3D space, there is a need to design cues indicating which blocks can be connected, especially when viewed from different angles.As in Blockly, blocks have "connectors", i.e., zones where they can attach to other blocks.do not see a physical keyboard.Block-based programming requires less text input than textual programming but is still necessary to declare variables and functions or to set values.Therefore, a virtual keyboard is the fourth design consideration for the text input to take users' input from pointing at virtual keys.This has been shown to be more efficient than alternative text-input solutions for VR [66].

Programming environment
In BlocklyVR, users can create programs by assembling and modifying blocks using the same logic as in Blockly.The BlocklyVR environment consists of a workspace area, a menu of programming blocks, a task instruction screen with input and output, three tables that function as boundary cues, and two trash cans (Figure 3).The workspace occupies around 6 x 2m of physical space.To delete blocks, a user can walk up to the trash cans and put them inside.A menu for selecting blocks is placed on the left side of the environment and has the following categories: logic, loops, math, text, lists, variables, and functions.Additionally, we increased the size of the blocks compared to their 2D counterparts, e.g., a while-loop block is 2.5cm in Blockly and 17cm in BlocklyVR, to ease selection in mid-air with controllers and increase text readability on the blocks due to the VR-headset resolution.BlocklyVR features a set of programming tasks that users can complete.Each task has a test suite that checks if the assembled block code is correctly given different combinations of input values.A task screen with instructions is placed in the center where participants can assess their work progress.The task screen also updates and displays the current test suite's input, output, and expected output.If all tests have passed, the display changes, a sound is played, and the user can advance to the next task.A button underneath the table is used for proceeding to the next task.

Interaction Concept
From the interaction perspective, BlocklyVR facilitates three main interaction methods: (1) connecting, (2) disconnecting, and (3) duplicating blocks.To aid precision selection, the controllers are visually represented as a "ball and chopstick, " i.e., a short ray cast.

Connection/Disconnection.
To connect the blocks, a user must first bring them close to each other.This is done by selecting a block nearby by holding the trigger button on the controller and repositioning the block within range of another block.When two blocks' "connectors" (connection areas) are within range (5cm), a green line appears, indicating they can be connected (Figure 2 a).In the presence of a green line, a user can release the trigger button on the controller to connect the blocks.Disconnecting blocks requires the user to use both hands.For this, users hold a block structure (two or more connected blocks) with one hand and use the other hand to select a block they would like to disconnect with a trigger button and move it outside of the connecting range while holding a trigger button (Figure 2 b).We made the blocks slightly transparent so the connectors would be visible from all angles.

Duplication.
To duplicate a block, a user has to grab it with both hands and "drag out" a copy of it.When the drag starts, a line appears, and to complete the duplication, the line has to be stretched enough until it snaps (Figure 2 c).Audio and haptic feedback is used to indicate how far the line is from snapping.

Implementation
BlocklyVR consists of the VR application created in Unity and a Node.jsweb server2 .When blocks are added or modified in the VR environment, the resulting code is translated into the JavaScript version of Blockly and sent over HTTP to the server.The server executes the JavaScript code, runs a test suite for a given task, and returns the results of the tests.The server also hosts a web interface built in React for 2D Blockly.This interface includes a task instructions panel we used in the user study.

EVALUATION
To explore the impact of BlocklyVR on users' programming performance, we conducted a controlled lab experiment comparing it to the regular 2D Blockly on a desktop.To further understand the impact of BlocklyVR on participants' interactions and task performance, we also measured participants' physical activity and compared it with recorded video material.Lastly, interviews with BlocklyVR participants were conducted to provide qualitative feedback.The research question for this experiment is: "How does VR block-based programming influence users' programming performance, physical activity, and experience?"

Participants
We recruited 20 participants (15 male, 5 female) aged between 21 and 41 ( = 26.2, = 5.7) with no block-based programming experience and limited prior experience of virtual reality (VR).The participants were recruited through the advertising channels of our institution.Participants received 15e cinema voucher as compensation for their participation.

Study design
For programming performance, the study was designed to be betweensubject with one independent variable: programming environment.The first type of programming environment included Blockly3 as a baseline for existing programming practices on the 2D screen.
The second one is our proposed BlocklyVR programming environment as described in the previous section.The primary objective for comparing BlocklyVR to Blockly is two-fold: (1) Blockly is a state-of-the-art block-based programming environment that facilitates programming without writing a code and, thus, comparing it to its VR version will help us better understand if VR can improve users' performance and experience due to its immersive nature and, and (2) By comparing a desktop activity (in this case programming) to the same activity in VR, we aim to understand how to design future VR workspaces and how physical movement as an integral part of solving a task affects user performance and experience.We evaluated both programming environments in the between-subject study to decrease the influence of fatigue since participants had to finish eight programming tasks within 30 minutes and to avoid learning effects since we aimed to provide participants with the same set of tasks for comparability reasons.These tasks included summation with and without menu selection, debugging, matching numbers and functions, ordering numbers, calculating area, and creating a function (see Table 1 for textual and Figure 4 for a visual overview of the tasks).The tasks were always completed in the same order (from 1 to 8).We designed each task to increase in difficulty from the previous.The control group using Blockly consisted of 7 male and 3 female participants aged between 22 and 41 ( = 24.4, = 5.2), and the second group using BlocklyVR consisted of 8 male and 2 female participants aged between 21 and 38 ( = 28.1, = 5.7).

Apparatus
For the Blockly setup, we used a 16-inch Macbook Pro with a screen resolution of 2560 × 1600 and a mouse.For the BlocklyVR setup, we employed Oculus Quest 2 with both controllers and an accelerometer placed on the right hip to measure physical activity.

Measurements
We measured the following variables: • Task completion time (in sec): for each task, we measured the time it took participants to finish it.The timer started each time a "load next task" button was pressed and

Task Description 1: Multiplication
The function should return the value of 2 x 3.

2: Summation without the menu
The function should return a sum of two variables.

3: Summation with the menu
The function should return the sum of two variables, but in this case, users had to find the corresponding blocks in the menu.1: The overview of tasks that participants had to solve in the experiment for both programming environments.stopped when the task was successfully completed.During the experiment, all tasks were completed successfully.
• Physical activity duration (in %): for each task in Block-lyVR, we measured the percentage of time performing physical activities using acceleration along all three axes using an ActiGraph GT3-X accelerometer strapped to VR participants' right hip [57].Acceleration data is commonly labeled according to established cut-off points that correspond to sedentary, e.g., standing still, low physical movement, e.g., light walk or slow movements, and moderate physical activity, e.g., regular walk or movements with higher acceleration [57].We used these cut-off points to determine the participants' physical activity levels during our experiment.This method allowed us to measure the fraction of time participants remained still and performed low and medium physical activity.By low physical activity, we refer to slow movements in the space with low acceleration and moderate -movements with higher acceleration.Since participants sat at the desk for the condition with the Blockly, the hip movement is essentially zero, and we, therefore, did not add an accelerometer for comparison as it would be redundant [30].• Virtual Reality Sickness: participants filled in the questions from the Simulation Sickness Questionnaire (SSQ) before and after using BlocklyVR to assess their general state of motion sickness.To calculate the SSQ score [40], we used the formula from [6].Total SSQ scores of 20-30 reflects minimal to moderate motion sickness and greater than 40 suggest "a bad simulator" [9].
Additionally, we video-recorded user activities with BlocklyVR from outside and inside the VR headset.To further understand the impact of BlocklyVR on participants' interactions and task performance, we also measured participants' physical activity and compared it with recorded video material.Combined with the videos, the accelerometer data describe how participants moved and interacted during each task.Additionally, we conducted a thematic analysis on the video data [8] to identify distinct types of user activities.This allowed us to categorize the type of interactive user activities the participants performed second by second, e.g., interaction with the menu, and compare that data with the corresponding acceleration for that second.This allowed us to build a descriptive picture of how movement was incorporated in block-based programming activities in VR and whenever it could be beneficial.Lastly, in the end of the experiment, we collected qualitative feedback from the participants about difficulties they experienced while interacting in BlocklyVR, how VR influenced their block-based programming experience, and what they liked and disliked about BlocklyVR.

Procedure
After obtaining informed consent, we collected participants' demographic data.We then provided a brief overview of the programming environments and types of interaction.Participants familiarized themselves with a programming environment (Blockly or BlocklyVR, respectively) in a test task that required connecting two blocks so that a function "SayHi" returns "Hello World." Once the participants felt comfortable, we started experimental conditions.During the experiment, participants had to solve eight tasks, one after the other.BlocklyVR participants were asked to answer questions about the system's usability at the end of the experiment.Each experimental condition lasted approximately 30 minutes.

Data analysis
We used t-tests to compare task completion time between Blockly and BlocklyVR, given that the data was parametric.To compare differences in movements per each task, we used the one-way ANOVA as an omnibus test and t-tests for post-hoc analysis with a Bonferroni correction, given the parametric nature of the data.For the non-parametric data from the SSQ, we applied a Wilcoxon signedrank test to compare the scores before and after interaction with BlocklyVR.For the analysis of the video recordings, one of the co-authors did a second-by-second annotation of the video feed based on the activities that participants were doing while solving the tasks.This included the following steps: (1) Looking at start second and watching a bit to see what the person is doing, (2) When a participant changed an activity, minutes and seconds from start to finish for the activity were marked on the video, (3) Annotation of the activity, e.g., changing a perspective or turning a head around, if appropriate label did not exist yet, (4) Checking if some of annotations could be combined into the same category.These steps were repeated until finished.Lastly, for the analysis of qualitative feedback, two of the co-authors independently grouped the quotes from the participants into three groups: (1) difficulties they experienced while interacting in BlocklyVR, (2) changes in interaction while programming in Virtual Reality, and (3) aspects they liked and disliked about BlocklyVR, based on the questions we asked them after the study.

RESULTS
We discovered that user performance in task completion time in BlocklyVR was comparable to Blockly.Moreover, our results indicate low and moderate physical activity for participants in Block-lyVR during 28% of task time on average.Lastly, we identified four distinct types of interaction in BlocklyVR based on the video analysis.We outline these results in detail in the following subsections.

Task completion time
We discovered that participants spent a comparable amount of timesolving all tasks in Blockly or BlocklyVR ( > 0.05), except for Task 3.For Task 3, which required participants to sum two numbers while bringing blocks from the menu, we found that participants required more time in BlocklyVR ( = 86,  = 27) than with Blockly ( = 50,  = 19), as shown by a statistically significant t-test ( (16.4) = 3.34,  < 0.01).The summary of results is shown in Figure 5.

Physical activity duration
Our results indicate that using BlocklyVR, participants' low and medium physical activity was higher for Task 3 and for Task 5, in which participants had to match numbers and blocks, compared to the other tasks.We considered sedentary activity (or no movement) as the complement to the low and moderate physical activity, resulting in a total time consisting of no movement + low physical activity + moderate physical activity.

Sedentary activity.
We discovered that participants remained still the least amount of time in Task 3 (task completion time was also lower in BlocklyVR for Task 3), which required finding and bringing blocks from the menu before connecting them.Task 5, which required matching numbers with functions correspondingly, also resulted in less sedentary time compared to the other tasks.The One-way ANOVA has shown statistical significance among the tasks ( (7, 72) = 7.4,  < 0.001).The pairwise comparisons have indicated statistically significant differences for Task 3 compared to Task 1 ( < 0.01), Task 2 ( < 0.01), Task 4 ( < 0.01), and Task 6 ( < 0.01).Additionally, we found that participants remained still more for Task 1 than Task 5 ( < 0.05) and Task 2 ( < 0.01).Lastly, participants remained still more in Task 2 than in Task 8 ( < 0.05).

Moderate physical activity.
In line with the above results, we found that participants' moderate physical activity was higher for Tasks 3 and 5.The One-way ANOVA has shown statistical significance among the tasks ( (7, 72) = 4.7,  < 0.001).The pairwise comparisons have indicated statistically significant differences for Task 3 compared to Task 1 ( < 0.001), Task 2 ( < 0.001), and Task 6 ( < 0.05).Lastly, participants' moderate physical activity was higher in Task 5 than in Task 1 ( < 0.05).

Virtual Reality Sickness
We found that virtual reality sickness was minimal after using BlocklyVR and the difference in the overall SSQ score and the sub-score of nausea, disorientation, and oculomotor was not statistically significantly different and after using BlocklyVR

Video observations
Based on the video observations, we identified four categories of interaction in BlocklyVR.

5.4.1
Walking from A to B. We observed participants' physical movement from points A to B related to the spatial distribution of the elements in the virtual environment.By positioning the menu and trashcans away from the task screen, participants were "forced" to walk to reach these elements.Moreover, participants had an opportunity to take multiple objects using both hands unlike interaction with a mouse in Blockly where only one object or one-handed interaction is possible.These activities accounted for 11.4% (SD:2.7%) on average of the total experiment time but 24.9% (SD:12.7%) of the average physical activity amounts (low and moderate).Virtual reality facilitated an overview space, in which participants could easily see connections between the blocks and could look around to find necessary blocks.It accounted for 8.2% (SD: 3.5%) of the total time and 15% (SD: 4.9%) of the total physical activity.

2D and 3D interaction.
This category accounts for 2D, e.g., pointing towards a flat surface, naming a block variable, selecting an item from a drop-down, and 3D interaction with blocks, such as moving, connecting, disconnecting, and duplicating them.This is because they account for different types of interaction within the space and can lead to different behaviors and types of movements.2D interaction accounted for 12% (SD: 5.2%) of time and 6.15% (SD: 6.10%) of total physical activity.3D interactions accounted for 31% (SD: 8%) of total time, and 22% (SD: 7%) of total physical activity.

Static activity.
This category accounts for the situations in which participants did not interact with anything, e.g., they did not walk to other locations in the environment but spent time reading or thinking.It also includes movements unrelated to walking, e.g., they rotate their hips, looking around, or take small steps to readjust their body position.These activities accounted for 38.8% (SD:11.1%) of time and 20.8% (SD:7.3%) of physical activity.

Qualitative feedback
Participants stated that BlocklyVR facilitated better visibility and overview of the programming environment and liked the physical aspects.They reflected and contrasted BlocklyVR with their previous experiences using desktop interaction for textual programming.As some participant mentioned: "I felt it was easier to make sense out of chaos.That is, if I have a lot of different ideas that I want to try, then it is easier to pick out the ones that work in VR since I can walk around them and get an overview."[P7], "It is pretty easy to see connections in BlocklyVR, and I think it is because of the depth of the picture and how you physically move the blocks around." Participants also endorsed the clear shapes and vibrant colors of the BlocklyVR blocks that improved visibility.However, it was harder to read in BlocklyVR due to distances and occlusion from other blocks.
Participants enjoyed the ease of two-handed interaction in Block-lyVR for connecting/disconnecting blocks but commented on the slow text input.For instance, P4 noted: "BlocklyVR was pretty easy once I grasped the controls.It was pretty efficient to tear apart components and rearrange them.". "Changing numbers and text takes a bit of time sometimes." [P9].Another aspect raised by the participants was the thinking process in BlocklyVR.As P10 noted: "I believe that "thinking, " i.e., coming up with the solution in your brain takes a lot of time in VR than in a normal coding environment, when I need to think about how to create an algorithm, come up with a problem solution, detect a pattern, etc.It is easier [on desktop] because I am comfortable sitting down and can switch to a pen and paper or quickly search for something in a stack overflow."Since participants could walk and zoom in and out, they saw BlocklyVR as better-suited for progressive evaluation than their previous experience with 2D programming environments.As one participant commented: "Literally stepping back allowed me to see the code from afar like zooming out.Using the body for that was nice" [P10].
Four participants mentioned problems with the spatial distribution of objects in the 3D space.For example, P3 stated that: "Losing things behind me was common, but moving to find them weren't very difficult".Another problem in BlocklyVR was the size of the blocks, "Since much of the blocks are "meaningless" volume it can be difficult to interpret the code one has written because it takes up so much more physical space than regular code."[P2].One participant [P5] said walking to the menu to fetch new blocks felt cumbersome.

DISCUSSION AND FUTURE WORK
One of the questions we asked ourselves in this work: Does blockbased programming become slower with the work artifacts (variables, statements, expressions) spread out in a physical, virtual, or mixed space?The findings from our study indicate that completion time was comparable between Blockly and BlocklyVR for most programming tasks.This challenges the conventional wisdom that increasing distance between objects decreases efficiency [42,45,56,69].On desktop, users can quickly move the cursor with subtle hand movements.If user interactions are more efficient on the desktop, the more interactions a user needs to do for a task, the slower the completion time will be for BlocklyVR in comparison.The video observations showed that participants spent more than 60% of the time in BlocklyVR doing user interactions (with blocks and other elements, changing views, and walking from one point in space to another).Since more than half of the time was spent interacting, if the desktop interactions were more efficient than the VR interaction, task completion times would be faster in Blockly.This suggests that the interactive techniques we used in Block-lyVR are comparable in terms of usage efficiency to the mouse and keyboard for block-based programming without introducing VR sickness.It could also suggest that some VR affordances supported BlocklyVR participants to complete the tasks efficiently.We discuss these results in detail in the following subsections.

Designing Virtual Reality Workspaces
Another question we asked was about the types of physical movements that block-based programmers would perform in such "deskless" programming environments.Our findings indicate that Virtual Reality is suitable for facilitating physical activity, e.g., active walking, as in our experiment, for a stationary task of programming with Blockly by providing an immersive 3D space.This raises a question of whether more interactivity with the whole body makes a task more engaging.By looking at the results from our experiment, the only task completed faster in Blockly than in BlocklyVR was Task 3 (Figure 5).This task also required the most physical activity, 45% on average of task time.There could therefore exist a threshold at which physical activity starts to impact task completion time.However, the task was not mentally demanding and mainly required fetching new blocks instead of problem-solving.In contrast, Task 5 required more complex problem-solving and generated physical activity at around 35% of task completion time on average.It could be that somewhere between 35-45% lies the tipping point where additional walking impedes performance.Another plausible explanation is that the intention for movement matters.In Task 3, participants only walked from the task screen to the menu, while in Task 5, participants walked to zoom out, to interact with objects, and while thinking.This could have preserved their focus better since their eyes remained on the problem [44].
The Virtual Reality sickness was minimal for solving all tasks, which makes Virtual Reality space a promising environment for future workspaces that can facilitate both solving a task but also an increased physical activity with only a VR headset and without a need to add bulky treadmill or a cycling trainer.The qualitative feedback illustrates that these physical user activities were beneficial for VR tasks.Being able to "zoom out" gave a sense of progressive evaluation, i.e., making changes and then taking a few steps back to view the "whole".This can also be achieved by zooming out with a mouse in a desktop setting.As the qualitative feedback shows, there is something special about moving your body for this action.This suggests that this ability should be considered in other VR scenarios if enough physical space is available.As Cubely [72] also suggests, using both hands in interaction was another appreciated aspect.Humans typically use their dominant hand for operations and the other hand for stability [26].This was efficiently incorporated in BlocklyVR to disconnect blocks and something that could have contributed to comparable completion time.Lastly, both the physical aspects, i.e., moving around and interacting in a 3D space, and the visual aspect, i.e., the large screen space, were well received and, as one participant commented, made it easier to "make sense out of chaos".Future studies should explore these advantages in isolation or a different context than block-based programming.This will help us to better understand how we can potentially design future VR workspaces by possibly making them more interactive, as shown by our results.

More Movement but at What Cost?
Participants in VR had difficulty reading information on the blocks and entering text.We set the blocks' size to facilitate convenient interaction; however, smaller block sizes may function equally well.But the problem would then be the text size on the blocks, as some comments already suggested that it was hard to read from a distance.This is a well-known problem of XR applications in general [41], but it becomes especially prevalent when incorporating a spatial work area.Reading was also a problem when blocks occluded the line of sight.Participants needed to be more accustomed to looking for information in the periphery, similar to other VR block-based interfaces [64].Our participants did not express discomfort as in [64], likely because turning around while standing is easier than sitting down.One participant commented, however, that sitting supported thinking, and the lack of sketching with pen and paper made problem-solving harder in VR.For more complex tasks, the necessity of sketching tools is more urgent.Experimenting with virtual pens could be one way to address this issue [17,20].Virtual pens may also be a more efficient text-input technique than the virtual keyboard.Most negative feedback was concerned with the text-input functionality of BlocklyVR.Typing on a regular keyboard is much faster than various interaction techniques for mid-air textinput [1].Even if VR can bring several benefits, such as walking for visibility and more physical two-handed interaction, efficient mid-air text input is crucial for bringing programming into VR, which has to be further explored in future work.

Virtual Reality for Physical Activity
Another aspect of incorporating physical activity in Virtual Reality is the potential for supporting non-sedentary interaction [32].In other words, how can a more healthy lifestyle be integrated within typically sedentary work settings, e.g., offices.HCI researchers have conceptualized two main approaches to support physical activity: (1) in conjunction and (2) during work activities.The first approach focuses on providing tools and support in conjunction with office life, i.e., not at the same time as the work activity.Examples include prompts that nudge users to take active breaks [13], gamified health tracking for colleagues [13], and providing space for sports and exercise close to the office [76].The second approach focuses on supporting physical activity during the work activities.Equipment such as treadmills and indoor bikes [13,28], support tools for walking meetings [14,27], and tangible email cards [38] are examples of such approaches.Our approach falls into the second category, integrating physical activity during a hypothetical work activity.While the use of block-based programming is scarce among professional programmers, the insights from this study could serve as a starting point for exploring physical interaction in real contexts.In the context of block-based programming, we have shown that physical activity can be used for interaction and not merely as an add-on activity independent of the task, e.g., treadmills and indoor bikes.This is especially important since movement unrelated to the users' cognitive focus can be mentally demanding [56] or distracting [44].As for the physical activity types, most of the physical activity (75%) came from productive activities (e.g., getting an overview, 2D and 3D interactions while thinking) instead of simply walking from A to B. This explains why movement in BlocklyVR did not impact performance negatively.In future studies, exploring interactive techniques and technologies to integrate physical activity into productive activities is relevant.
We also asked a more general question on what we can learn from transferring a desk-bound activity to VR.What could the hypothetical health impact be if non-sedentary interfaces were used instead of sedentary ones?There are two forms of health hazards in our modern sedentary lifestyle.One is sitting or standing too long during the day (sedentary behavior), and the other is lack of exercise [18,54].In our study, participants were physically active around 28% of the time (figure 6).Most of this physical activity was classified as light, i.e., equivalent to a slow walk.In terms of reducing sedentary behavior, this light activity is sufficient for breaking up prolonged sitting or standing periods.Sedentary behavior is especially damaging after more than 7-9 hours per day [18], and minimizing daily sitting time can make a real difference.For exercise, however, moderate-or vigorous physical activity is needed.We did measure some moderate physical activity (brisk walking) in the study.Still, we believe there are probably more efficient ways of using VR to exercise, for example, through exergames [3,76] and physical activities [33].Intensive physical activity is likely distracting and might yield unintended side effects, such as users moving less the rest of the day because they get tired using the VR interface.When prototypes for non-sedentary interaction are mature enough to be tested in real-world scenarios, health implications should be studied in long-term case studies to control these side effects.

LIMITATIONS
Participants spent around 30 minutes in BlocklyVR, and a longer duration could impact fatigue.Finding when users get tired and where their focus of attention lies using eye-tracking can be tested in further studies.The study consisted of a selected set of programming tasks.This allowed us to compare completion time with Blockly.Future studies could try different tasks or try new application scenarios.For example, exploratory scenarios could be tested, where participants can program freely, e.g., programming a VR scene.We conducted our evaluation with adults with no prior experience in VR and block-based programming, and the future work should explore it for other audiences, e.g., children.Lastly, BlocklyVR requires a physical space which might only sometimes be available compared to Blockly, which can be used in a limited physical space.Thus, future work might later consider ways of comparing mouse movements in Blockly to the physical movements in BlocklyVR.

CONCLUSION
In this paper, we explored programming in a virtual space by transferring a system for block-based programming in Virtual Reality -BlocklyVR.To determine whether the physical movement impacts the task performance, we conducted a controlled experiment comparing it to the existing 2D version of Blockly.Our results indicate that, despite a movement-centered interface, the task completion time was comparable between Blockly and BlocklyVR, except for one task characterized by low complexity and unrelated movement.We also contribute to "desk-to-space task transfer" by identifying four distinct types of interaction in BlocklyVR.Our findings suggest implications for efficiently incorporating physical activity in productive VR interfaces, which sets a future research direction for transferring complex desk-bound intellectual tasks to Virtual Reality.

Figure 3 :
Figure3: The BlocklyVR consists of: (1) a work area (the walkable workspace area is approximately 6x2m) with three tables acting as boundary cues for the area, 2) a menu with different block categories (logic, loops, math, text, lists, variables and functions), 3) a task screen with task instructions and test suite input and output for users to self-assess their work, 4) two trash cans for discarding blocks.

Figure 4 :
Figure 4: Visual overview of all tasks in BlocklyVR.The tasks included summation with and without menu selection, debugging, matching numbers and functions, ordering numbers, calculating area, and creating functions.

Figure 5 :
Figure 5: Task completion time per each task using Blockly and BlocklyVR.

5. 4 . 2
Changing perspective.Participants spent time stepping back and forth to change their viewing perspective as a zoom-in and out function to get a better overview of the task and interaction space.
4: Debug The function should return true if the given age is ≥ 62. 5: Match number and function Connect numbers with functions that return the number.For example, a function that returns six should be matched with the number 6. 6: Order numbers Move the number blocks in ascending order.7: Calculate area The function should return the area of a rectangle, and if any of the sides are less than zero, it should return 0. 8: Create function The function should call a new function you must create.The new function should be called 'foo' with the inputs 'a' and 'b' and return return true if a > b and be false otherwise.Table