views:

3853

answers:

11

Hey,

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?

+1  A: 

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

Jimmy J
As a Vim user I dont uderstand you. Can you explain more?
Tim Matthews
+1Yeah, proper editor, like vim!Let the holy war begins!
qrdl
It actually has one. I think you can press META-CTRL-LEFT_ALT-Q+R+W to bring it up!
Subtwo
+2  A: 

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

soulmerge
+4  A: 

You can take a look at these questions

what is the best free windows c++ IDE/compiler

Which IDE is best for C++ ?

C++ IDE for linux

They all about IDE for C++ but I suppose we could regard an IDE for C as a subset of IDE for C++.

Serge
@Serge - Do these work well for C? What do you use?
Matthew Rathbone
@Rathboma - I'm not familiat with all these IDEs but since you can do anything in C++ which you can do in C therefore you should be comfortable with any good C++ IDE. I use emacs on linux and Visual C++ on Windows, I've some expirience with Code::blocks it's also good and it's crossplatform.
Serge
@Serge: that is incorrect. You cannot do anything you do in C++ in C.
Yktula
@Yktula - I've never said that, we talk about IDEs not languages
Serge
Well then, I misinterpreted what you said. Sorry! However, I do often find that some IDE's supporting C++ (i.e. Eclipse CDT) often bug me with C++-specific features, but many (i.e. Geany) don't.
Yktula
A: 

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").

Mecki
+6  A: 

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

Jimmy J
+4  A: 

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

fluffels
Me too, Eclipse can however be quite "demanding" at first. But it is well spent effort learning though.
Subtwo
I never felt comfortable with CDT. Can't put my finger on it. It was weird doing C in an Eclipse environment.
Yuval A
+6  A: 

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
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
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
+9  A: 

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 xli 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 synched 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)

  1. when people ask me to look at their code, I don't have to learn the IDE they use
n-alexander
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
What about a debugger...?
Jimmy J
@rathboma: that's what windows are for: one for your editor, other for your documentation
Javier
If it's a great answer, you should accept it as your answer :-)
Stefan Thyberg
@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*'.
Wergan
+1  A: 

PIDA, the one true IDE *.

* there may be others.

Ali A
I don't know about "one true IDE", but that actually looks quite interesting. Thanks for the link!
Andy
Just using sensationalism as a tactic! I will edit.
Ali A
+1  A: 

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.

Subtwo
+1  A: 

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.

jrfactotum
I really enjoyed Netbeans when I programmed in Java. I'd appreciate the uniformity of IDE too.
Shiftbit