Programming C on Linux-IDE vs. editor + command line

I have been looking for a similar question here and found nothing so if I already have an answer I apologize.

I am a beginner in C Programming and I would like to know if it is better to use an IDE for creating / editing the code, compiling and executing the code or if it is better to use a text editor of the notepad++ genre, compiling and executing the code through the Linux terminal.

At the identification level of error ' s and warning ' s which of these methods provides the most complete and secure information?

By compiling and executing the code through the terminal can we have a better perception of how the code works on the machine?

Author: Maniero, 2014-05-14

2 answers

Most of what I'm going to say is for any language. I'll make reservations when necessary.

I'm understanding that you'd like to see a comparison between a full IDE and the option to use a simpler code editor with command line tools.

In some languages the IDE helps a lot. These languages were even conceived with the idea of aid of an IDE in mind. In C this occurs less. Not least because less object-oriented languages often have a little less advantages when using an IDE.

I don't think it makes any difference being on Linux or another operating system. But Linux has a culture of using simpler tools, preferring the command line. This can influence the decision.

Developer Experience

  • Novice programmers tend to use an IDE because it facilitates most tasks, is intuitive, and helps to learn little by little. The great asset of a IDE is help to do the same things easier.

  • More experienced programmers who are also more hardcore are divided between those who like IDE and those who prefer a more simplified, more objective solution without intermediate layers.

Editors + command line

These programmers like to have more control over everything he is doing. They want little interference in their work. The communion of a simpler editor, like the one you and other members have already cited or a VIM or Emacs, just to name a few, with the "RAW" development tools make them more productive, which is ultimately what matters.

Some of these editors are not that simple, They can be considered almost IDEs. Many are so configurable and programmable that the integration of the development tools themselves they're practically part of them.

I will not go out citing examples of editors because it provokes holy wars. Everyone thinks that what he uses is the best.

Integration

Not always the integration of these editors with the tools (compiler, debugger, profiler , disassembler, etc.) are good. This is a reason to think about whether or not to choose an editor. Integration helps a lot, although it is not tragic to be without it.

In some cases you'll have to configure a lot to use the editor well, but luckily for C, most editors already have good Settings.

What can be more complicated is integrating debugger, probably the feature that most programmers will miss most from having something well integrated.

With respect to the compiler, receiving warnings and errors is usually quite easy to integrate into most of these editors. So you can have this information in the editor (which is reasonably configurable) without problems, including making it easier to go to the indicated error location.

If you don't have this integration, it's not a big deal either. Many programmers find it more productive to use these tools independently as a command line in the console.

IDE

A full IDE can be advantageous especially if it already has specific tools for the language in question.

An IDE is not limited to the aforementioned tools and code helpers (hightlight syntax, code completion, Help inline , etc.), which publishers also often have to a greater or lesser degree.

With an IDE you also have project management and build (build) of the application, extra static analysis, refactoring tools, complex searches, easy navigation, code generators, viewers of the application. code Organization , etc.

As these IDES are often made or adapted specifically for a given language they have more suitable tools that can go a little further than a simple editor can achieve.

Helps but doesn't do magic

But don't think an IDE will do magic. Especially in C. and always remember that even if in practice it is a slightly easier way to develop software, the simplest tools can do everything that you need, it will only be in a different way.

You will rarely have any additional information in an IDE. The opposite is no longer true. Since IDEs rely heavily on "raw" tools, nothing guarantees that everything you have in the tool is available in the IDE. Of course, a good IDE will provide you with everything that is important, it just won't guarantee the darkest things, the latest debugger news the next day.

You Can perceive / understand better with an IDE because it is more visual, it has more ways of presenting information, it has everything else at hand. But it depends on each person, it depends on the style that the person adopts, how well he knows the various tools.

Minimizing one of the IDE problems

An IDE that uses the mouse too much changes the context of hand work. If you have to switch from the keyboard to the mouse at all times, it can become tiring or unproductive. But there are those who get used to it well it. The general recommendation is to minimize or eliminate the use of the mouse

Disadvantages

