How to set up smartphones and PCs. Informational portal
  • home
  • Programs
  • Editor or IDE? Another attempt at analysis. The most versatile IDE: JDeveloper

Editor or IDE? Another attempt at analysis. The most versatile IDE: JDeveloper

I would like to once again raise this rather controversial topic.

Since I started programming, this question has been haunting me, and numerous topics on the forums and habré have not brought clarity. Plus, it seems to me that some arguments for both sides were not given. And those that are given are wrongly prioritized and lost context.

In the article I will try to correct this omission and put a few more dots over the “ё”.

I invite everyone to participate in the search for the perfect instrument.

About my experience

I started programming in DOS. in Turbo Pascal. And, for some reason, we then used the IDE only for debugging, and then quite rarely. To write code, they preferred to use some unnamed edit.exe without any syntax highlighting in conjunction with Volkov Commander. And that was enough. In the same way, I later worked on assembler and, in part, C ++.

Continuing to learn C ++, I switched to Windows and, accordingly, visual studio- where without it. I found versions, if I'm not mistaken, from 5 to 7. After a simple editor, it was something - code generation and auto-completion caused delight. True, it was almost impossible to figure out all this generated goodness, but it seemed unimportant.

After some time, I switched to Linux and started web development in php. Here I studied vim in parallel and used ZendStudio for development. At some point, I started using only Vim for everything - I turned it, according to numerous manuals, into a small ide. In it, he wrote his first bicycle CMS in php.

I note that before that, programming was not my main activity. Yes, I also wrote various small utilities for work, made themes for WordPress, but the main occupation was administration.

As soon as I took up development professionally, the possibilities of vim were no longer enough for me. First there was eclipse, then netbeans, now phpstorm.

For the last half a year, I have been heroically trying to master emacs, incl. as the main working environment.

So I have something to compare with and, I hope, my opinion will be sufficiently substantiated and reasoned.

IDE? IDE...

I thought for a long time in what form to present a comparison of the advantages and disadvantages of the parties. The list is not very suitable for this, because a simple enumeration does not quite reflect the essence of the issue. The editor and IDE are not opposites, but tools whose scope overlaps in some area. The advantages of the editor are not always the disadvantages of the environment and vice versa. For this reason, more or less structured discussions on the topic follow.

I'll start, perhaps, with one of the indisputable advantages of the editor - its rich possibilities for working with text and the ability to do everything without taking your hands off the keyboard. Wednesdays for the most part do not know how. But do you need such features when writing code? When writing an article or a letter, I think it is convenient to swap 2 words with a single keystroke or move a paragraph up the page. But in the text of the program, this is, in most cases, meaningless and requires refactoring. And you have to pay for this either with finger-crushing emacs keyboard shortcuts, or no less brain-crushing commands in vim. But all this needs to be remembered! Something that is simply solved with one movement of the mouse, such as moving a window or changing its size, turns into a whole quest. Yes, even selecting the text is easier with the mouse - more precisely, faster, and you don’t have to count how many words there are to the right place in the text. No, the programmer too may these functions can be useful, but the fact is that its time spent on actually editing the code is negligible, so there will be practically no time benefit. But a significant complication of the tool is obvious.

A programmer spends 80% of his time understanding the written code and moving through it. And moving exactly by the code, and not by the text! And here the editor cannot help him with absolutely nothing. The list of method parameters in the tooltip will not show, it will not allow you to go to the definition of the method, the syntax will not control. And IDEs, even the simplest ones, handle this simply and elegantly. I recently spent 10 minutes searching for the definition of a single method in a project using silversearcher from emacs. It turned out that the class was defined in another module, and so on. 10 minutes instead of one mouse click! I'm certainly not experienced enough in emacs, so let it be 5 minutes, even a minute. Still, the ratio is impressive.

And here the IDE shows its, perhaps, the only, but very fat plus - the presence of a programming language parser. The environment "understands" that it is editing the code. Editor - no. And this is auto-completion, and navigation, and highlighting syntactic, and, sometimes, semantic errors. It seems to be an excess, a pleasant trifle, pampering. But it turns into a necessity after the size of the project exceeds a certain limit. And taking into account the voluminous modern frameworks, this limit comes almost immediately.

