64

so as per one of my previous questions, I'm brushing up on my C skills.

My question is, what do people use for developing C?

Lots of people use Emacs, and have done so for years, but is it better to learn emacs than just use an IDE such as Geany or KDevelop?

Would also be interested to hear from those still using emacs, and why they use it over other apps?

Please note that I'm only really interested in the free IDEs / editors.

EDIT:

Thanks for posting links which answer some of my questions, but I guess what I'm really wondering about is:

Whether learning to edit using emacs / vim and compiling / debugging using the gcc-toolchain is worth it instead of just using an IDE, and why?

What are peoples reasons for not migrating to an IDE?

Has anyone moved from terminal-centric development to IDE development, and why did they move?

pnuts
  • 58,317
  • 11
  • 87
  • 139
Matthew Rathbone
  • 8,144
  • 7
  • 49
  • 79
  • I don't believe you can get an answer of any real value to this question. You will get a) personal preferences of a few people b) feature lists or highlights. You stated you were only interested in the free ones. Download a few, try them out, choose the one that's best for you. – Tomas Andrle Sep 27 '12 at 19:36
  • In future, try to make it clear in your question that you want a C editor/IDE AND ABSOLUTELY NOT A C++ EDITOR BECAUSE THEY'RE NOT THE SAME. – Miles Rout Jan 01 '13 at 00:24
  • 3
    I downloaded the eclipse version for C and C++. It was the same. – wobbily_col Nov 11 '13 at 09:17

10 Answers10

63

I started off by using IDEs, Microsoft or not. Then, while working on QNX some long time ago, I was forced to do with a text editor + compiler/linker. Now I prefer this simple combination––a syntax highlighting editor + C compiler and linker cli + make––to any IDEs, even if environment allows for them.

The reasons are, for me:

  1. it's everywhere. If you program in C, you do have the compiler, and usually you can get yourself an editor. The first thing I do––I get myself nedit on Linux or Notepad++ on Windows. I would go with vi, but GUI editors provide for a better fonts, and that is important when you look at code all day

  2. you can program remotely, via ssh, when you need to. And it does help a lot sometimes to be able to ssh into the target and do some quick things there

  3. it keeps me close to CLI, preferably UNIX/Linux CLI. So all the commands are on my fingertips, and when I need them I don't have to go read a reference book. And UNIX CLI can do things IDEs often can't––because their developers didn't think you'd need them

  4. most importantly, it is very much like seeing the Matrix in raw code. I operate files, so I'm forced to keep them manageable. I'm finding things in my code manually, which makes me keep it simple and organized. I do Config Management explicitly, so I know when I'm synced and how. I know my Makefiles because I write them, and they only do what I tell them to

    (if you wonder if that works in "really big projects"––it does work, and the bigger the project the more performance it gains me)

  5. when people ask me to look at their code, I don't have to learn the IDE they use

Community
  • 1
  • 1
n-alexander
  • 14,663
  • 12
  • 42
  • 43
  • hey, thanks for the great answer. I suppose it forces you to actually learn the libraries too. Thats one stumbling block for me, I don't know what parameters all the funcitons should take, so by just using an editor I'll need a reference book next to me at all times which will slow me down. – Matthew Rathbone Mar 06 '09 at 11:30
  • 25
    What about a debugger...? – Jimmy J Mar 06 '09 at 12:24
  • 4
    @rathboma: that's what windows are for: one for your editor, other for your documentation – Javier Mar 06 '09 at 12:31
  • If it's a great answer, you should accept it as your answer :-) – Stefan Thyberg Mar 06 '09 at 13:58
  • @rathboma, you might also want to get familiar with 'man'. At least the functions of the core libraries can be reached with: 'man 3 *function name*'. – Tabitha Mar 07 '09 at 01:41
  • 3
    You can have nicer fonts in gvim, while also being able to view unicode characters, as opposed to nedit. – Alexander Jun 01 '11 at 13:07
  • 6
    @JimmyJ just use GDB on console – xis Jun 27 '12 at 18:45
  • 2
    what about debugging? how do you step through code ? –  Feb 27 '14 at 19:55
  • 3
    Debugging is what gdb is for! It's amazingly powerful and lets you do pretty much anything – Dylan Gattey Mar 03 '15 at 05:15
34

I've moved from a terminal text-editor+make environment to Eclipse for most of my projects. Spanning from C and C++, to Java and Python to name few languages I am currently working with.

The reason was simply productivity. I could not afford spending time and effort on keeping all projects "in my head" as other things got more important.

There are benefits of using the "hardcore" approach (terminal) - such as that you have a much thinner layer between yourself and the code which allows you to be a bit more productive when you're all "inside" the project and everything is on the top of your head. But I don't think it is possible to defend that way of working just for it's own sake when your mind is needed elsewhere.

Usually when you work with command line tools you will frequently have to solve a lot of boilerplate problems that will keep you from being productive. You will need to know the tools in detail to fully leverage their potentials. Also maintaining a project will take a lot more effort. Refactoring will lead to updates in make-files, etc.

To summarize: If you only work on one or two projects, preferably full-time without too much distractions, "terminal based coding" can be more productive than a full blown IDE. However, if you need to spend your thinking energy on something more important an IDE is definitely the way to go in order to keep productivity.

Make your choice accordingly.

Anders Hansson
  • 3,746
  • 3
  • 28
  • 27
15

Emacs is an IDE.

edit: OK, I'll elaborate. What is an IDE?

As a starting point, let's expand the acronym: Integrated Development Environment. To analyze this, I start from the end.

An environment is, generally speaking, the part of the world that surrounds the point of view. In this case, it is what we see on our monitor (perhaps hear from our speakers) and manipulate through our keyboard (and perhaps a mouse).

