在另一个问题中,Mark高度评价了ide,说“有些人仍然不知道”为什么“他们应该使用一个……”。作为一个使用vim进行编程的人,并且在大多数/所有同事都使用vim或emacs进行所有工作的环境中工作的人,ide的优势是什么?我为什么要用它?

我相信这对一些人来说是一个棘手的问题,我对开始一场论战不感兴趣,所以请只回复你认为基于ide的方法更好的原因。我对听到为什么我不应该使用IDE不感兴趣;我已经不用了。可以这么说,我感兴趣的是听取“栅栏的另一边”的意见。

如果您认为ide可能适合某些类型的工作,但不适合其他类型的工作,我也很想知道为什么。


当前回答

我认为这主要与开发者的认知范围有关。IDE提供了开发人员工作环境的宏观视图。您可以同时看到类层次结构、引用的资源、数据库模式、SDK帮助引用等。而且,由于您的击键会影响和影响如此多的事情,以及体系结构和体系结构交叉点的数量不断扩大,一次只使用一个代码岛工作变得越来越困难。

OTOH,“只有我和vim和手册页”让我对我的工作有了一个更精简的微观——但强烈而精确的——视图。如果我有一个用一种语言和一组静态库构建的设计良好、分区良好、稀疏耦合且高度内聚的代码库,那么这是可以的——这不是典型的情况,特别是当开发团队规模随着时间、距离和个人偏好而增长并重新构建代码结构时。

I'm currently working on projects in Flex and .NET. One of the nicer things about Flex is how few different ways there are to accomplish a standard thing - pull data from a database, open/close/read/write a file, etc. (Yet I'm using the Flex Builder/Eclipse IDE - a typical heavy-weight example like VS, because I'm still learning the basics and I need the training wheels. I expect to evolve back to vim once I'm confident of my patterns.) In this view, I can do what I need to do professionally by knowing a few things really really well.

OTOH, I can't imagine getting to that point with .NET because the view I'm expected to maintain keeps expanding and shifting. There much less conceptual integrity, and over several developers on a project over several months, much less consistency - but the IDE supports that, maybe encourages it. So the developer really needs to (and can more easily) know many more things adequately. Which also has the benefit of helping them answer (or even understand) a lot higher percentage of the questions on StackOverflow. I.e. we can have a deeper knowledge stack. And we can respond to a wider variety of help-wanted ads.

事情可能会朝着两个方向发展。也许对于“仅编辑器”作用域,这就像“如果你只有一把锤子,那么所有东西看起来都像钉子”。使用IDE方法,对于任何您想要固定在一起的东西,您都有广泛的紧固件和相关的工具范围可供选择- nals/锤子,螺钉/螺丝刀,螺栓/扳手,粘合剂/胶枪/夹子,磁铁等等-所有这些都在您的指尖(有向导帮助您开始)。

其他回答

我不明白你在问什么。你问“我应该使用IDE而不是……”,但我不明白替代方案是什么——Vim和Emacs实现了任何IDE都能提供的许多功能。它们唯一不能处理的方面是,一个更大的IDE可能是像UI设计器。然后,您的问题可以归结为“我应该使用哪种IDE”,并为更简单的Vim和Emacs领域提供了论据。

我从相反的方向来回答这个问题。我从小就在Makefile+Emacs的环境中编程。从我最早的DOS编译器,微软的Quick C,我有一个IDE自动化的事情。我在Visual c++ 6.0上工作了很多年,当我毕业到Enterprise Java时,我使用Borland JBuilder,然后决定使用Eclipse,这对我来说已经变得非常高效。

Throughout my initial self-teaching, college, and now professional career, I have come to learn that any major software development done solely within the IDE becomes counterproductive. I say this because most IDE's wants you to work in their peculiar I-control-how-the-world-works style. You have to slice and dice your projects along their lines. You have manage your project builds using their odd dialog boxes. Most IDE's manage complex build dependencies between projects poorly, and dependencies can be difficult to get working 100%. I have been in situations where IDE's would not produce a working build of my code unless I did a Clean/Rebuild All. Finally, there's rarely a clean way to move your software out of development and into other environments like QA or Production from an IDE. It's usually a clicky fest to get all your deployment units built, or you've got some awkward tool that the IDE vendor gives you to bundle stuff up. But again, that tool usually demands that your project and build structure absolutely conforms to their rules - and sometimes that just won't work for your projects' requirements.

我了解到,要与团队一起进行大规模开发,如果我们使用IDE开发代码,并使用手动编写的命令行脚本进行所有构建,那么我们可以获得最高的效率。(我们喜欢用Apache Ant进行Java开发。)我们发现在IDE中运行我们的脚本对于复杂的构建来说只是一个点击或者自动化的噩梦,用alt+tab到一个shell并在那里运行脚本要容易得多(而且破坏性更小)。

Manual builds requires us to miss out on some of the niceties in the modern IDE like background compilation, but what we gain is much more critical: clean and easy builds that can live in multiple environments. The "one click build" all those agile guys talk about? We have it. Our build scripts can be directly invoked by continuous integration systems as well. Having builds managed through continuous integration allows us to more formally stage and migrate your code deployments to different environments, and lets us know almost immediately when someone checks in bad code that breaks the build or unit tests.

In truth, my taking the role of build away from the IDE hasn't hurt us too badly. The intellisense and refactoring tools in Eclipse are still completely useful and valid - the background compilation simply serves to support those tools. And, Eclipse's peculiar slicing of projects has served as a very nice way to mentally break down our problem sets in a way everyone can understand (still a tad bit verbose for my tastes though). I think one of the most important things about Eclipse is the excellent SCM integrations, that's what makes team development so enjoyable. We use Subversion+Eclipse, and that has been very productive and very easy to train our people to become experts at.

不要认为这是排他性的。使用IDE来获得它所提供的好处,当需要集中精力时切换到vim/首选的文本编辑器。

我发现IDE更适合重构、浏览、调试以及找出要做的事情。然后在IDE中完成小的事情,大的事情我切换到vim来完成。

当“文本编辑器”实际上是emacs时,我认为做经典的“文本编辑器和控制台窗口vs IDE”是不公平的。IDE:s的大多数典型特性也在emacs中。或者它们甚至起源于那里,现代IDE主要是界面的改进/简化。

这意味着对于最初的问题,答案并不是那么明确。这取决于所讨论站点的用户如何使用emacs,是主要将其用作文本编辑器,还是完全使用自定义脚本,学习相关模式的命令,了解代码标记等等。

代码自动完成。它对探索代码有很大帮助。