Slashdot Mirror


Programming Tools You've Used?

crazy_speeder asks: "I'm looking for programming tools for the whole development cycle, including documentation. The project I'm working on will use C++ and Java. What has been your experience using tools like C++ Builder, Netbeans, Eclipse, JBuilder, Doxygen, ClearQuest, Rational Rose, g++, and any compiler, debugger, or IDE that you may have used. I need tools that will handle auto documentation, unit testing, design, file editing, and the like. As far as platform goes, Linux is the target OS while Linux or Solaris will be the host OS."

24 of 179 comments (clear)

  1. Sutff I use by pauljlucas · · Score: 2, Informative
    C++: vim, GNU make, g++, doxygen. AFAIK, there's no good, freely available C++ IDE for Linux/BSD/Solaris. (On Mac OS X, there's Xcode.) You can pretty much auto-do anything with GNU make. It's far more powerful than vanilla make.

    Java: vim, GNU make, javamake, javac, javadoc, IntelliJ IDEA.

    --
    If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
    1. Re:Sutff I use by Otter · · Score: 4, Informative
      AFAIK, there's no good, freely available C++ IDE for Linux/BSD/Solaris.

      KDevelop

    2. Re:Sutff I use by Tr0mBoNe- · · Score: 2, Informative

      Eclipse is great. I use it for my Java, and just started with C++ and C in that. There are plugins for all major languages which you can get on the eclipse site. Doxygen is great for creating cool UML diagrams or documentation for the code. The GNU compilier tools are great and make is where it's at.

      For java, once you have your desired runtime lib installed its all gravy...

      vi, vim, nano, emacs, whatever you want to use, it should be up to the programmmer. I would also ask your staff what tools they want to use and what they feel would make them be the most productive.

      cheers

      --
      while(1) { fork(); };
    3. Re:Sutff I use by Noksagt · · Score: 2, Informative

      Anjuta is also nice.

  2. Eclipse by Profane+MuthaFucka · · Score: 2, Informative

    Eclipse will work for your overall environment. For documentation, use Doxygen. Stick with gcc for the compiler.

    Use SIMPLE makefiles; don't make multi-nested monstrosities if you can help it. Seriously, simple makefiles and absolutely NAILING the build procedures up front will save you a hunk of time. The user should be able to type 'make' and build the whole system, if at all possible. Don't make them jump through hoops. Don't let people change makefiles without review.

    Don't rely on Rational Rose too much, or you will have a pretty demo, but nothing running on anything else other than a slide projector.

    Use cvs for your version control. Get a bug tracking system that you can use to smoothly promote code along from devel to test to system test to staging to release to retired.

    Beyond that, don't spend too much for tools. If you find something you need, cool. But don't add tools just because you can.

    --
    Fascism trolls keeping me up every night. When I starts a preachin', he HITS ME WITH HIS REICH!
    1. Re:Eclipse by hey! · · Score: 3, Informative

      I've looked at both subversion and cvs.

      I think subversion is fundamentally better, but cvs is more mature and has better support in tools. There are subversion versions of everything you need, but when I've looked at them they've always been a bit more squirrely than their CVS counterparts.

      It's enough that I'm holding off on converting my company's stuff from cvs to subversion. If I were starting from scratch, I'd go with subversion.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  3. Re:Stuff I use by pauljlucas · · Score: 2, Informative
    KDevelop
    OMG! Thanks for the pointer. :-)
    --
    If you reply, do so only to what I explicitly wrote. If I didn't write it, don't assume or infer it.
  4. Jikes by mechsoph · · Score: 3, Informative

    Nobody's mentioned Jikes yet. It's an open source (CPL) java compiler from IBM. It's written in C and is significantly faster than javac which runs in the vm.

    If you want your java code to run on the vm, jikes may be a good idea. If you want native java code, then there's also gcj .

  5. Re:Don't write C++ without boost! by Unordained · · Score: 2, Informative

    As I happen to have been reading up on them recently ... (we -did- code in C++ without Boost, and have done just fine so far, but felt it might be handy for a few odd situations)

    auto_ptr is pretty much equivalent to Boost's scoped_ptr: it just makes sure that when the -1- pointer to your object goes out of scope, the object is deleted. this is good for securing objects around try/catch blocks or early returns, where you would have to manually plan for each possible exit and code your deletes appropriately. these are not safe in STL containers, which copy values around. you'll wind up having a pointer go out of scope and delete your object.

    shared_ptr is reference-counted, though it doesn't handle circular refs for you. weak_ptr is used for this, though the examples I found weren't terribly clear on the topic. unlike java's garbage collection, you have a pretty clear idea of when an object will be destroyed (when the last shared_ptr to it is destroyed). these are safe in STL containers.

    intrusive_ptr lets you do reference-counting yourself in the objects the pointers will reference. that has the additional benefit of letting your objects know how many references to them there are, which they wouldn't know if you were using shared_ptr. but you have to code a little more yourself.

    regardless, you have to be careful. these aren't language-enforced, so unlike java and other GC'ed languages, you can easily screw over your garbage collection by using raw pointers instead of smart pointers. you'll have to enforce a level of discipline. typedefs recommended? maybe even a separate class that hides the smart pointer entirely and is passed around by copy?

  6. Re:Don't write C++ without boost! by Anonymous Coward · · Score: 2, Informative

    C++ auto_ptr does not have normal copying semantics, for one. When you copy an auto_ptr, it transfers ownership of the pointed-to object, so when the copy is deleted, the object is as well. Your original auto_ptr is pointing to garbage that used to be an object. If you pass-by-reference all is well and good, but if you pass-by-value, you're SOL.

    Boost's shared_ptr allows several "copies" of a pointer to co-exist, only when the last one is destroyed is the pointed-to object deleted.

    auto_ptr also doesn't have array support, it doesn't call delete[] on the pointer when destroyed. Boost has a smart pointer that does that, as well as lots of other features (if you need them).

    SH

  7. Tools I use by MarkLewis · · Score: 2, Informative

    I use vim and make for small C++ projects, but for larger projects I've found it useful to have a real IDE. Either Anjuta or KDevelop are good.

    Most of my professional programming recently has been in Java. Eclipse is far and away the best free IDE, although I've heard unconfirmed rumors that recently NetBeans has started becoming usable. We use IntelliJ IDEA, which I highly recommend. We switched away from Eclipse because it supported the same sort of refactoring that Eclipse did, but it was faster, easier to control from the keyboard, and seemed more intuitive. And at $500/license it's pretty cheap compared to the (commercial) competition.

    I agree with the comments others have posted about getting a well-designed build system set up first thing; it really will save you time. If you're using Java, then Ant is basically the de facto standard, and is well worth using. If you're running both Java and C++, it probably makes sense to use Ant for both, so you can have a single build system.

    As far as version control goes, you really want something more flexible than CVS. I've used CVS in a professional setting, and while it has its advantages, its lack of changesets makes managing a large project difficult. It isn't so bad with C/C++ code, where it is common to have a few large source files, but with Java forcing you to make lots of small source files it makes version management a real hassle.

    We're switching over to Subversion for version control. While you're looking at version control, take a look at Trac, which is an immensely useful issue management system that integrates directly with SVN.

  8. Re:Don't write C++ without boost! by slamb · · Score: 2, Informative
    What is the difference between boosts smart pointers and standard C++ auto pointers?

    std::auto_ptr<> has this limited and confusing concept of "ownership". Multiple auto_ptrs can point to the same object, but at most one should own it. (Of course, if none do, you have to delete it manually, defeating the point.) Assignment transfers ownership, so it changes the right-hand side of the assignment also.

    boost has a couple variants:

    • The simple boost::scoped_ptr<> always owns what it points to and isn't assignable from another scoped pointer. So it just avoids the ownership thing altogether; it's limited but not at all confusing.
    • boost::shared_ptr<> is a non-intrusive reference-counting pointer. (The object is destructed when all of the pointers go out of scope or are reassigned to something else.) It's both more powerful and simpler to understand than std::auto_ptr<>. It even supports weak references through boost::weak_ptr<>.

    The boost pointers also have variants for arrays; using std::auto_ptr<> with an array would incorrectly use "delete ptr;" instead of "delete [] ptr;" on destruction.

  9. Re:on the Java side by redhookgroup · · Score: 2, Informative

    Try looking at maven for your build. It has been described as ant on steroids: http://maven.apache.org/

  10. Valgrind by cakoose · · Score: 3, Informative

    Valgrind is great for debugging memory problems (wild pointers, memory leaks). It's not at all like the older memory debugging tools; you just run "valgrind your-program" and it'll rewrite your executable to perform the appropriate checks, then run it. Right now it only supports x86 executables; they're working on PowerPC support.

  11. Unit / regression testing by devphil · · Score: 2, Informative


    QMTest is an open-source testing framework that you should try. Fairly simple, adaptable, extensible. (Full disclosure: It's made by my company, but not by me. From reading the mailing lists, we get lots of kudos, so presumably it's working. *grin*)

    As for other tools:

    • avoid Rational Rose like the plague of death. I used it for a year at a previous job, and had nothing but painful user-interface experiences and craptacular code to show for it.
    • CVS makes for a decent revision control system, but its limitations are a pain to work around. Subversion is considered mature, and Monotone is supposed to be quite nice, but I have no first-hand experience with them. Arch is suitable for small projects but does not scale (also, its author is an asshole, so you have no support there).
    • Unless you need to support some exotic environments, the autotools (autoconf/automake/libtool) have become more trouble than they're worth. Any of the mainstream make(1) implementations -- GNU Make, BSD Make, Solaris Make, etc -- will have enough extensions to let you do just about everything a build system needs to do. GNU Make is particularly rich, but use its features sparingly or your makefiles become undebuggable.
    • If you do need to support exotic environments, or think you might someday, then autoconf is your friend. Automake used to be friendly before they went overboard with it, now it's just bloated and broken; use Make extensions instead. Libtool has never been anybody's friend; more time has been put into making and debugging and debugging and debugging libtool than has ever been recouped by its wrappers -- use ELF binary format and be done with it.
    • Doxygen and Synopsis are both highly capable documentation tools.
    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  12. Use open tools only! by rjh · · Score: 4, Informative
    Here's the big thing: only use open tools.

    What happens three years down the road when Management decides not to renew the Rational Rose license? What happens when IntelliJ stops supporting your version of IDEA and you have to upgrade with money you don't have? Etc.

    Use only open tools. Open-source is best, of course, but anything that uses completely documented file formats and has tools for exporting to other formats is acceptable.

    Don't let yourself get nailed with vendor lock-in. That's a bad, bad place to be. Better to use slightly inferior tools which are open than to lock yourself to a vendor.

    That said, here are the tools I find myself using again and again:
    • C++
      • jEdit is a Java programmer's editor with excellent C++ support. I do development on Linux, Win32 and MacOS X, so it's very nice for me to have one editor I use on every platform. jEdit's not as featureful as, say, Emacs, but it's considerably more friendly to use.
      • Boost. If you're writing C++ and you're not using Boost, you're committing a crime against yourself.
      • Python. With Boost's Python library, it's easy to make your C++ applications scriptable. Write the heavy lifting parts in C++, then make those parts callable from Python. Do the rest of your development in a far safer, more sane language. You get almost all of the speed of C++, and far fewer headaches.
      • SWIG is another tool that's excellent for creating scriptable C++ applications.
      • Subversion for your version-control needs. Nothing else will do.
      • Doxygen for all your documentation needs. Learn it, love it. Your code's not done until every public part of the API has been doxygenated.
      • The GNU Autotools are really, really awful. They're also far better supported than Scons or pick-your-Autotools-replacement. Get ready to feel the pain of m4 macros. Sorry. :(
      • The GNU Compiler Collection started getting a good C++ compiler around version 3.0. I've been quite favorably impressed with 3.3, and I'm looking forward to 4.0. I don't recommend it for Windows, but for Solaris and x86 Linux it's beautiful.
      • I haven't found a good C++ unit testing framework yet. If you find one, please let me know.
    • Java
      • Eclipse is an excellent Java IDE. jEdit also fits the bill nicely, if all you want is an editor. I use both frequently, and am quite pleased with both.
      • Subversion again for your version-control needs.
      • jUnit for unit tests. Your code's incomplete unless you've written unit tests for it.
      • Javadoc for documentation. I would recommend Doxygen, but it's quite possible you'll be deploying your applications on machines that don't have it installed.
      • Ant for all your build needs.
    Hope all this helps.
    1. Re:Use open tools only! by kraut · · Score: 2, Informative

      ... and use Jython to script you Java stuff

      --
      no taxation without representation!
  13. Re:KISS applies here. by stefanlasiewski · · Score: 2, Informative

    For new projects, you should seriously consider Subversion.

    SVN is simple to use like CVS, but fixes many of CVS's fundamental shortcomings-- directories can be under version control, which means that re-organizing the directory structure isn't the anathema that it is in CVS. So many simple fixes which really affect the KISS process...

    You can easily make the SVN repository available over Apache. This seems much more robust then CVS + RSH/SSH, and you can use the huge range of Apache modules for your SVN repository.

    The version numbering scheme is a little hard to get used to-- the 'Version Number' is actually the version of the repository, not the version of the file itself. Not sure if I like that ...

    --
    "Can of worms? The can is open... the worms are everywhere."
  14. Re:Nothing is perfect, but... by ogonek · · Score: 2, Informative
    For Java development.
    Uniting testing I use junit for Java.

    I prefer TestNG for unit testing Java things. It's much better than jUnit, it really is. You can define test dependencies and lots of other nifty things that jUnit doesn't allow you to do. If you are using jUnit, switch now.

    Also IntelliJ's IDEA is a nice IDE, but not free.

  15. Eclipse + myEclipse by StarWynd · · Score: 2, Informative

    If you're doing any J2EE work, I highly recommend Eclipse with the myEclipse plugin. It carries a price tag of about $30 per year, but this is much cheaper than many of the other equivalent IDEs. Included are a JSP developer, XML editor, SQL Editor, database explorer, EJB modeler and JSTL support among many other features. It is a great tool.

    If J2EE isn't of any concern, I still first recommend Eclipse because of its nice integration with CVS, JUnit and other Java tools. There are also plugins for C and C++. And best of all, it's free. Even if Eclipse weren't free, I'd still pay for it. It's the best IDE I know.

    The only other IDE I'd recommend is SlickEdit. I used it for a number of years for C/C++ and Java before switching to Eclipse. It's a good editor, but I found that I could do my job better with Eclipse. Many of my co-workers use SlickEdit instead and rave about it. It all depends on what you need to do and how you work. There's now a plugin so you can use the SlickEdit code editor in Eclipse. However, Visual SlickEdit comes with a price tag in the $200 - $300 range and the plugin is a about $150 or so.

  16. Re:EMACS! by Anonymous Coward · · Score: 2, Informative

    Umm, not hoping to get any free publicity... honest, but there is a Latex plugin for Eclipse called Ecletex http://sourceforge.net/projects/etex The current version (0.0.4) is a bit shakey, but the cvs is upto date and much more stable. Okay advert over.

    Oh and its more "Lazy Coward" than "Anonymous Coward"

  17. My Favs by NaNO2x · · Score: 2, Informative

    For C/++ I use Dev-Cpp. It has built in CVS, and almost any feature you could need. Plus it is open source. (find it here: http://www.bloodshed.net/devcpp.html , but as the site goes up and down you can get it here: http://prdownloads.sourceforge.net/dev-cpp/devcpp- 4.9.9.2_setup.exe) For Java I am just starting to work with it but from what I have done so far I have done in command and Eclipse. It seems to have most things that are needed. (find it here: http://www.eclipse.org/)

    --
    Utinam me logica falsa tuam philosophiam totam suffodiant.
  18. Re:vim by fvbommel · · Score: 4, Informative

    I do not have knowledge of how to compile Java using gcc ;)

    Click here to find out: GCJ ;)

  19. Re:Don't write C++ without boost! by Anonymous Coward · · Score: 1, Informative

    Multiple auto_ptrs can point to the same object, but at most one should own it.

    No, that's not right.

    To see why, first consider what happens when you copy an auto_ptr: An auto_ptr owns the object that it holds a pointer to, and only one auto_ptr may own an object at a time. When you copy an auto_ptr, you automatically transfer ownership from the source auto_ptr to the target auto_ptr; if the target auto_ptr already owns an object, that object is first freed. After the copy, only the target auto_ptr owns the pointer and will delete it in due time, while the source is set back to a null state and can no longer be used to refer to the owned object.