Yes, on a project of a dozen files and a couple of thousand lines, this plus does not manifest itself in all its glory. The editor can also do the same auto-completion, but it will never filter out meaningless options. And if the project size approaches 100 thousand lines and consists of thousands of files, not counting libraries, then it becomes problematic to choose desired title from a hodgepodge of variable names, methods of other classes, and just words from comments (I had this in vim, I don’t know, maybe they fixed it). Smart hints eliminate the need to remember names desired functions and their settings. Often this is simply physically impossible.

Speaking of projects. All IDEs have this concept. Settings, resources are attached to it, you can search, etc. In editors it is in best case open directory file system. Sometimes a little more.

Debugger integration in editors also leaves a lot to be desired. Unit testing, logging to some extent save the situation, but sometimes without a debugger, nowhere.

Someone may object that in modern editors, many of these functions have already been implemented and are in no way inferior to the most sophisticated IDEs. I do not agree. First, there are no full-fledged implementations. They don't work as they should. Secondly, installing all this is already enough difficult task. Yes, even the configuration internal functions editor is already non-trivial. Try, say, turn on line numbering in the same emacs! Plus, often desired functionality implemented by a dozen plugins, it is not clear how they interact with each other. And often also having a dozen versions and branches that are not always compatible, strange settings, etc. You can, of course, spend a month, configure and install everything (which is also the lot of enthusiasts), but this will only bring the editor closer to the IDE level. For example, back to the same projects - I tried both Project under vim and projectile under emacs and some other plugins. If Project even more or less meets my requirements (although in latest version I didn’t manage to create a project at all due to bugs), then projectile left an extremely negative impression.

Nevertheless, editors have several areas of application where they, at a minimum, compete with development environments.

First, they show themselves better on small projects. It makes no sense to download an IDE combine to work with a project of 10-20 files. It's easier to correct 3-4 lines in the editor.

Secondly, in some specific areas, all the advantages of the IDE are offset. For example, low-level development for linux. I didn't do it, but judging by the structure of the code and the preferences of the developers (about 70% - emacs and clones, 25% - vim, 5% - some exotic like jed), the IDE has nothing to do there. Whole desired code, with which you work, is assembled, as a rule, in one or two files, and you do not need to jump within the entire project. Yes, and auto-completion will not help much when choosing from a dozen or two functions with almost the same names.

Thirdly, editors can work not only with code. All their power can be used when working with csv or xml files. Or something else, which sometimes becomes necessary, like an article or a letter. And you don't need to retrain, look for convenient program or memorize hot keys - everything is at hand, everything is the same.

Fourth, the ability to work with languages ​​for which there is no sane IDE. Let's say, with the same ruby, the environment did not help me much. SublimeText was enough. Although I have not worked with a large ruby ​​project, perhaps the IDE would show itself there.

And fifthly, the notorious possibility of expansion. In the presence of good plugins The editor becomes very handy! Plus the specific pleasure of continuously tuning your main instrument and feeling full control above it - it is worth a lot.

Total

I don't really like IDEs, although it might seem so from the previous text. I think they are pretty monstrous, with a bunch of unnecessary features, slow and resource intensive. And the best of them are quite expensive. In addition, I believe using an IDE relaxes and binds to oneself. For editors, the opposite is true. Plus accessibility and the possibility of fine-tuning for themselves. By at least vim and emacs. In the end, I just like them. This article, for example, I'm writing in Emacs.

But the industry (and bosses) dictates its own requirements. If you do not use an IDE, performance will drop significantly. But no one will give you half an hour to find a missing comma in 10,000 lines of code. All this should be done automatically and corrected automatically. I also sometimes like to dig into the code without any tools - but at work this is an unacceptable waste of time.

