It works on my laptop. That's the problem.

The project runs beautifully. The demo is ready. The developer is relaxed.
Then someone else clones the repository.
A package is missing. The database refuses to connect. A setting exists only in a terminal tab nobody remembers opening. Suddenly, "it works on my laptop" sounds less like a success report and more like a very specific hosting plan.
The problem is not that your laptop is unusually talented. It is that the code was only part of the system you tested.
A useful handoff describes how to rebuild the environment, not how to borrow the original machine.
Your repository is not the whole recipe
A runnable project depends on more than source files. It also needs a compatible runtime, the intended dependencies, configuration, any backing services and the right commands.
Think of a small web application. The repository may contain the server code, but not the database process running in the background. It may list packages, but not the runtime version used by its author. It may expect a variable called DATABASE_URL without telling the next person that the variable exists.
That is a fictional example, not a diagnosis of every failed project. The useful question is: which part of the recipe did the repository leave out?
Start with five checks:
- Runtime: which language runtime and package manager does the project expect?
- Dependencies: which dependency specification or lockfile should be used?
- Configuration: which settings must be supplied, and how?
- Services: which database, cache or other service must exist?
- Commands: how do you install, prepare, start and test the application?
1. Write down the runtime, not just the language
"It uses JavaScript" is not a setup instruction. Neither is "Python installed."
Record the runtime and package-manager versions you actually tested. Put the supported setup in the README and, where your tools support it, in project configuration. Do not write "latest" if your project has only been checked with one version.
For an existing project, its documented requirements come first. Do not upgrade the runtime merely to make your version match a tutorial. First establish what the project supports, then test any change deliberately.
This is a small step, but it replaces a hidden assumption with something another person can check.
2. Use the project's dependency record
A dependency declaration and a clean installation are related, but they are not the same thing.
For an npm project with an existing, matching package-lock.json, npm documents npm ci as a clean-install command intended for automated environments and other situations requiring a clean dependency installation.
It fails when the lockfile and package.json disagree instead of silently updating the lockfile. It also removes an existing node_modules directory before installing and does not write to the package files. If the lockfile was created with dependency-tree-changing options, the matching options may be needed for npm ci too.
For a trusted project that already defines a test script, a basic verification sequence might be:
npm ci
npm test
Run that in a disposable checkout, not as a surprise cleanup of a working folder. Review unfamiliar projects before executing their installation or test scripts. These commands are documentation-based examples, not a claim that we tested your project.
In Python, use an isolated environment and recreate it from the project's dependency specification. The Python tutorial shows installing recorded requirements with:
python -m pip install -r requirements.txt
Use the selected environment's Python. The Python venv documentation says virtual environments are generally not portable because installed scripts can contain absolute paths. Sending someone a copy of your .venv folder is not a dependable replacement for setup instructions.
A requirements file is not automatically a universal cross-platform lock, either. Runtime versions, platform-specific packages and other system requirements can still matter. Keep the dependency workflow appropriate to the project's tools rather than treating every ecosystem as npm with different spelling.
3. Share configuration names, not credentials
A missing setting should produce a useful error, not a group-chat archaeology exercise.
Document required configuration names, what each one does and where it is supplied. A sample file can contain obvious dummy values. Real credentials should stay out of the repository, screenshots and public issue reports.
The Twelve-Factor App recommends separating deploy-specific configuration from code and using environment variables for that configuration. That is an engineering approach, not a promise that every use of an environment variable is secure.
The context matters. Docker specifically warns against passing build secrets through build arguments or Dockerfile environment variables because they can persist in the final image. Its documented build-secret mechanisms address that separate problem.
For a beginner handoff, the useful rule is simple: explain what must be configured, but do not include the secret needed to configure it. Use the project's approved secret-delivery method. Avoid printing sensitive values in diagnostic logs.
4. Check the services outside the code
A database connection is not a database installation. A migration command is not a guarantee that the required service is running.
Document the type and expected version of each backing service, how to start it and any required schema or seed-data steps. Make sample data safe to share. Never use production customer data just to make a local demo convenient.
The Twelve-Factor App's dev/prod parity guidance warns that different backing services can introduce incompatibilities even when a library abstracts access to them. Its example contrasts SQLite locally with PostgreSQL in production.
You do not need a production-sized machine to learn from that point. You need to know which differences are intentional and which ones nobody noticed.
5. Containers help. They do not certify the whole system.
A container can make parts of the environment explicit and easier to rebuild. It does not, on its own, prove that external services, supplied configuration or every downloaded dependency match.
Docker's build guidance notes that image tags are mutable: the same tag can later point to a different image. Pinning a base image to a digest identifies that exact image version. That improves control, but it also means planning updates rather than assuming security fixes will arrive automatically through a moving tag.
The tradeoff is deliberate repeatability versus automatic movement, not "never update anything."
For a small student project, clear setup instructions and a clean test may be the right first improvement. Add containers when they solve a real setup problem, and document how they fit the rest of the system.
The clean-checkout test
Before the handoff, try the instructions in a separate disposable copy or an appropriate clean test environment. Do not delete the only working copy or expose production secrets to do it.
Follow the README literally. Avoid relying on packages installed globally, an old terminal session or a service that happened to be running. Record anything you have to supply that the instructions did not mention.
A useful sequence is:
- Obtain the intended revision of the project.
- Use the documented runtime and dependency-installation method.
- Supply non-production configuration through the documented route.
- Start the required local services and apply the documented setup steps.
- Run the project's actual test or build commands.
- Start the application and check one basic user-visible flow.
- Fix the instructions wherever you had to guess.
Passing this check is evidence about that tested environment, not proof that the application works on every operating system or deployment target. A continuous-integration check can repeat useful parts of the process as the project changes, but its coverage still depends on what you configure it to test.
A handoff checklist worth keeping
- Tested runtime and package-manager versions.
- Dependency files committed and installation method explained.
- Configuration names documented, with no real secrets.
- Required services and data-setup steps listed.
- Start, build and test commands included where applicable.
- A clean setup checked, with its limits stated.
"It works on my laptop" can be a useful starting observation. It should not be the last instruction.
Make the next setup repeatable. Your laptop deserves to retire from being the deployment strategy.
Day 4 of the CuratorsMemes 30-day article challenge. Developer Culture. Sources checked 4 November 2026. This is a beginner handoff guide, not a reproducible-build guarantee or a report of tests run on a reader's project.
Sources
- npm Docs: npm ci - https://docs.npmjs.com/cli/v11/commands/npm-ci/
- Python: venv - https://docs.python.org/3/library/venv.html
- Python tutorial: Virtual Environments and Packages - https://docs.python.org/3/tutorial/venv.html
- The Twelve-Factor App: Config - https://12factor.net/config
- The Twelve-Factor App: Dev/prod parity - https://12factor.net/dev-prod-parity
- Docker: Building best practices - https://docs.docker.com/build/building/best-practices/
- Docker: Build secrets - https://docs.docker.com/build/building/secrets/
- OWASP: Node.js Docker Cheat Sheet - https://cheatsheetseries.owasp.org/cheatsheets/NodeJS_Docker_Cheat_Sheet.html
Comments
Post a Comment