Development is what we want to do in this environment, its purpose, if you want. We use the environment to develop software. This defines what subparts we need: an editor, an interface to the REPL, resp. the compiler, an interface to the debugger, and access to online documentation (this list may not be exhaustive).

Integrated means that all parts of the environment are somehow under a uniform surface. In an IDE, we can access and use the different subparts with a minimum of switching; we don't have to leave our defined environment. This integration lets the different subparts interact better. For example, the editor can know about what language we write in, and give us symbol autocompletion, jump-to-definition, auto-indentation, syntax highlighting, etc.. It can get information from the compiler, automatically jump to errors, and highlight them. In most, if not all IDEs, the editor is naturally at the heart of the development process.

Emacs does all this, it does it with a wide range of languages and tasks, and it does it with excellence, since it is seamlessly expandable by the user wherever he misses anything.

Counterexample: you could develop using something like Notepad, access documentation through Firefox and XPdf, and steer the compiler and debugger from a shell. This would be a Development Environment, but it would not be integrated.

Svante
  • 50,694
  • 11
  • 78
  • 122
  • 7
    emacs is integrated like the stones are integrated with the mortar in an etruscan ruin. Seriously, emacs is the first thing I start in the morning, but to call it an integrated IDE? Not unless you are an elisp magician. – Cheeso Mar 09 '09 at 06:17
  • 12
    You don't have to be an elisp magician yourself. You can just use what others have made. For example, try to compare SLIME (superior lisp interaction mode for emacs) with a Lisp-mode (or is it called plugin?) for Eclipse. – Svante Mar 09 '09 at 12:47
10

I have used Eclipse with the CDT plug in quite successfully.

fluffels
  • 4,051
  • 7
  • 35
  • 53
  • 1
    Me too, Eclipse can however be quite "demanding" at first. But it is well spent effort learning though. – Anders Hansson Mar 06 '09 at 11:43
  • 4
    I never felt comfortable with CDT. Can't put my finger on it. It was weird doing C in an Eclipse environment. – Yuval Adam Aug 22 '10 at 13:46
  • The learning curse is too steep, and, IMO, is not really justified. Learning to use GCC and pkg-config was far faster. – WhyNotHugo Jan 21 '11 at 07:36
  • @YuvalAdam: Well, writing C code in a Java environment should feel a bit odd, no? It's like wearing a tailor made suit, to go to work at a rubbish tip. To me C in Java env feels a bit like a whisky-shop in a kindergarten, or playing Schubert's quintet in C major for the hearing impaired... totally out of character, and a waste... – Elias Van Ootegem Dec 01 '13 at 14:06
  • For the record, I no longer support this option. Eclipse has become very unstable for me. CDT especially. – fluffels May 18 '15 at 07:58
5

Netbeans has great C and C++ support. Some people complain that it's bloated and slow, but I've been using it almost exclusively for personal projects and love it. The code assistance feature is one of the best I've seen.

Josh Rieken
  • 2,256
  • 1
  • 19
  • 23
  • I really enjoyed Netbeans when I programmed in Java. I'd appreciate the uniformity of IDE too. –  Sep 03 '10 at 15:12
  • In the past I've found Netbeans and Komodo Edit similar in functionality with Netbeans heavier/slower. – Chinasaur Sep 02 '13 at 17:58
5

Emacs would be better if it had a text editor in it... :-)

Jimmy J
  • 1,953
  • 1
  • 14
  • 20
5

Use Code::Blocks. It has everything you need and a very clean GUI.

soulmerge
  • 73,842
  • 19
  • 118
  • 155
3

How come nobody mentions Bloodshed Devc++? Havent used it in a while, but i learnt c/c++ on it. very similar to MS Visual c++.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
santo101
  • 125
  • 1
  • 6
1

If you are looking for a free, nice looking, cross-platform editor, try Komodo Edit. It is not as powerful as Komodo IDE, however that isn't free. See feature chart.

Another free, extensible editor is jEdit. Crossplatform as it is 100% pure Java. Not the fastest IDE on earth, but for Java actually very fast, very flexible, not that nice looking though.

Both have very sophisticated code folding, syntax highlighting (for all languages you can think of!) and are very flexible regarding configuring it for you personal needs. jEdit is BTW very easy to extend to add whatever feature you may need there (it has an ultra simple scripting language, that looks like Java, but is actually "scripted").

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Mecki
  • 125,244
  • 33
  • 244
  • 253
-1

If you're on Windows then it's a total no-brainer: Get Visual C++ Express.

Jimmy J
  • 1,953
  • 1
  • 14
  • 20
  • 2
    Why? This doesn't really contribute anything. – WhyNotHugo Jan 21 '11 at 07:23
  • 5
    In the previous decade, I would have agreed with you. However, alternative IDE's have improved. Eclipse, NetBeans, Code::Blocks, Emacs for Windows and last but not least: Qt Creator. In addition to this, other platforms than Windows have grown hugely in importance, from OS X and Linux (Ubuntu, embedded or server) to iOS and Android for mobile devices. To paraphrase your statement, it's not a "total no-brainer" world any more. Even if you're on Windows, you may have to develop for other platforms as well (or make it possible), and you certainly don't have to choose Visual C++. – Alexander May 19 '11 at 13:06
  • 2
    Visual C++ does not support modern C standards. It is a C++ IDE primarily, not well suited for C development. – Alex Mar 15 '13 at 09:06
  • 1
    Installing a free version of Visual C++ has been a total nightmare for me in the past; I gave up. There's an installer, then you have to find the secondary patch installer that fixes the things that are borked in the standard installer (MS: why not replace the F'ed up installer with a good one?). It's throwing binaries and libraries all over in random places and getting itself confused (not to mention you). This was the final straw that made me give up on Windows. – Chinasaur Sep 02 '13 at 18:00