After all my trial and error, I came to this conclusion - editor can use for development, but with an IDE, beyond a certain limit, it doesn't compare, and using an editor for something you're paid to do is a luxury. Yes, if you use the right development practices, design / document the code correctly, follow the standards, you can smooth out the inherent shortcomings of the editors. But we live far from ideal world, so using an IDE is a must, regardless of our desire.

The compiler converts source(files *.c, *.cpp) into a running program. If you don't have a compiler, you must install it before you start programming. There are many compilers available online for download. If you are Mac user OS X, Linux, or other *nix systems (like Unix or FreeBSD), you probably already have compilers installed, such as GCC or G++.

Basic concepts

Compiler- a program that translates the source (high-level) code of the program into the final (low-level) code.
Compilation- the process of converting a high-level source code program into the equivalent program text, but in a low-level language.
Linker(Linker) is a program that generates an executable module by linking project object files.
IDE(Integrated Development Environment) - A combination of a text editor and a compiler. Development, compilation and launch of your programs is carried out directly in the IDE. Integrated development environments simplify the process of writing programs, since writing code, compiling and running programs are performed in one program - an IDE. One more important feature IDE is that IDE helps to quickly find and fix compilation errors.

Understanding compilation processes

Compilation and linking processes − short description what exactly happens when you compile a program.
Compilation errors, in some lines the compiler finds errors that need to be eliminated.
Compiler warnings - what compiler warnings are, how and why they are eliminated.
What is the difference between declarations and definitions in C/C++. Learn the difference between a declaration and a definition in C/C++ and why it's so important.

Compiler Selection (IDE)

For Windows OS:
Code::Blocks with Mingw - recommended by us, free IDE! Code::Blocks is also available on Linux. You can see how to install this IDE in our article Installing Code::Blocks and MINGW.
Microsoft Visual C++ - Read about Visual C++. Guide Microsoft installation Visual Studio 2012

"Everyone was thinking when the moment would come when I would have to say in the style of" yes, I'm at your age! .. etc. ". And now ... This moment, most likely, has come. You, how You can see from your recent post that you are 16 years old and you position yourself as a young person who is interested in programming, either you are going to use Go for a large-scale web project or color scheme for the editor Sublime Text 3 to start programming, with one topic for day job, and the second - for the night. And all this in order, as you put it in the same post, in the near future again - to start writing in the golang language. Now the IDE itself is in question.

At your age, or rather, from the age of 12 and somewhere up to 16, I was sitting at home at the buzzing computer EC-1840, equipped with a black-and-white monitor "Electronics". There, believe me, there were no topics - neither night nor day. I'm not talking about the fact that the concept of "graphics" was reduced to algorithms for displaying simple geometric shapes, and practically, if I may say so, "per pixel". There were no fancy IDEs either, and Norton/Volkov Commander were considered the peak of UI ergonomics. Windows and GUI? No, they didn't.. There was MS-DOS in all its glory.

But then, my young friend, there were Borland TurboPascal, Borland C ++, Microsoft GW-BASIC and others - the simplest in the sense graphic shell(if the concept of such could be found there at all), but the necessary development environments under MS-DOS, thanks to which many became professionals without any nightly topics. Oh yes, I forgot to mention: there was no Internet then, and the answer to the question like "How to make it so that ..." could not be found with Google. And there were no books. Is that the book by V. E. Figurnov "IBM PC for the user" - almost the only bible of our generation and meager scans from the documentation that came with official versions the above programs and considered more valuable than gold.

As I already wrote to you, I know people (and many people know) who have been going to learn Java for years, but can not decide which is better - Eclipse or NetBeans. As a result, they remained in place, having learned absolutely nothing. And all because they looked at the process from the wrong side, clearly believing that the root of their misunderstanding of the basics of programming is associated with the use of an inconvenient IDE.

I wish you progress, and therefore I ask you: do not repeat the experience of losers and do not step on these worn-out other people's rakes. Learn and start programming, and leave topics for later.

Selection handy tool- one of the main tasks of the programmer. And first of all it concerns the development environment. IDE is different from simple editor code 4 things:

  • Support a large number programming languages. As a rule, everyone within the framework of the focus (web, mobile, desktop).
  • The presence of a compiler, an interpreter for converting creations into machine code.
  • Built-in utilities to automate the process: libraries, templates, snippets, etc.
  • Debugger to detect errors, typos and other dangers.

