Build a Reproducible Python Task List with AI and Evidence
Job to be done: Build a reproducible coding project with AI assistance, demonstrating falsifiable claims and evidence.
🇳🇬 Ways to use this in Nigeria
Ideas to get you started, adapt to your situation.
- Student
Learn to build a simple Python to-do list application, understand how to test its features, and debug common issues for your university programming assignments or personal projects.
- 9-5 employee
As a junior developer, learn to build and test a small internal Python script for automating reports or managing project tasks, ensuring its reliability and maintainability by documenting its behavior with evidence.
What you’ll get
You will create a simple Python application called Tiny Tasks that manages a to-do list. You will also learn how to deliberately break it and create evidence that shows how it works and why it fails. This approach helps ensure that AI-generated code is reliable and understandable by others.
Tools you need
- Python (free): A popular programming language used to build applications. You need version 3.10 or newer, which includes built-in support for SQLite.
- SQLite (free): A lightweight database that stores data in a single file. It’s included with Python, so no separate installation is needed.
- Git (free): A system for tracking changes in code. You’ll use it to download the project files.
Steps
-
Download the project files: Open your terminal or command prompt and clone the project repository from GitHub. This downloads all the necessary code and evidence files.
git clone https://github.com/copyleftdev/evidence-driven-development.gitYou should see a new folder named
evidence-driven-developmentappear on your computer. -
Navigate to the project directory: In your terminal, change into the newly created project folder.
cd evidence-driven-developmentYour terminal prompt should now show you are inside the project folder.
-
Add your first task: Run the Python script to add a task to your list. The
--request-idhelps track specific actions.python3 -m tiny_tasks add " Water plants " --request-id plant-1The script will run without errors, indicating the task was added.
-
Attempt to add the same task again: Run the same command again. This time, the script should behave differently, showing that the system recognizes this is a duplicate request.
python3 -m tiny_tasks add " Water plants " --request-id plant-1The output should indicate that the task was not created again because the request ID was reused. The author notes this returns the original task with
created: false. -
List your tasks: See the tasks that have been added to your list.
python3 -m tiny_tasks listYou should see the “Water plants” task listed.
-
Run the tests: Execute the built-in tests to verify the application’s behavior.
python3 -m unittest discover -s tests -vThe tests should run and report success, indicating that the application is working as expected.
-
Examine the evidence: Run a script that analyzes the results and generates evidence. This step demonstrates the core idea of evidence-driven development.
python3 scripts/prove.pyThis script will output information about the experiments and their results, showing the evidence collected.
Original source
This workflow is based on a tutorial by copyleftdev, shared on the DEV Community platform. It demonstrates a practical application of evidence-driven development principles using AI assistance for building reliable software.
Notes & variations
- Free tier alternative: All tools used here are free and run locally, so there are no free tier limitations.
- Common mistake: Trying to add the exact same task with the exact same
--request-idmultiple times without understanding that the system is designed to prevent duplicate entries for the same request. - Tip for better results: Experiment with different
--request-idvalues for the same task description to see how the application handles unique actions versus repeated requests. Also, explore thetestsfolder to understand how the application’s behavior is verified.