0

When writing code on a desktop pc as well as on a laptop or other computer, is there a general recommended strategy for being able to keep the same environments set up on both machines?

I use Git heavily for keeping the code sync'd, VsCode has settings sync, Pip and NPM etc for packages, but there are other aspects of the environment which have to stay in sync that aren't covered by the former.

E.g.

  • XAMPP configs setup with XDebug for PHP (I have set this up countless times on different PC's and its always a pain)

  • Third party binaries

  • Literally just any kind of folder or file I'd like

I am using Windows, but im sure there is some OS and tool agnostic strategy guys have figured out over the years to optimize this process.

Doc Brown
  • 199,015
  • 33
  • 367
  • 565
Bigbob556677
  • 117
  • 3
  • Specific tool recommendations (for general sync-tools, for example) are off-topic for this site, and recommendations for how to deal with specific development tools "a developer in general may be using" make no sense for the Q&A format of this site, since there are way-too-many of such tools. I guess asking for a general, tool-agnostic strategy might work, so let me try to reword your question accordingly. – Doc Brown Aug 23 '23 at 03:33
  • See also: [Same dev env setup across multiple machines - aka fixing "but it worked on my machine"](https://softwareengineering.stackexchange.com/questions/367279/same-dev-env-setup-across-multiple-machines-aka-fixing-but-it-worked-on-my-ma) – Doc Brown Aug 23 '23 at 03:49
  • I think it's better to use just the laptop with a monitor and keyboard, instead of the desktop. If you need the desktop for gaming use a keyboard monitor switch. – adiian Aug 23 '23 at 20:23

1 Answers1

1

You're already using tools designed to ease the pain of distributed development, that would have been the general advice.

For other specific problems you will need to find a good compromise between automation and good documentation of manual processes. You could have a separate repository for this, or include it in your main repository.

Since initially setting up a development environment and keeping it up to date are somewhat different activities, you might want to structure your docs accordingly. Some kind of automatic prerequisite check might also be helpful to quickly determine where you may have forgotten something in your documentation or missed some step in applying it.

File sync tools as proposed in another answer can help with some kinds of assets but likely won't be able to handle prerequisite software installation well.

Hans-Martin Mosner
  • 14,638
  • 1
  • 27
  • 35