Giter VIP home page Giter VIP logo

tranx-study's Introduction

For final user study data and analysis programs/scripts, please checkout analysis.

TranX Developer Study

Instructions

The goal of the user study is to understand how a code generation and retrieval plugin in IDE could affect the development.

We provision Linux desktop with PyCharm IDE, required Python environment for all the tasks and a Firefox browser installed.

You will be assigned 8 tasks automatically based on your pre-study survey and completing all tasks would take about 4-5 hours so please plan ahead!

Note that the plugin will be available for you to use only on part of your assigned tasks for controlled study, so please don't panic if you do not have the plugin for some tasks!

The plugin is not perfect, so try to use the plugin when you have a question, but feel free to use the web browser inside the Linux VM if the plugin is not helpful.

To setup and perform the user study, please follow the below steps to access a VM pre-provisioned with required environments and use PyCharm IDE.

We recommend the following instructions to access our remote desktop environment. Note that our remote desktop servers are located at Carnegie Mellon University (Pittsburgh, PA, USA). If you are located too far away from the US (e.g. Asia, Africa) that the Internet connection lags and makes the remote environment unusable for development tasks, please try setting up the user study environment on your local machine following this section (FAQ No.2). Note that this would require a respectable amount of system resources.

1. Access Remote Environment (recommended & easy)

  • Start Remote Desktop Client program (RDP client). For Windows users, type "rdp" in start menu and select the remote desktop client. For Mac users, download Microsoft Remote Desktop from App Store (https://apps.apple.com/us/app/microsoft-remote-desktop/id1295203466?mt=12). For Linux users, download Remmina (https://remmina.org/).
  • Connect to our remote server, using the server address, username and password provided in the email.
  • Right click the "Start" shortcut on the desktop, and select "Run with PowerShell".
  • Wait until the script automatically download the VM image and start it up through VirtualBox. You should now be able to see a Linux desktop environment inside a VirtualBox window. We advise you to maximize/full-screen the VirtualBox window (VirtualBox - View - Fullscreen Mode) for your best experience. From now on, please use the Linux VM environment for everything, including web browsing (Firefox).

2. Warmup & Familiarize with VM Environment

Starting from this stage, as you start to complete your task, you should maximize or full-screen the VM. All activities including coding in the IDE, web search, etc., should be done within the VM.

  • In a terminal in the VM:
    cd /vagrant
    ./warmup.sh
    
    This will start the IDE and enable web browsing to test it out.
  • Check out the README inside, and familiarize yourself with the environment by following the instructions therein! For more help on PyCharm IDE, please visit JetBrain's help website! Once you are familiar about the IDE, plugin and VM environment, you can close PyCharm and start working on the real tasks!
  • Python 3.6 is used throughout the study, and can be called from terminal by python3.

3. Starting and Completing Task inside VM

  • In a terminal in the VM:
    cd /vagrant
    ./start-task.sh your_user_id(provided in the email, the same as the remote desktop login)
    
    This will retrieve and set the configuration of one of your assigned task, and automatically start the IDE. For some of your assignments, the plugin will be disabled for a controlled study.
  • To start coding the task, please first read the instructions in the README file inside the task directory, and then write your program in the main.py file.
  • You could tell if the plugin is enabled for the current assignment by trying to use the plugin, and if it is not enabled, it means you must not use it for the assignment.
  • With the cursor in the desired place for generation in the editor, you could right click and "Ask a Question" (Mac: Control+Options+G, Windows/Linux: Ctrl+Alt+G) to ask a question. With the cursor inside the generated code block after your edits, right click and "Upload Edits" (Mac: Options+G, Windows/Linux: Alt+G) to upload edits. For more details about the usage of the plugin, please check out this guide first. Note: please do not modify any settings for the plugin!
  • To perform web search on those questions related to the task but not appropriate for the purpose of the plugin (e.g. you may want to know if UTC is equivalent to GMT) as it is not directly related to coding itself, you should use the web browser (Firefox) inside the Linux VM, please do not use browsers on the Windows desktop or your own local computer. It can be opened from the bottom dock inside the VM. Note that your web browsing activities will be logged inside the VM for user study purposes, so please DO NOT access any sensitive information in the browser.
  • Although we encourage you to complete one task in one sitting, if you need to take a break during the task, please run ./pause.sh and ./resume.sh under /vagrant/ to pause and resume the task respectively. Note that the behaviors will be recorded.
  • If you would like to use libraries that are not preinstalled, please install using pip3 install package_name using the terminal inside the VM.

4. Submitting Your Task

After you have finished with coding and debugging, please submit your work. To do so, please do the following steps inside the VM: In a terminal in the VM:

cd /vagrant
./submit.sh

The script will automatically pack your work and upload to our server for the user study evaluations. If everything goes smoothly, you should see a message Submission success! All done!, followed by a post-task survey for our evaluation. In case you see any errors, probably you have already submitted, or something else is wrong, please contact us.

Once you have submitted your current assigned task, you should go back to step 3 to start a new task assigned to you until no more task could be assigned. You are welcome to take breaks between tasks (after submission and before starting another assigned task). If it says there's no task for you, then you are all set! Congratulations! After completing all tasks, you will be prompted in the terminal to take a post-study survey to share your thoughts for our evaluation.

5. Useful Scripts

  • To check your assigned tasks and their configurations, your current task status, etc., run in a terminal in the VM:
    cd /vagrant
    ./status.sh your_user_id
    

FAQs

I cannot access Internet inside the VM browser.

If you haven't executed warmup.sh or start-task.sh then it is expected. We route network access through a proxy. Please first start doing a task and then you will be able to access Internet.

I cannot use the remote environment because it is too laggy.

You can use local installation to start up a VM on your own machine, but make sure your machine has enough resources. A machine with more than 4 CPU cores and more than 16GB memory is recommended.

  • Install 6.1.10 version of VirtualBox, available for all platforms. (For MacOS users, in case you encounter error during installation, please check out this article.)
  • Install the latest version of Vagrant, an automatic VM provisioning tool.
  • Download the user study package and extract the downloaded zip file.
  • Open terminal/command line and cd to the extracted folder tranx-study-master.
  • Clean up any previous versions of our VMs with vagrant destroy.
  • Start the VM with vagrant up.
  • Wait until Vagrant automatically download the VM and start it up through VirtualBox. You should now be able to see a Linux desktop environment inside a VirtualBox window. We advise you to maximize/full-screen the VirtualBox window (VirtualBox - View - Fullscreen Mode) for your best experience. From now on, please use the Linux VM environment for everything, including web browsing (Firefox).
  • From this point, please continue to follow from step 2 in the instructions.

After you have completed all the tasks assigned and the whole user study, it is safe to cleanup everything. On your host machine:

  • vagrant destroy to destroy the VM.
  • Delete the repo folder.
  • Delete the local VM image caches downloaded previously by deleting the folder $HOME/.vagrant.d.
  • Uninstall Vagrant and VirtualBox software.

Task Categories

All the tasks are in their corresponding directory under this repo, e.g task1-2/, and read the README file inside for instructions. Overall, there are 7 different categories as in task1-n to task7-n and you are assigned 4 categories of them based on your expertise in the pre-study survey:

  1. Basic Python
  2. File
  3. OS
  4. Web Scraping (e.g. beautifulsoup)
  5. Web Server & Client (e.g. requests, flask, django)
  6. Data Analysis & Machine Learning (e.g. pandas, sklearn)
  7. Data Visualization (e.g. matplotlib)

Data Collected

  • Your interaction with the plugin in PyCharm IDE, including queries and edits.
  • Your IDE edit activities.
  • Your web search/browsing activities inside the VM's Firefox.
  • Your keystrokes.
  • Your completed task.

tranx-study's People

Contributors

frankxu2004 avatar neubig avatar

Stargazers

Zeyu Xiong avatar Rudrajit Choudhuri avatar Naser Al Madi avatar Charles Sutton avatar Alex avatar

Watchers

 avatar James Cloos avatar  avatar  avatar Reshinth Adithyan avatar

Forkers

harel-coffee

tranx-study's Issues

Environment can get very laggy

I'm not sure why or how to reproduce, but when doing task4-2, the virtualenv got very slow to the point it took several seconds to get the mouse cursor or click on things. The CPU was in full usage on the host machine.

Now that I'm writing this I realize I should have run "top" or something, but I was wondering if you'd ever experienced this. If not, then maybe it's something strange on my end. But it did make programming quite difficult, so it'd be nice to make sure it doesn't happen in the main user study.

Remove "recommended libraries"

I see that the tasks now recommend specific libraries for use in each task. I actually feel like it'd probably be better to not do this. Figuring out which libraries to use is also part of the task.

task4-1 issues

I had two issues with task4-1:

  1. I could not open the web site in chromed

Screen Shot 2020-05-04 at 10 05 50 AM

  1. The web page is relatively complicated, including CSS etc. Because of this you need to not only know Python, but also know CSS relatively well to figure out which text is even bold. This seems too complicated, so maybe we could create a simpler web page and host it on our own site that is just pure HTML.

Some tasks success conditions too loose

It would be nice if there was a way to confirm the following success conditions have been met through command line commands, like is done for the previous tasks:

trim the heading and trailing whitespaces and blank lines for all text files under data, normalize newlines to \n, and convert the encoding to ascii

README should mention that plugin will be usable for only some tasks

Currently the README doesn't seem to mention that the plugin will be available for only some tasks.

Additionally, we should consider whether we give directions about using the plugin (something like "try to use the plugin when you have a question, but feel free to use the web browser if the plugin is not helpful")

Need more guidance about how to use the plugin, perform the task

Currently there is no guidance in the README about what the plugin is on a high level, what the various interface elements mean, etc. Maybe this could be added directly to the tranX-plugin repository (https://github.com/neulab/tranX-plugin) because this will also be useful for future users, even if they're not participating in the user study.

Also, independent of this: there's a question about what the user should do if they need to search the web. For example on the practice task, I needed to know if UTC was equivalent to GMT, which is not a question I can ask the plugin obviously. I think we should add some instructions:

  1. At the beginning of the task they should full-screen the VM.
  2. All web search, etc., should be done within the VM.

Issue with cloning repository

Right now, "git clone" of study materials doesn't work trivially on the virtual machine because the repo is private.

$ git clone https://github.com/frankxu2004/tranx-study.git
Cloning into 'tranx-study'...
Username for 'https://github.com':

I use 2-factor authentication which means I need to use my private key, which I don't want to copy to the virtual machine for privacy reasons, and I also don't want to enter my github password because key logging is on.

A couple solutions may be to make the repo public, post a zipped version of the repo somewhere and download it with wget, or add the repo to the virtual machine image so it doesn't need to be downloaded.

Virtual machine clock is in GMT time zone

Regardless of the host time zone, the virtual machine clock displays the GMT time zone. This is just a little bit annoying, but if it's easy to fix it might be nice to do so.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.