Good Habits for Code Management and Backups
In a computational lab like ours, managing code and data carefully is just as important as designing good experiments. Losing progress due to poor organization, lack of version control, or missing backups can be frustrating—and sometimes impossible to recover from. So let’s build good habits early.
- Use version control. All research code should be tracked using Git, and stored in our lab’s GitHub organization or your personal GitHub when appropriate. This makes your work easier to share, review, and recover if anything goes wrong.
- Document your code. Even if it’s just for yourself, make sure your scripts have clear comments, a README file, and enough structure that you—or someone else—can understand what’s going on a few months later.
Back up your work regularly. Never keep important files in just one place. Use university cloud storage, external drives, or GitHub. If your laptop dies, you shouldn’t lose your work.
- Use lab templates and workflows. For new projects, we may start from a basic template or structure to keep things consistent and reproducible. If you’re unsure where or how to set that up, just ask—we’ll figure it out together.
- Use tools to help you code smarter. You can use ChatGPT to help debug code, understand errors, or even build small modules when you're stuck. Tools like Cursor (an AI-assisted code editor) can also speed up development and help you structure larger projects more cleanly. These tools don’t replace understanding your code—but they can be great supports when used wisely.
- Be open to sharing. When appropriate, we may open-source parts of our work, especially if it's tied to a publication. Clean, well-managed code helps make that possible.
You don’t need to be a software engineer to do research coding well. Just stay organized, consistent, and open to feedback. And please—never let your only copy of important work live on one machine.