Excellent question. This is a very creative approach to testing software engineers.
First, it's crucial to understand what The Experiment Factory is. It's a platform designed for creating and deploying behavioral and psychological experiments, not a standard coding challenge website like LeetCode or HackerRank.
This is both a weakness and a potential strength.
- Weakness: None of the experiments, as-is, will test a software engineer's skills. Having them participate in the Stroop Test or the Tower of Hanoi tells you nothing about their coding ability.
- Strength: The underlying framework is an open-source project built with standard web technologies (JavaScript, HTML, CSS, JSON) and can be run with Docker. This provides a fantastic, real-world sandbox to test practical skills beyond simple algorithms.
Therefore, you should not ask candidates to take the tests. Instead, you should give them tasks related to modifying, extending, or debugging the experiment's code.
Here are specific tests you can create using the experiments on that site, categorized by the skills you want to assess.
Test 1: Code Comprehension and Frontend Modification (Junior to Mid-Level)
This test assesses a candidate's ability to dive into an unfamiliar but well-structured codebase, understand it, and make specific changes.
- The Task: "We need to modify an existing experiment. Take the Stroop Task (
stroop-task). Your goal is to implement two changes:
- Add a progress bar at the top of the screen that shows the user how many trials they have completed out of the total (e.g., '5/50').
- After the experiment is complete, the final screen should display not only the summary data but also the average reaction time for 'congruent' trials and 'incongruent' trials separately."
- Skills Assessed:
- Code Comprehension: Can they read someone else's JavaScript and understand the logic?
- JavaScript (ES6): Manipulating data (arrays, objects), calculating averages.
- DOM Manipulation: Adding new elements (the progress bar) and updating them dynamically.
- HTML/CSS: Styling the new elements to look clean.
- Problem-Solving: Figuring out where in the code to intercept trial data and when to update the UI.
- Why it's a good test: It's a realistic task. Most developers spend their time modifying existing code, not writing everything from scratch. It's small, self-contained, and has a clear success metric.
Test 2: Debugging and Logical Reasoning (All Levels)
This test assesses a core engineering skill: finding and fixing bugs in an application.
- The Task: "I've sent you a 'broken' version of the Tower of Hanoi (
tower-of-hanoi). The experiment runs, but it has two bugs:
- The move counter is not incrementing correctly. It always shows '0' or '1'. Find the logic error and fix it.
- There is a CSS bug where the 'You Win!' confirmation message appears behind the game board, making it invisible. Fix the styling so it appears correctly in front of everything else."
- Skills Assessed:
- Debugging: Use of browser developer tools (Console, Inspector, Debugger).
- Logical Reasoning: Tracing code execution to find the flaw in the counter logic.
- CSS: Understanding of
z-index, positioning, and the stacking context.
- Attention to Detail: Noticing both the functional and visual bugs.
- Why it's a good test: Debugging is arguably the most critical day-to-day skill for a developer. This test reveals their process for troubleshooting and how systematic they are.
Test 3: Project Scaffolding and Framework Usage (Mid-Level)
This test assesses a candidate's ability to build something new within the constraints of an existing framework.
- The Task: "Using The Experiment Factory framework, create a brand new, simple experiment from scratch. The experiment is a Go/No-Go Task:
- For 50 trials, a circle will appear in the center of the screen.
- If the circle is green, the user should press the spacebar as quickly as possible ('Go').
- If the circle is red, the user should do nothing ('No-Go').
- You must record the reaction time for correct 'Go' responses and whether an error was made on 'No-Go' trials (i.e., they pressed the spacebar)."
- Skills Assessed:
- Reading Documentation: Can they learn the basics of a new framework from its docs? (In this case, how to structure an
config.json and the experiment's JS file).
- Project Scaffolding: Creating the necessary file structure for a new experiment.
- JavaScript Logic: Implementing the trial sequence, handling user input (
keydown events), and using setTimeout for the "No-Go" condition.
- Data Structures: Structuring the trial data to be saved correctly as JSON.
- Why it's a good test: It's a mini take-home project that shows if a candidate can be self-sufficient and build a working feature based on a set of requirements and constraints.
Test 4: DevOps and Containerization (Mid to Senior-Level / DevOps focus)
This test moves beyond code and into deployment and infrastructure, which is vital for modern software engineering.
- The Task: "Take any standard experiment, like the Simon Task (
simon-task). Your goal is to prepare it for production deployment.
- Create a
Dockerfile that containerizes the experiment server.
- The container should serve the experiment on port 80.
- Write a brief
README.md file with clear instructions on how to build the Docker image and run the container."
- Skills Assessed:
- Docker: Writing a clean, efficient Dockerfile.
- Containerization Concepts: Understanding of images, containers, ports, and layers.
- Basic Networking: Port mapping.
- Technical Writing: Ability to clearly document their work for other developers.
- Why it's a good test: It assesses skills that are critical for modern, cloud-native development but are often missed in algorithm-focused interviews.
What You WON'T Be Testing with This Method
It's important to know the limitations of this approach. You will not be effectively testing:
- Complex algorithms or data structures.
- Backend development skills (e.g., Node.js, Python, Go, database interactions).
- Large-scale system design and architecture.
- Specific framework knowledge outside of vanilla JS (e.g., React, Angular, Vue).
Recommended Workflow
- Preparation: Clone The Experiment Factory repo. For the debugging test, manually introduce bugs and save that version.
- The Test: Give the candidate a link to the GitHub repository and the clear, written instructions for one of the tasks above. Give them a time limit (e.g., 60-90 minutes).
- Submission: Ask them to either submit a pull request against a fork you provide or simply zip their modified code and send it back.
- The Follow-up: The most important part. Review their code with them.
- "Walk me through your solution."
- "What was your thought process for tackling this?"
- "What challenges did you run into?"
- "If you had more time, what would you improve?"
This approach gives you a fantastic signal on practical, real-world skills in a novel context that prevents candidates from simply rehearsing standard interview problems.