For a beginner in programming, an editor that uses 1-2 languages ​​may be enough, and it is better to catch errors in manual mode to see their effects.

But once you get on the path of "adult" development, you can't do without a good IDE. And it's good that it's free. Here is a selection of 9 subjectively the best:

NetBeans

Platform: Windows/Mac/Linux

Description: NetBeans is a cross-platform open-source IDE designed to run in Java, but supports Python, JavaScript, Ruby, C, C++, Ada, PHP, HTML, CSS, XML, Groovy. The environment allows you to work in all three areas of development.

Eclipse

Platform: Windows/Mac/Linux

Description: Another popular IDE that is not tied to the OS, and with the help of add-ons, supports up to 25 programming languages. In general, the number of included libraries makes Eclipse one of the most functional IDEs.

Microsoft Visual Studio Express

Platform: Windows

Description: truncated but free version visual studio. For a beginner, its capabilities are more than enough:

  • IntelliSense auto-completion system.
  • C/C++/C#/Python/Ruby/VB.NET/JavaScript/HTML/CSS/XML support.
  • Support for Git and TFS version control systems.
  • Integration with Azure.

codelite

Platform: Windows/Mac/Linux

Description: Cross-platform IDE for software development in C/C++, PHP and Node.js. Despite its minimalism, it will satisfy all the basic needs of the developer.

Code::Blocks

Platform: Windows/Mac/Linux

Description: 3 main features of Code::Blocks:

  • Support for a large number of compilers, including MinGW/GCC, Watcom, Clang, Digital Mars C/C++, and GNU GDB and MS CDB debuggers.
  • wxSmith's Rapid Application Development (RAD) tool.
  • wxWidgets core library simplifies development GUI in applications.

Qt Creator

Platform: Windows/Mac/Linux

Description: Qt Creator specializes in working with C, C ++ and QML, supports the same compilers and debuggers as Code:: Blocks. Works with everyone popular systems version control: Subversion, Mercurial, Git, CVS, Bazaar, Perforce.

Aptana Studio

Platform: Windows/Mac/Linux

Description: Without libraries included, Aptana can only work with JavaScript, HTML and CSS. Supports PHP, Python and Ruby with them. Aptana also connects to Eclipse as a plugin, which makes it even more useful for a beginner.

WebScripter

Platform:Mac

Description: WebScripter is a simple and understandable IDE for "apple" web developers. It has not been developed for 5 years, but the built-in editor, debugger and debugger are enough to start.

PSPad

Platform: Windows

Description: A code editor that supports over 30 programming languages, including COBOL and Pascal. It has the ability to connect an external compiler and debugger, which turns PSPad into a real IDE.

Some of the listed tools are only good for the first steps in development, but you don't have to spend a lot of time learning them. Others override the capabilities of most paid competitors, so they can become companions for life, but require a long development.

What choice did you make?

Writing in Python using IDLE or the Python Shell is quite handy when it comes to simple things, however, as projects grow in size, programming becomes a pain. Using an IDE or even a good code editor can make your life a lot easier. But the question is what to choose?

In this article, we will walk through the main tools that allow you to write in Python. We won't choose for you the best option, but consider the pros and cons of each and help you make an informed decision.

What is an IDE and code editor?

An IDE (or Integrated Development Environment) is a program designed to develop software. As the name suggests, an IDE brings together several tools specifically designed for development. These tools typically include an editor dedicated to working with code (such as syntax highlighting and auto-completion); build, run, and debug tools; and some form of version control system.

Most IDEs support many programming languages ​​and have many features, which can make them large, take a long time to download and install, and require in-depth knowledge to use them correctly.

On the other hand, there are code editors, which are text editor with syntax highlighting and code formatting capabilities. Majority good editors coders can execute code and use a debugger, and the best ones can even interact with version control systems. Compared to an IDE, a good code editor is usually lighter and faster, but often at the cost of less functionality.

