Giter Site home page Giter Site logo

danielogen / string-experiment Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 196 KB

This repository contain code and dataset for the string interpolation experiment

Home Page: https://string-experiment.vercel.app

License: MIT License

Python 8.98% CSS 0.10% HTML 90.31% Dockerfile 0.61%
computer-science-education human-computer-interaction n-of-1-trials string-concatenation string-interpolation

string-experiment's Introduction

String Interpolation Experiment - Replication Packet

Overview

Literal string interpolation is a widely-used programming language construct that enables developers to embed variables, expressions, and/or functions within a string. It is consider to be more concise compared to traditional concatenation approach. The syntax of string interpolation can vary significantly between different programming languages. However, its impact on program readability and comprehension remains unexplored. Therefore, the objective of this study is to investigate the effect of literal string interpolation on program readability and comprehension.

Directory Structure

The replication packet consist of the experiment software, data analysis scripts and figures.

  • analysis: contains helper files used in the main files. There are 9 helper files.
    • figures: all figures generated from data analysis using quorum
    • quorum_scripts: quorum project contain all the script and data for reproducing the statistically analysis and figures.
  • data: data for all the phases of the experiment. The latest is responses_phase_3.csv and it is what we used in the paper.

The rest of the folders and files are associated with the experiment software.

Tool Setup

To replicate the experiment, you can simply follow the steps below to setup the data gathering tool.

Installation and Usage

  1. Running locally

    • Setup the by cloning the repository using git clone or download the repository.
    • It is a good practice to configure python virtual environment. Use the commands below to setup python virtual environment on Linux/MacOS or Windows OS. NB: The tool is designed using Python 3.10 and tested on Python 3.8 and Python 3.9.
    # For Linux/MacOS
    
    python3 -m venv venv
    source venv/bin/activate
    
    • For Window OS user, the easiest approach is to install virtualenv by running pip install virtualenv. The next step is pretty much similar to above;
    # For Window OS
    
    python3 -m virtualenv venv
    venv\Scripts\activate
    
    • Install required dependencies using pip3 install -r requirements.txt
    • Start the experiment by running python3 app.py. Ensure that port 5000 is open on your firewell. To interact with the experiment, go to your browser and type localhost:5000 or 127.0.0.1:5000.
  2. Running locally with "Docker for Desktop" - Not Yet Fully Tested!!

    • Download and install Docker fo Desktop using the link. Once you are all set, run the commands below;
    git clone <project>
    cd /<project>
    docker compose up -d
    
  • That's all ๐Ÿ˜Ž!! the tool will be running on port 5000. To interact with the experiment, go to your browser and type localhost:5000. You should be able to see the consent page of the experiment.

NB: The ouput of the experiment will be stored in the data folder with the file name responses.csv

Issues

Incase you encounter any challenge trying to reproduce this experiment, please feel free to report to the corresponding author of the paper.

string-experiment's People

Contributors

danielogen avatar

Watchers

 avatar  avatar

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.