bitwix

Tangential comments about Software Development

Friday, July 29, 2016

A new way to delete code

It's a complicated set-up to the punchline, but stay with me.

We have several iOS frameworks now, and use Carthage to update a dependent project.

The Carthage update takes ten minutes (why?).

We need to work on four related projects, so someone has the clever idea of a symbolic link of each project's Carthage folder to a shared one.

All is well. So we add shared project code to the shared location, with its own GitHub repo. Xcode neatly pushes and pulls from both.

We work on project A, including the shared code, while having project B open to check it still compiles.

After a long morning, just before lunch, we notice that project B has uncommitted changes. Assuming they're just fiddles, we discard all changes.

If you get the joke, insert your sound effect here. I favour the mechanised EH-EHH from the Family Fortunes TV show.

If you aren't sure what happened: the discard was on the shared code, being the morning's changes on project A.

TLDR: to err is human, to really screw things up needs a computer