DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for How do you manage multiple projects/codebases at once?
Ben Halpern
Ben Halpern

Posted on

How do you manage multiple projects/codebases at once?

How do you manage the mental complexity, file organization, context-switching, etc. when you are working on multiple codebases, perhaps multiple languages, etc.

Any tricks to keep things from getting too scattered?

Top comments (23)

Collapse
nombrekeff profile image
Keff

If I have the control, and if the projects are similar I usually try to organize every project the same way. I also try to only focus on one project at a time, or two at most. Otherwise my brain doens't like the humongus mental map required.

I also try to stick to standards and common practices for each language/framework/architecture, etc... this way other people that know the tech can feel at home.

Collapse
grunk profile image
Olivier • Edited on

I'm currently working on 22 actives projects , which divide as follow :
12 web project (mostly PHP/Angular)
7 android project (Java)
3 desktop/system projects (C++/Angular)

The hardest for me is to constantly change language. After 3 weeks of C++ i usually forgot the "$" in PHP for example. It take me at least an hour to reset my brain and be really productive again.

I have the luxury to manage my time almost how i want , so i try to group project by language to minimize the impact of switching language.

All the project of a same "group" are usually architectured the same way , so it's pretty easy to switch from a web project to another fo example.
The only downside is that i can't remember file names (ten of thousand files across all projects) so can't use shortcut to browse my project , i just scroll relentlessly until i found the correct file :D

We also try to use language that are close to each other in term of syntax. PHP/TypeScript/C++/java are very look a like , it helps to switch between them. I can't work with python for example , i hate the syntax and can't wrap my head around it.

Collapse
frankfont profile image
Frank Font

Ohh my, I feel your pain. When people ask me what languages I work with, I say yes.

Collapse
grunk profile image
Olivier

It's demanding but kind of cool to have such a diversity of project πŸ˜‰

Collapse
jzombie profile image
jzombie

Wouldn't searching your codebase be faster than scrolling through a bunch of files?

Collapse
atimin profile image
Alexey Timin

No tool can help if you can't organize yourself.

  • Split tasks by urgency and size.
  • Do all the small and urgent tasks first at the beginning of your workday. Your brain is fresh (usually) in the morning, and jumping between contexts shouldn't be a problem.
  • Do 1 or 2 big tasks for the rest of the day. Keep focus, if something happens, put it off for tomorrow.

Ofc. you should have suitable environment. In my experience, it's easier to organize your job when you work remotely.

Collapse
jzombie profile image
jzombie

Window managers aside, I take a naive "a little here, a little there" approach, and let unit tests help keep me on the right track.

---- And many will disagree with the following, but to each their own: ----

And I'm not afraid of littering my codebase w/ TODO statements because I use them as tokens to identify places to clean up.

In my professional life, I don't push these TODOs to develop and they really come in handy to help reduce the brain drain of multiple context switches.

Collapse
polterguy profile image
Thomas Hansen

Magic has almost 40 repos in total, so I created a clone Magic repo to make it easier for others wanting to clone the code ...

Collapse
waylonwalker profile image
Waylon Walker

Nice, I have an ansible playbook that is refreshed nighly to include all of my projects. Then teammates can ansible-playbook checkout.yml.

Collapse
polterguy profile image
Thomas Hansen

Ansible is cool 😊

Collapse
craser profile image
Chris Raser

I'm a consultant & work with multiple clients, and each client can have multiple codebases, each with its own team, process, linting/PR policies, branching regime, etc. In short: it's bananas. Context switching on this scale is plainly outside human capability.

So I automate a huge amount, and I make use of TextExpander's ability to run shell scripts to create snippets that change their output based on what I'm currently working on. I have Keyboard Maestro & Alfred hotkeys set to help me open Jira tickets quickly, create ticket branches, create PRs according to the team's policy, etc.

My premise is that every common action should be automated as much as possible. That 1️⃣ ensures it's done correctly each time, 2️⃣ saves me time in doing it, and 3️⃣ lets me track changes to how I do it so I can be intentional about doing it differently.

I was actually just about to write something here about how I manage calendars & to-do lists, and I think my client/ticket/repo management system is worth a writeup at this point too.

Collapse
jpaulin profile image
Jukka Paulin

Have pre-to-do lists. I found this useful. A sort of reminder of the very likely next steps or loose ends. Can be made quite quickly, should be the intuition when working on the project, and everything is fresh and hot in short-term memory. :-)

Collapse
superfola profile image
Alexandre Plateau

I've been using mani-cli to handle many repo and run the same tasks in different repositories (eg git pull, back to master). Pretty useful to add tags to repo and list them depending on those tags (eg personal projects, work projects, tools...).

Very cool to do a better and faster grep -r as well, given an extension, folder pattern...

Collapse
andrewbaisden profile image
Andrew Baisden

I try to work on one project at a time and go through my to-do list. In terms of technical stack, I try to have a similar project setup so I can jump between them and the codebase is more a less the same. If the languages are different like JavaScript or Python I also try to have similarities with the codebase so it's an easy transition.

Collapse
waylonwalker profile image
Waylon Walker

All of my work projects exist in ~/work, open source goes in ~/git. I have tmux bindings to bring up a fuzzy project switcher popup, so I can select the project with fzf. to get between between two projects I often use alt-b to back to the last session I was in. This happens instantly, so I can quickly reference one while changing a second project.

You can see most of my tmux setup in this post.

Another critical tool to managing more projects is mu-repo. I have ~60 data pipelines that are all quite similar that I manage. I make heavy use of rg, and sed to make batch changes, and mu-repo to diff, commit, and push all the changes from every repo at once.

waylonwalker.com/mu-repo/

Collapse
jamiedavenport profile image
Jamie Davenport

Our codebase is a Turbo-powered monorepo which helps to keep the code organised well.

Our knowledge is very scattered, like most companies, across Github, Notion, Figma, Linear and more. We use our own tool DocSearch which makes it super easy to find what we need and keep context switching to a minimum.

Collapse
jeremyf profile image
Jeremy Friesen

I use the projectile and projectile consult packages in Emacs. I press command + t to open a file selector. If I type p then space, I switch to a project selector, pick the project and then select the file.

Super convenient.

Collapse
sherrydays profile image
Sherry Day

A good window manager is key

Collapse
jdmedlock profile image
Jim Medlock • Edited on

The most important thing for me aren't the technical details. I accept that different projects will rely on different technical stacks so I make sure the readme's define the things I or other Developer's will need to remember.

More important than that is the context-switching from a productivity standpoint. Timeboxing is an invaluable technique for me to make sure I don't get overwhelmed, but also that each project gets my attention and time.

Saying "No" to starting/joining new projects is critical. Timeboxing works well for a few concurrent projects, but it can't be expected to work if I'm participating in too many concurrent projects.

Finally, it's important to define "What is done?". In other words, when will a project be completed as far as my involvement and what will my exit strategy be so I can go on to other things.

Collapse
jmfayard profile image
Jean-Michel Fayard πŸ‡«πŸ‡·πŸ‡©πŸ‡ͺπŸ‡¬πŸ‡§πŸ‡ͺπŸ‡ΈπŸ‡¨πŸ‡΄
Collapse
tnir profile image
T "@tnir" N

Gitpod (cloud edition) helped me a lot to handle multiple projects just in an Apple Silicon (M1 and M2)-based small MacBook Air πŸ’» 🍎

Collapse
fannysims profile image
FannySims

How do you dive into large code bases? cupping massage calgary

🌚 Life is too short to browse without dark mode