来自地狱的源代码控制
Source Control from Hell

原始链接: https://frantic.im/git/

作者回忆在一家电信软件公司第一份工作的原始源代码管理流程:开发人员从共享文件夹下载代码,在工单中手动描述修改,技术负责人花费数天整合。并发编辑常破坏构建,迫使开发人员在使用共享文件夹前大声喊叫。作者构建了一个 FAR Manager 插件来锁定文件夹。2009 年他们发现 git,对版本控制、本地工作、增量和速度感到惊叹;个人采用并推广,还做了演讲,但未能说服技术负责人,后者认为其缺乏业务价值。作者两年后离开,但前同事仍使用共享文件夹流程多年——它粗糙且痛苦,但对他们来说可行。

Hacker News 上关于“Source Control from Hell”的讨论包含三条评论:一条描述一家日本工厂锁住构建机硬盘并使用 Perforce;另一条建议从 Subversion 开始,并回忆从更老的版本控制工具逐步过渡到 Git;第三条询问如何从一个充满生成的 envoy 文件的仓库中清除多年提交的配置转储。
相关文章

原文

My first office job was at an enterprise that built software for a big telecom: a massive Delphi help desk application on Windows.

Let me tell you about how we managed source control process at the time.

First, you download the code from a shared folder (hosted on a trusted Windows server in a locked room). Build your thing, run the app, test it locally. Then you upload your changes to the shared folder and create a new ticket in the internal task tracker (also a Windows app). The ticket should have a list of the changes you’ve made, in a rich text editor, in a manual format somewhat resembling a patch. But it wasn’t a patch; it couldn’t simply be applied with a tool. Instead, the tech lead looks at the shared folder and your task and copies the relevant changes to his own integration folder. This usually took him a full day because the shared folder had a lot of changes, not all of them were ready to be integrated. Needless to say, if you simply pull a snapshot of the code from the shared folder, it would most likely fail to compile.

The most common problem was two people overwriting each other’s work. So if you wanted to upload your stuff to the shared folder, you had to stand up and announce in a loud voice that you were using the shared folder. No chat apps back in the day.

Imagine starting your career with this development experience! I did my best to improve it. At the time, almost everyone used FAR Manager, so I built a plugin that locked the folder when someone was using it, so others would get a warning. It became very popular because nobody really liked the old yelling system.

Then in 2009 I found git. It was still early days, way before GitHub went mainstream, but my tiny little brain was blown away. Holy shit, it maintains old versions. And you can work locally. And you can sync and exchange deltas. And it was insanely fast (compared to the very aptly named TortoiseSVN I’d experimented with earlier). I must have rewatched Linus’ talk a billion times. I created git repos for every project I had, preached it to my friends, and even gave my first tech talk about git at my university.

Sadly, my diplomatic skills were extremely rudimentary, and I couldn’t convince our tech lead to adopt git. He mumbled something about business value and how this new git thing lacked one. I left the company after two years but kept meeting up with old colleagues for beer. They were still using the shared folder process many years later. It was crude, it was hellish, and it worked for them just fine.

联系我们 contact @ memedata.com