Member-only story

Why You Need a Coding Scratch File

Kevin Hicks
2 min readDec 13, 2021

--

Photo by Ilya Pavlov on Unsplash

Sometimes the best place to write code for your project is outside it.

This may sound like a lie. How could writing code outside of a project be the best place for the project's code? How can it even help the project at all?

Working within a project, especially a large and complex one, other code can get in the way of what you are writing.

By removing the distraction of unrelated code, you can focus on your task.

When experimenting with designs or figuring out a tricky issue, it's quicker and easier to focus on the smallest amount of code needed. You don't have to worry about passing arguments around, multiple software layers, and other complexities. You also won't need as many manual steps or automated tests to test your code.

Sometimes you will need the rest of the project code, but removing it can be a huge productivity boost when you don't.

How does a scratch file help?

A scratch file allows you to write code that can be compiled, ran and debugged without the rest of your project or setting up a new one. You can copy the code to your project and delete the file when you finish. Scratch files also help avoid accidentally committing temporary code.

--

--

Kevin Hicks
Kevin Hicks

Written by Kevin Hicks

Helping other devs evolve & make more money | Senior Developer | 6 Figure Freelancer | Entrepreneur | Build in public | https://kevinhicks.software/

No responses yet