Requirements for a good development environment

So, what do we need from the development environment? The set of functions of different environments may differ, but there is a set of basic things that simplify programming:

  • Saving files. If an IDE or editor doesn't give you the option to save your work and later reopen everything in the same state it was in when you closed it, then it's not such an IDE;
  • Run code from environment. Likewise, if you need to exit the environment to run code, then it's nothing more than a simple text editor;
  • Debugging support. The ability to step through the code is basic function all IDEs and most good code editors;
  • Syntax highlighting. Ability to quickly find keywords, variables, etc. makes reading and understanding code an order of magnitude easier;
  • Automatic code formatting. Any editor or IDE that actually does will recognize a colon after a while or for expression and automatically indent the next line.

Of course, there are many other features that you would not refuse, but the above are the main features that should have good environment development.

Now let's take a look at some tools general purpose, which can be used for Python development.

Editors and IDEs with Python support

eclipse + pydev

If you're close to the open-source community, then you've probably heard of Eclipse. Available for Linux, Windows, and OS X, Eclipse is the de facto open-source IDE for Java development. There are many extensions and addons that make Eclipse useful for different kind tasks.

One such extension is PyDev, which provides an interactive Python console and debugging and code completion capabilities. Installing it is simple: launch Eclipse, select Help → Eclipse Marketplace, then search for PyDev. Click "Install" and restart Eclipse if necessary.

Advantages A: If you already have Eclipse installed, then installing PyDev will be quick and smooth. At advanced user Eclipse will have no problem learning this extension.

Flaws: If you're just starting out with Python or development in general, Eclipse can be overwhelming. Remember we said that IDEs are big and require more experience to run. full use? All this can be said about Eclipse.

Sublime Text

Type of: code editor
Website: http://www.sublimetext.com

Sublime Text, written by a Google engineer with a dream of a better text editor, is quite popular editor code. Available on all platforms, Sublime Text has built-in support for editing Python code, as well as a rich set of extensions called packages that extend syntax and editing capabilities.

Installing an additional Python package can be tricky - all Sublime Text packages are written in Python, so installing community packages can often require running a Python script directly in the editor.

Advantages:in Sublime Text a large number of fans. As a code editor, Sublime Text is fast, lightweight, and well supported.

Flaws: Sublime Text is not free although you can use trial period as much as you like. Installing extensions can turn into another quest. In addition, the editor does not support debugging and running code.

atom

Type of: code editor
Website: https://atom.io/

Available on all platforms, Atom has been called "the hackable text editor of the 21st century." Atom is written using Electron, a framework for building cross-platform desktop applications using JavaScript, HTML, and CSS, and has many extensions. Python support can also be enabled using an extension that can be installed directly into Atom.

Advantages: support on all platforms thanks to Electron. Atom is lightweight and downloads and loads quickly.

Flaws: Build and debug support is not built-in, but added via extensions. Because Atom is written with Electron, it always runs as a JavaScript process, not as native app.

GNU Emacs

Type of: code editor
Website: https://www.gnu.org/software/emacs/

Long before the iPhone vs. Android war, before the Linux vs. Windows war, even before the PC vs. Mac war, there was an editor war with GNU Emacs as one of the warring parties. Described as "an extensible, customizable, self-documenting text editor," GNU Emacs has been around for almost as long as UNIX and has gained a lot of fans.

Available for free on every platform (in one form or another), GNU Emacs uses the Lisp language for customization. Of course, there are customization scripts for Python too.

Advantages: you know Emacs, you use Emacs, you love Emacs. Lisp is your second language and you know you can do anything with it.

Flaws: customization means writing (or copy-pasting) Lisp code into various scripts. If there aren't any, then you may need to learn Lisp to figure it out.

Vi / Vim

Type of: code editor
Website: https://www.vim.org/

On the other side of the editorial war is VI/VIM. Available by default on almost every UNIX system and Mac OS X, VI has won just as many fans. VI and VIM are modal editors that separate viewing a file from editing it. VIM includes everything that is in VI, plus some enhancements such as the availability of extensions. For all sorts of Python tasks, you can use VIMScripts.

