Editors, IDEs, compilers, and other good stuff

Soapbox Sermon

This page is primarily aimed at the perennial question in comp.lang.* newsgroups, "what [compiler | editor | ide] should I use?" The first thing to do, even before posting this frequently asked question, is to get the FAQ for that particular newsgroup and read it. Just having it spinning on the harddrive doesn't count. The maintainers of these FAQs usually have a good grasp of what particular tools are currently available.

That said, I will throw out a few thoughts that may aid your selection. Languages and platforms come. Then they go. Java or C++ is not the final word anymore than progress halted with Fortran IV, my first language. The children of Windows* and Linux will survive, but after a decade of change, today's hot environment will be as relevant as OS360.

What does this mean to you as a budding programmer? If you get Captain America's WhizBang RAD IDE, and learn to use it productively, I can almost guarantee it will be OBE in a few years. That's 'Overtaken By Events', meaning you will either be learning your way around a completely different IDE, or Cap America will change his to be almost unrecognizable. Or you will want to try out the hot new language, Lemonade, and that old Java IDE won't even open .lemon files.

So, what's a hacker to do? There is a funny thing; go pawing around your IDE, usually in some dusty directory called 'bin', and you'll usually find some kind of compiler, linker, loader, make utility, and so forth. Even across languages and years, these basic tools are very similar. Sure, some want their command line parameters set off with '/', and others favor '-', but if you learn the syntax for one, the next one will usually require just a brief dip into the docs to scope out how it works. Sure, it is crusty old command line stuff, and you can't drag a source file onto the compiler with the mouse, but they do work. A few years back, if you wanted to be on the cutting edge of Java, you had to figure out grotty stuff like command line invocation and setting environment variable. I can still hear the whining.....

OK, perhaps you will eschew the glittering IDE. What now? Meet the programmer's best friend, the editor. There are lots of them, and there is a high level of religious warfare amongst the true believers. Funny thing about most of them too; there are only a few major strains of editors, when you get right down to it. What you should be looking for as you are kicking tires is longevity, features, and portability.

Longevity is important. Find a good one, and keep it through thick and thin. You can use it for Java today, Perl tomorrow, and Motorola assembler when the moon is full. If an editor has been around for a long time, it means it is good enough to generate a loyal following, will be actively maintained, and has acquired a lot of different toolsets over the years. It won't fade away and die when the author gets a paying job in Redmond.

As far as features, after you've used a real editor, those puny little things that live in IDEs will seem a joke. Syntax coloring, class or function browsing, macros, extensibility and customization, it is all there. For any popular language, all the work will have already been done for you. If, as you get into it, you don't like some features, a good editor will allow you to modify just about anything. You should be able to run the compiler of your choice from within the editor, capture the errors, and hit a key to see the offending code. Just like New York. Don't like javac? A good editor will let you use jikes or jvc without a lot of backchat.

And, finally, portability. Like any good friend, you'll want to take your editor everywhere you go, or at least find it's twin when you get there. Trust me here. There is nothing like being a contract programmer, walking into a new client's shop, and find all that is on their system is ed. Ruins your day. You want an editor that has been ported to as many platforms as possible. It is even better if you have the source. Maybe you can find the C compiler on that Slurbix A401 system and get most of your old friend running.

Oh, yeah. Price. Dad used to say something about buying cows when milk was free. Certain large software companies might have you by the shorts when it comes to word processing software for an ever changing proprietary format, but a programmer's editor is nice, simple, straight text. And the best ones in life are free.

To summarize my rant, skip the RAD stuff, learn to use the basic tools for the language be it Java or HTML, and get an editor that will last and will work on Unix, Windows, DOS, MacOS, OS/2, and so forth. You will be learning basics that will last a lifetime. Cross platform portability is an elusive goal. You can ease the strain by making yourself into a cross platform programmer. Like any other craft, get the best tools you can and learn them well. Beware the facile promises of the Hexenmeistern.



Using the above criteria, I'm going to narrow the field down quite a bit. The three editors I'll mention are my preferences. Each are exemplars of a particular environment. By that, I mean there are plenty of workalikes, copies, modifications, simplifications, and so forth, but these seem to be the basic flavors. Other variants like Epsilon and Brief are around in some form or the other, but most of the ideas have cross-pollinated by now.



This 'editor' defines the term 'creeping featurism'. Been around forever, has been ported to every platform this side of Mars in some form or the other, can emulate most other editors after a fashion, and plays a hell of a game of gomoku. It is completely extensible in it's own flavor of Lisp. There are addons, such as the JDE, that really take the sting out of working with the JDK for beginning programmers.

On the downside, it is a large distribution. It can be quite daunting to the beginner. You know you're in deep ordure when the help system has its own help. Even when you get a little familiarity, it takes a whie to train your fingers to do the multiple keystrokes a lot of commands require.

To be upbeat, in the last few years emacs has made excellent use of GUIs. Most flavors have menus, work with mice, and all those other features that are now the baseline. Most recently, customization dialogs have made it a lot easier to do what you want. And then there is mule....



Vim, like emacs, comes from the Unix community, and, like it, has a number of mutations including Elvis. Vim itself is an improved vi. It is a good deal smaller than emacs, and doesn't tell your fortune. It, too, has grown a visual interface over the years, though it can still be used very effectively with just a keyboard. It is extensible, and its scripting language is a little easier to cope with. There is a very active group of users, and many add-ons and customization scripts are available. This one is my personal favorite.