One of the main disadvantages of an IDE is its "weight". In general these applications are large and relatively slow. They require very modern machines to run well. Some are boring to leave the way you want and it is a type of application that tends to break with a greater frequency than normal, even due to the intimacy that it has with your application.

Making the caveat that I don't take it so literally, I question the programmer who is no longer a novice who can't program without an IDE helping. I also do not say that the good programmer needs to move away from a good IDE to prove something.

If IDE was certainly advantageous in all cases, 100% of programmers would use one.

Debugging

If your last question is about following the execution step by step, it's usually easier visually do this in an IDE. But nothing that is impossible in some publishers. If you want to see the instructions being executed by a disassembler, it's easier to see in an IDE. But you see everything in a command line disassembler as well.

Conclusion

Answering a part of your original question, all editors have technical advantages and disadvantages, but you should also look at what you like the most, which one feels the most comfortable.

How to choose

Ideally you should choose an editor or IDE and stick with it for all the languages you use. The better you know how to use a tool, the better you will explore it and the better results will be obtained.

You will only know for sure what is good for you by testing. You have nothing to lose, every experience is valid. Random people on the internet can not say what is good for you.

Do you like using command line? Sixth you okay with that? Do you often have multiple tasks in console? Or do you prefer a visual environment with everything one or two clicks away?

It seems that the answer is that the taste and existing background is more important than the advantages of each. In the absence of a reliable metric, a study that indicates that one side is better than the other, I will rely on feeling.

Career moment

C is one of the most suitable languages for a simpler solution that an IDE. But a novice will suffer quite a lot only on the command line. On the other hand it is the only way for the programmer to gain experience with everything that may be needed. No one will become a good developer in C by giving multiple clicks on a GUI. It is the paradox of the egg and the chicken. That goes for anything in programming. It would be better: learn the most concrete way, lower level and understand everything how it works and then learn the facilities, or it is better to go straight to the most abstract, what has more layers hiding the hard part, not giving you the correct and complete foundation?

Style

If I had to summarize the answer I would say that both solve the same problem with similar quality through different styles .

Didn't help much? That was the intention. There is no way to give a definitive answer, just a guide for you to find the best solution for you. Maybe that's why no one wants to answer.

I put in the GitHub for future reference .

 17
Author: Maniero, 2020-09-02 17:46:06

Maniero's answer is excellent in my opinion.

The question is indeed subjective and how is open post this answer to a add my two cents regarding the use of IDEs vs text Editor to start in C.

I am also a beginner in C, for my learning each one had a special importance, briefly:

Text editors had their initial contribution as they allowed to understand the basics that by writing the code in a simple text and then running a compiler, you have an executable program.

Now The IDEs had a wider role, in the IDEs (first the Eclipse) it was possible to see and understand the broader code structure, better understand the headers, the imports the conditions in the preprocessor and the errors in the compilation.

All because Eclipse colors the syntax, shows the links, shows what was included or not in the code and points out the errors.

Finally, there is an IDE and a series of tutorials that played a fundamental role for the better understanding of programming in C: the IAR Embedded Workbench, it is aimed at the programming of ARM microcontrollers and allows running simulations by viewing the memory and the code "decompiled" in Assembly. And this is fantastic because you see in real time, for example, what happens on the machine when you put a value in a variable, when you use a pointer, what happens when you run a loop , etc.

It may seem complicated but there is a series of tutorials that explains step by step the whole process teaching how to program in C using IAR to see the results.

As an example, with the use of this tool and the tutorial it was possible to quickly understand, in 12min precisely:), one of my biggest doubts, the basics of what they are and how the pointers work.

So, I believe that to start, it is necessary to go through several tools, editors, IDEs. Then with the experience you decide what you like the most and what meets your needs.

Running away from C, I have been a Python programmer for 5 years, at least in Python I see that certain projects gain such breadth in complexity (code size, number of files, team collaboration, etc.) that it is very difficult to manage only with text editors, so my choice, due to professional need, are IDEs. (But I can't deny that edit code in VIM is a lot of fun :)).

 6
Author: Pablo, 2017-10-31 15:16:09