在另一个问题中,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/锤子,螺钉/螺丝刀,螺栓/扳手,粘合剂/胶枪/夹子,磁铁等等-所有这些都在您的指尖(有向导帮助您开始)。
这取决于你使用的语言,但在c#和Java中,我发现ide对以下方面有好处:
Quickly navigating to a type without needing to worry about namespace, project etc
Navigating to members by treating them as hyperlinks
Autocompletion when you can't remember the names of all members by heart
Automatic code generation
Refactoring (massive one)
Organise imports (automatically adding appropriate imports in Java, using directives in C#)
Warning-as-you-type (i.e. some errors don't even require a compile cycle)
Hovering over something to see the docs
Keeping a view of files, errors/warnings/console/unit tests etc and source code all on the screen at the same time in a useful way
Ease of running unit tests from the same window
Integrated debugging
Integrated source control
Navigating to where a compile-time error or run-time exception occurred directly from the error details.
Etc!
所有这些都节省时间。这些事情我可以手动完成,但会更痛苦:我宁愿编写代码。