News for hackers. Stuff that matters.
Re:Parallel development without the headaches using Git work... by zmmmmm on Sunday August 23, 2026 @10:57PM (#49414751)
The real problem for parallel dev is ensuring parallel dev environments can seamlessly co-exist without treading on each other. As soon as one of them wants to open a port, talk to an external database or write to a shared location as part of testing you have them conflicting with each other.

Much of this is a legacy dev issue where there was never so much of an assumption that parallel ephemeral dev environments would be in play in the first place. But legacy dev is still most of dev.

Re:Parallel development without the headaches using Git work... by lefra on Monday August 24, 2026 @12:47AM (#49415267)
To avoid that, the code should have ways to override default ports or paths for testing. Then, when testing, ask the OS for a free port or temporary file, and tell the tested code to use that instead of its default. This also allows running tests concurrently.

In what case would talking to an external DB be a problem? Databases support parallel queries.

Re:Parallel development without the headaches using Git work... by pprotas on Monday August 24, 2026 @01:02AM (#49415335)
On your last point, imagine worktree A talks to a database assuming some specific schema. If worktree B changes the schema (let’s day, we remove a column from a table), then worktree A can run into some errors.
Re:Parallel development without the headaches using Git work... by bdangubic on Monday August 24, 2026 @01:19AM (#49415438)
all schema changes should always be addition only
Re:Parallel development without the headaches using Git work... by pprotas on Monday August 24, 2026 @02:04AM (#49415720)
Maybe ideally, sure. In practice, in an org with multiple engineering teams: good luck enforcing that rule!
Re:Parallel development without the headaches using Git work... by bdangubic on Monday August 24, 2026 @08:36AM (#49418899)
no database user has drop rights - very easily enforced
Re:Parallel development without the headaches using Git work... by mock-possum on Monday August 24, 2026 @03:08AM (#49416138)
I just have a handful of ‘hot desks’ I assign different agents to - each desk is numbered, and the numbers inform the ports. So my first agent (001, because it’s an agent after all) uses 8081 for the web server, 3001 for the database, 8001 for the api service, etc - and 002 would use —2 for all the same.

Nice and neat, nobody’s toes get stepped on.

Re:Parallel development without the headaches using Git work... by SimionBaws on Tuesday August 25, 2026 @03:46AM (#49430363)
Easy: each worktree starts services on new ports. https://termic.dev goves you ENV variables for this, oir you definee your own custom named variables, and termic assigns ports for each wotktree.

Or if the stack is too complex to start it in parallel, use spotlight to sync changes to main checkout from a single worktree at a time. You can only test one at a time, let's be serios. https://termic.dev/docs/spotlight/