PFE fails some of the tests. It is a Windows application, and isn't portable. It is the work of one author, and the source is not available. It does not have the cult following of the other two. What it is, is a damn good editor that maintains all the conventions of the DOS editors of the past. If you've used any of the MS or Borland editors in the path, the only learning curve will be as you make use of the extended features available here.

If none of the above sound attractive, look here for some more options.


C/C++ Compilers

I apply the same criteria to compilers as to editors. Portabilty is a real plus in this arena. The handsdown winners come from the GNU project. gcc, for instance, has been ported to numerous platforms. As long as you restrict yourself to ANSI/POSIX code, this is as portable as it gets. As a plus, there are whole suites of related tools, including Pascal, Fortran and Ada compilers, and jsut about the whole gamut of gnu/linux tools. For Linux users, this is where it's at. For DOS/Windows people, there are several choices.



This is the gcc port to DOS. As such, it is a true 32bit protected mode system. There is provision to do 16bit work, but this is not its true strength. What this port has going for it is some of the best documentation going for a freeware project, and a large and active user community. It has been used for commercial applications, and is very robust. Much of the release is under the GPL, but I'll stress again: there is not a problem using this for commercial purposes.

Don't let the DOS part fool you. It will run under Windows, has LFN support, and is a fine tool for console app programming. In addition, add on packages are available for Windows programming. The Allegro package is very popular among game developers, and has its own support community. An IDE, rhIDE, is available if you simply can't live without training wheels. The djgpp home has a wizard that will allow you to determine just what modules you need, so you will not need to download features you will never use. This can make installation a little trickier than a one button setup program. Be sure to read the aptly titled 'readme.1st' file, and the excellent faq. If all else fails, try the newsgroup. You can't go wrong with this choice for C/C++ programming.



Cygwin is a very similar package. What Cygwin brings to the table is an emulation of the Unix environment on Windows. If you have a Linux background, this will be very comfortable. If you are coming from the DOS/Windows world, go for DJGPP. It does have a one shot, self-installing download, which may be preferable if you are not too comfortable with setting up software.



Cygwin and djgpp have traditionallly been gcc ports. In the GNU world, the ecgs project was the 'experimental' version. This cut both ways. Being constantly under development, it could be a bit buggy. On the other hand, it was the most up to date version, and would often offer better support for templates, STL, and other changing parts of C++ long before g++ caught up. Mingw32 started as egcs port spliced onto Cygwin. Currently, Mumit Khan has made it much easier to download and use. If you need the gnu tools, those still come from Cygwin. Otherwise, this functions very well by itself. For C++ programming, this is the most robust package. It is also very easy to use for Windows apps. The documentation and user support isn't up to djgpp yet, but this is the choice for C and C++ Windows programming.



Lcc is a little different; it derives from the lcc retargetable compiler project, rather than gcc. It is also a very professional, easy to use package. It is an easy download, and sets itself up. The IDE comes with it, and is a high quality piece of work. Jacob Navia, working alone for the most part, has made this into a tool that is every bit as good as DeveloperStudio as far as ease of use. It is not a C++ compiler. If want to work in C alone, and especially if you are interested in Windows programming, I recommend this.


Pacific C

OK, you've heard about C, and would like to try it out. You don't want a multi-megabyte download, or a lot of confusing options. You just want something you can download in a few minutes, setup, and start typing in examples from 'C for Dummies' and not get screwed by a lot of strange little switches and stuff. Here it is. Go for it. Still not convinced? Here are some more options



If you want to do any i86 assembler programming other than a few inlines in a C program, you will find out about a little gotcha with GNU derived tools in short order. They all use AT&T syntax. Nothing wrong with that, but if you come from an Intel background, the least of the problem is that it is ass backwards in syntax.


Enter Nasm. Not only will this allow you to write your code it the normal fashion, it has some improvements that resulted from taking a long, rational look at TASM and MASM. Each of these have their own idiosyncracies, some of which are hold overs from 16bit segmented programming. NASM is an attempt to make things a little more logical, and I think it succeeds well.



My KISS philosophy winnows out a lot of the Java tools currently available. Forget any of the major RAD IDEs. Most are huge, slow and buggy. Many tie you into proprietary classes if you use their visual layout tools. Others just emit reams of arcane code which will be a real pain when you try to modify it by hand. And you will. There are a couple of lightweight IDEs, Kawa and JPadPro, but they are commercial, albeit, inexpensive applications. Better you should spend your time learning to deal with the raw JDK. If you want a genuine Java editor, you might want to give jEdit a try. Best of all, it is actually written in Java, and may even be portable.

As far as packages go, there only are two real contenders, Sun's JDK, and Microsoft's SDK 4.0. In as much as Java is portable, which is not very, and you want to have soemthing that relates to the bulk of the newstand books and mags, let alone the 'net references, Sun has to be the choice. As far as JDK1.1.7 versus JDK1.2 (aka 2.0), take your choice. If you are thinking about a commercial app, or even something you want to deploy on a personal webpage, go for 1.1.7, and stay away from Swing.

You do want to do yourself one favor. Take javac out for a long walk and loose it in a bad part of town. Go to the IBM alphaworks site and get jikes. Shop around while you are there, too. IBM has been surprising me, for better or worse, for thirty years or so. This time it is a good surprise; they seem to be doing so extremely competent Java work. This site also has the ADK, which is purported to allow Java to run and be developed under Win3.1. I had problems with it several years ago, but I assume this is a stable package now.

return to the Software page