Advantages: you are familiar with VI, you use VI, you love VI. VIMScripts don't scare you, and you know how to bend them to your will.

Flaws: as with Emacs, you're not very comfortable looking for or scripting to add Python development capability, and you don't have any the slightest idea how a modal editor should work in general.

visual studio

Advantages Note: As with Eclipse, if you already have Visual Studio installed for other tasks, PTVS will install without problems.

Flaws: as with Eclipse, Visual Studio is a bit much if all you need is Python. Also, if you're using Linux, you're out of luck - there's no Visual Studio for that platform.

Visual Studio Code

Type of: code editor
Website: https://code.visualstudio.com/
Python tools: https://marketplace.visualstudio.com/items?itemName=ms-python.python

Visual Studio Code (not to be confused with Visual Studio) is a full-featured code editor available on Windows, Linux, and Mac OS X. VS Code is an extensible open-source editor that can be customized for any task. Like Atom, VS Code is built on Electron, so it has the same advantages and disadvantages.

Adding Python support to VS Code is easy - search for "Python" in the Marketplace, click "Install" and restart the editor if needed. VS Code will automatically detect the Python interpreter and installed libraries.

Advantages A: Thanks to Electron, VS Code is available on all platforms with amazingly great functionality. In addition, the source code can be found in the public domain.

Flaws: if Electron is involved, then VS Code is not a native application. In addition, some people's religion prevents them from using Microsoft products.

Editors and IDEs designed for Python

PyCharm

One of the best full featured IDEs specifically for Python is PyCharm. Exists like free open source(Community) and paid (Professional) IDE options. PyCharm is available on Windows, Mac OS X and Linux.

PyCharm supports Python development directly out of the box - open new file and start writing code. You can run and debug code directly from PyCharm. In addition, the IDE has support for projects and a version control system.

Advantages: This is a development environment for Python with support for anything and everything and a good community. In it, out of the box, you can edit, run and debug Python code.

Flaws A: PyCharm may load slowly and the default settings may need to be adjusted for existing projects.

Spyder

Spyder is an open-source IDE for Python optimized for data science. Spyder comes bundled with the Anaconda package manager, so it's possible you already have it installed.

What is interesting about Spyder is that it target audience are data scientists using Python. For example, Spyder works well with data science libraries such as SciPy, NumPy, and Matplotlib.

Spyder has the functionality you would expect from a standard IDE, like a code editor with syntax highlighting, code completion, and even a built-in documentation browser.

A distinctive feature of Spyder is the presence of a variable explorer. It allows you to view the values ​​of variables in the form of a table right inside the IDE. Integration with IPython/Jupyter also works well.

About Spyder, we can say that it is more "down to earth" than other IDEs. It can be seen as a tool for specific purpose, not as the main development environment. What's great about it is that it's free, open-source, and available on Windows, macOS, and Linux.

Advantages: you are a data scientist who uses Anaconda.

Flaws: More experienced Python developers may find Spyder not functional enough to daily work and make their choice in favor of a more functional IDE or editor.

Thonny

Thonny is called an IDE for beginners. Written and maintained by the Institute of Informatics of the University of Tartu in Estonia, Thonny is available on all major platforms.

By default, Tonny is installed with the bundled version of Python, so you don't need to install anything else. Advanced users may need to change this setting in order for the IDE to find and use already installed libraries.

Advantages: You are a beginner Python programmer and you need an IDE with which you can immediately go into battle.

Flaws: advanced users will not have enough functionality, and they will replace the built-in interpreter. In addition, given the novelty of the IDE, there may be problems that can be solved on this moment no.

So which one to choose from?

  • Beginning pythonists should take something with the least amount of customization. The fewer obstacles, the better;
  • If you already use some editor for other tasks, then look towards code editors;
  • Well, if you already have an IDE for another language, then try adding Python support to it.

Are you also interested in the web? Then take a look at our similar one for web development.

Top Related Articles