TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Software versions are broken

2 点作者 mtschopp超过 9 年前

1 comment

nostrademons超过 9 年前
It&#x27;s actually quite interesting to compare best practices of people who have &gt; ~5 years of experience vs. those who have less than that.<p>The latter say &quot;Use package managers. Use SemVer. Automatically upgrade to the latest version when it comes out. Check in your package.json, but don&#x27;t check in your node_modules.&quot;<p>The former say &quot;Check any dependencies on third-party software into source control, and always build from source. If you use a different build system from the original package, write the appropriate files &amp; tools to build it with your own build system. Use new versions only after they&#x27;ve been proven safe with your software. Budget significant time and manpower each time you need to upgrade the version of your dependencies.&quot;<p>The other interesting thing is that this distinction has been in force for at least 15 years. It&#x27;s not something related to just the Node.js ecosystem, nor to tooling that was recently developed. I can recall being that junior developer in 2000-2002 saying &quot;Let&#x27;s just write a few shell scripts to run RPM and PEAR install, and everyone can run them to bring their local installations up to date&quot;, and being overruled with &quot;No, we&#x27;re checking this code into the repository with all the appropriate license files and build rules.&quot; I think it&#x27;s really because version breakage is something that will hit you and cause a monetarily-significant loss about once every 5 years, and so until you&#x27;ve been burned by it or worked with someone who has, you&#x27;ll always gravitate to the more convenient package-manager approach.