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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

In Defense of Not-Invented-Here Syndrome (2001)

66 点作者 aycangulez将近 15 年前

10 条评论

phaedrus将近 15 年前
Many years ago, when I was first learning game programming, I insisted on implementing everything myself, including low level 3-d math and writing to video memory manually. Now, I'm working on a new game and I've created a script-binding technology that makes it very easy for me to incorporate third party C/C++ libraries into the game's scripting engine, like the way the Borg assimilates technologies. So I've had experience at both extremes of NIH.<p>Here's what I've found: using someone else's library is NOT faster than implementing the code yourself just to do a certain task at hand. The code you write for yourself does no more than you need it to, and you implicitly understand how it works. When you're trying to use someone else's library to accomplish a simple task at hand, you have to learn all the library's concepts tangentially related to what you want to do, and then you can spend days tracking down a silly bug because you misunderstood some small detail of what the library is doing (i.e. the library violated the law of least astonishment). At best, it takes THE SAME time to learn/debug code with a dependency as it does to implement it yourself, provided you're a good programmer.<p>But, I still recommend learning to reuse code from elsewhere. The benefit of hooking up to and learning a third party framework or library comes after the task at hand, which is that once you've made the initial investment, incrementally enabling other features the library provides begins to cost less and less than reimplementing them yourself, because the initial investment of learning and debugging the foreign code begins to pay back.<p>So you have to look at it as being like an investment which loses money in the short term but has the potential for earning back interest in the long term.<p>But here's the most important reason to drop NIH and embrace code reuse: Do you want to push the boundaries of what is possible? If you envision program-space as the set of all possible programs, it must be clear that there are programs on that space that lie outside what one team or one man can write by himself in a lifetime. If all you're doing is accomplishing one task at hand, by all means make the cost-benefit analysis and choose reuse or not pragmatically. But if you're interested in pushing the boundaries of the state of the art, then to reach the "interesting programs" that lie in program-space outside the boundaries of what one man can write in his lifetime, you must do it by extending the work of others who have gone before you, just as all progress in science is accomplished.
评论 #1584262 未加载
jasonkester将近 15 年前
<i>When you're working on a really, really good team with great programmers, everybody else's code, frankly, is bug-infested garbage</i><p>There are two classes of code that this seems to apply to 95% of the time: Other People's Javascript, and Web Templating Systems.<p>Bad Javascript is understandable, since any Joe with a copy of notepad and "Teach Yourself Web Programming in 21 days" can (and will at some point) write a crappy DHTML menu system and throw it out on the web. Junior Dev Jimmy will find it and drop it into your project without asking anybody, and suddenly it's your job to deal with it (or rewrite it, which is generally the only thing to be done. Extra credit if you open source it and inflict it on the next generation.)<p>Fortunately, the jQuery guys have managed to defy this rule, and it's doing a good job of fixing the issue. Still, "No 3rd Party Javascript" is a good mantra if you're running a dev shop worth its salt.<p>Web Frameworks are the fun one. Usually they're the embodiment of the Second System Effect, where a bunch of devs who've done exactly one project in one framework sit down and figure out what their Dream System would look like, and end up reinventing either Classic ASP or Cold Fusion, but in a comically terrible way. Often they'll even get traction with it.<p>See FuseBox for the canonical example of taking the joke too far. Yikes!
评论 #1584513 未加载
评论 #1584777 未加载
cperciva将近 15 年前
Another reason for NIH: If something breaks, you have the in-house expertise necessary to figure out why.<p>Of course, this breaks down as soon as people leave the company -- but for an early startup where the founders are expected to stick around, it's much faster to get something fixed if the author is within arm's reach.
评论 #1584238 未加载
评论 #1583942 未加载
canterburry将近 15 年前
If the Excel team's compiler and widgets were so much better, why wasn't the rest of MS re-using theirs instead? To me, this particular example does not argue for building it yourself, it just demonstrates re-use should have gone the other direction.<p>I do agree with the basic premise that if an available solution does not meet expectations, the benefit of re-use does not always outweigh the inadequacies, thus supporting the business case of building it yourself.<p>HOWEVER...<p>...there are far too many organizations who think their needs are unique and different when they really aren't. I think that is a more common reason why companies re-invent the wheel and then post-factum realize their needs really weren't so special after all and could have bought off-the-shelf instead.<p>What cracks me up even more is, when a company realizes that an in house built system could be replaced with an off-the-shelf packet, then they have to weight their in-house maintenance costs against going out and buying an existing package. This quite frequently comes out cheaper over time, so right after they build their shiny new enterprise app, it's discontinued and replaced by a bought system.
评论 #1584095 未加载
评论 #1584033 未加载
api将近 15 年前
"What these hyperventilating "visionaries" overlooked is that the market pays for value added."<p>THIS.<p>Best quote in the article, and sums up the problem with a lot of trendy recent business BS.
评论 #1584003 未加载
评论 #1583927 未加载
评论 #1584227 未加载
snprbob86将近 15 年前
I read this years ago, but reading it again is incredibly interesting now that I use GitHub. GitHub has changed the way I think about dependencies.<p>I'm no longer afraid to take a dependency and I'm no longer afraid to just start making changes to those libraries. It's like the best of both worlds: everyone else's code becomes my code. I've got "Not Under Version Control Here Syndrome".<p>(This breaks down miserably if you are shipping boxed software and have <i>hard</i> dependencies on other things on disk which are out of your control, like Excel does)
评论 #1584279 未加载
CapitalistCartr将近 15 年前
I think it varies from person to person, and subject to subject. I find that if I can write the code in a two digit number of lines, I'm better off doing it myself. Not making stupid concatenated long lines, of course. I used to write for OS390 and got used to the 80 char limit to lines, anyway.<p>If it feels like it'll take X time to write, it'll be twice as long, due to unforeseen stuff, and then X time again to make it work, debug, etc. If it takes a thousand lines of code, it's worth it to look around. If it's between a hundred and a thousand, it's fuzzy.<p>None of this negates the value of off-the-shelf solutions. It's a matter of time spent making my own, versus learning someone else's stuff. I can learn anything thoroughly; it's a matter of time and motivation.
xsmasher将近 15 年前
Libraries and abstractions are good to the extent that you can <i>trust</i> them - there are some libraries that I trust more than my own code, and others I wouldn't touch with a 10-foot pole.<p>On topic, Excel was always more solid and reliable than Word or Ppt, and it turns out that was no accident.
api将近 15 年前
<a href="http://c2.com/cgi/wiki?JunkyardCoding" rel="nofollow">http://c2.com/cgi/wiki?JunkyardCoding</a><p><a href="http://c2.com/cgi/wiki?RubeGoldbergMachine" rel="nofollow">http://c2.com/cgi/wiki?RubeGoldbergMachine</a><p>I've seen that before. NIH can be pathological, but so can anti-NIH.
fmora将近 15 年前
Read this and most of his articles around 2007. Some of the best articles I've read. Unfortunately he seems to have said most of the stuff he was going to say so he has stopped writing. Ho well, too bad.