Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

  • When *Not* to Use an IDE

    I’ve been asked to make a post on the dangers of relying on an IDE, so here goes…

    Tl;dr version: Relying too heavily on an IDE makes you a bad programmer. To demonstrate my point, think about trying to get your girlfriend to write hello world in notepad and compile and run from the command prompt, explaining to her what’s going on in each step. Chances are, she’d have a pretty good (if not vague) notion of what’s going on, and she’d be able to explain the gist of the process back to you. Now think about having her install eclipse, run it, set up a new project, generate a new main class template, write hello world using autocomplete, and press play. Even if you tried to explain each step to her, she’d have nowhere near the same understanding she gained from the simpler approach.

    Anyway…

    IDEs such as eclipse or netbeans have some amazing features that can help increase the productivity of an experienced developer- autocomplete, code generation, handling of classpath and dependency issues, and deployment are just a few things you can accomplish with just a few keystrokes.

    However, inexperienced programmers, or even intermediate coders (or even experienced programmers entering unknown territory), can rely on these features too heavily without even realizing it, which will actually hurt their productivity.

    For the first year or so that I was first learning programming (in a Java class back in high school), I used notepad to write all my code and the command prompt to compile and run it. I always had a browser open to the API- some of the most interesting things about Java, I learned by perusing the API randomly while looking for something else. And I became really accustomed to using the tutorials to figure out how stuff was used. I got to the point where I could write a simple gui shell consisting of a JFrame and a JPanel that does some custom painting with my eyes closed. After that, I moved onto JCreator (with only syntax highlighting and the ability to compile, run, and debug within the IDE, everything else disabled). I still used the API and the tutorials as my first source of information.

    And that’s pretty much all I used all through college. That helped me become very familiar with the standard libraries and where to go for more information. It wasn’t until the very end of college (6 years after I started programming) that I even touched eclipse. Now I use it every day, but I still have the API open (it’s always the first tab open in firefox), and I think my ability to go to the tutorials is one of the reasons I’m able to help people here. Most of the time, I’m not doing anything special, I’m just consulting the API and tutorials, which I learned by not using an IDE.

    Now, let me contrast that with somebody who uses all of the features an IDE offers from day one. First off, it actually makes writing and running small programs more complicated than it should be. Using notepad and the command prompt, I can have a simple gui up and running in about a minute. But to do the same thing in eclipse, first I have to create a new project, give it a name, specify its options, set up the directory structure, its classpath, etc. This might not seem like a big deal (and it isn’t), but all of those options can be overwhelming to a newbie who just wants to write a hello world program.

    Even if setting up a project and whatnot is second nature to you, that’s still just the tip of the iceberg. If you’re relying on the IDE’s autocomplete feature, there’s a good chance you’re going to miss out on the wealth of information contained by the API. Not only that, but you aren’t actually requiring yourself to learn the classes and methods you use. What happens when you’re in a scenario where you don’t have access to autocomplete? Say you’re having a test, or you’re helping another developer who doesn’t use an IDE with autocomplete, or you’re in a brainstorming session. You won’t always have an IDE available to you, so if you’re relying on one to write code, you won’t be able to write code.

    Aside from autocomplete, another problem with relying too heavily on an IDE is that it hides classpath and deployment from you. That can be a good thing, but if you don’t know what’s going on under the hood, what happens when you encounter a problem? What if a client (or just a friend you sent your program to) is having problems running your program? You can’t very well expect them to install your IDE to fix the problem, right?

    I can tell you from experience that people who rely on an IDE throughout their development education turn out to be worse programmers than people who claw their way up without one. I’ve seen people unable to show a JFrame that displays a random color, and I’ve seen people who couldn’t even type any code at all- they had to copy and paste it from somewhere else instead. Some of that comes from inexperience, but a lot of it comes from the difference between knowing how to write code and knowing how to make an IDE write code for you.

    The one thing I will say in defense of IDEs is that the ability to debug a program is immensely helpful in tracking down the cause of strange behavior. This is such an under-utilized skill in novice developers. But it’s possible to use a debugger without using any of the flashier aspects of an IDE.

    In the end, it’s up to you. There is a huge difference between using an IDE to accentuate your understanding of the language and using an IDE as a crutch. It’s up to you to decide which group you belong to. Try writing a simple program that displays a random color using only notepad and the command prompt. How did you do? Or if your goal is to learn, then the less you rely on an IDE, the better

    However, this isn’t just true for newbies- I’ve been programming for a few years now, and I still ditch the IDE when I’m entering new territory. I’ve recently been doing Java EE development (JSP, tomcat, and JavaDB). Since I don’t really know what I’m doing yet, I write all my code in jEdit, and I’m planning to continue to do so until I am completely comfortable with it. It might seem like things are taking more time, but in the long run, I’m going to end up a much more productive developer with a much better understanding of the language.

    Note- This doesn’t even touch the concept of GUI-builders that often come with IDEs. But the same rule can be applied to them- they hide what’s going on under the hood, which leaves novice developers clueless as to how to actually program. Plus the code they write is often hideous and hard to debug, so it makes getting help harder. There is a time and a place for them, and in experienced hands they can be useful, but novice users are better off doing things the “hard” way.

    Anyway, I hope that helps!
    When *Not* to Use an IDE KevinWorkman
    8
    1. javapenguin -
      You know sometimes either because you're assignment only allows like Exceed on Demand or Unix, or whatever, or your corporation only uses command prompt like or UNIX like stuff and some companies probably use proprietary software, including perhaps, maybe, especially in the case of Microsoft or Sun, the software that helps makes software.

      Also, Eclipse IDE does not work with C/C++. I've tried it and unless the latest version, haven't downloaded it in a while I'll admit, has changed that, don't even bother for C/C++ programs.

      JGrasp should work, though it's a lower-tech IDE than Eclipse, but I can't for the life of me figure out how to get it to import the command for g++ and/or make
      (Also, I have to do makefiles as JGrasp won't do them for you (for C/C++) or any other language. It will for Java. At least I believe so.

      jGRASP Home Page

      It appears Netbeams, which I've never used before and am downloading now, can use all of these.

      Again, some companies don't use or have installed Eclipse, JGrasp, BlueJ, or NetBeams on their computers, or don't use them in their software design, as my instructor had told me.

      NetBeans IDE - C and C++ Development


      I know for command prompt, at least on UNIX, it's

      javac FileName.java
      and then after that goes through it's

      java FileName

      and for C++ I think it's

      g++ FileName.cpp
    1. loui345 -
      I am the inexperienced programmer and I have been using Net Beans since day one. What I like about NetBeans is that it automatically catches my errors, so when I am about to compile my program it has already caught all my silly errors. For example, misspelling, unclosed brackets, and no semi colons for starters.

      Your saying that I should get rid of those wonderful features that NetBeans provides and crawl before I walk and in the long run it will pay me dividends?

      Thanks.
    1. Javor -
      I am the inexperienced programmer and I have been using Net Beans since day one. What I like about NetBeans is that it automatically catches my errors, so when I am about to compile my program it has already caught all my silly errors. For example, misspelling, unclosed brackets, and no semi colons for starters.

      Your saying that I should get rid of those wonderful features that NetBeans provides and crawl before I walk and in the long run it will pay me dividends?

      Thanks.
      I think it's better to find out the error by yourself.
    1. curmudgeon -
      The IDE "protects" from having to learn fully about some things such as packages. My own experience has been that without this knowledge, I some greater difficulty learning and implementing more advanced Java programming such as using JNI. I think it's a good idea to avoid an IDE at least for a few weeks.
    1. Javor -
      I think it's better to find out the error by yourself.
      man,goog luck.
    1. Kisiara -
      I started coding just about sometime in July of last year. I was informed about things like dreamweaver for XHTML and the CSS families, Netbeans for java and other OO languages and id be damned to say I didn't rush to install them. I loved netbeans and I still do (I think I speak for eclipse as well-since I have it installed but I rarely use it. not that its bad, it just seems to heavy for my computer for the moment). Anyway, while using netbeans I was really happy up until August-September period when I discovered I could code with notepad and compile on my cmd. I ventured into it, scared out of my pants, but one month down the line, I realized one thing, I no longer make semi-colon and hanging-braces kind of mistakes at least not as heavily as I used to when netbeans was correcting them for me. All I can say is growing up as a coder (im in just under one year of coding), I think you really pick up on valuable things whilst making those mistakes that netbeans and various othe IDEs protect you from. Oh and I had made dozens of GUIs using Netbeans and I was really happy to see them work but it wasn't until I got to type out the command "JFrame" and the likes for the first time that I really understood what I was doing. For a designer, relying on IDEs is okay but if you ever want to be a solid Developer, then you will have to give up that IDE and get your hands dirty for at least a year, or two or preferably six as it has been well addressed in this article. (oh and by the way, I finished up on html and css with nothing but notepad++ and now I can put up a website faster than someone can find the linking command in dreamweaver)
    1. Helium c2 -
      Will learning from the IDE teach me how to become a average java programmer? Just so that I can add simple things to website blogs. I don't know the whole scenario of the java program and writing it on a pc, network to network. But just from a Windows perspective, can I use the IDE to learn enough of it to make changes to blogs? Hopefully I will be able to do this.
    1. Helium c2 -
      I am the inexperienced programmer and I have been using Net Beans since day one. What I like about NetBeans is that it automatically catches my errors, so when I am about to compile my program it has already caught all my silly errors. For example, misspelling, unclosed brackets, and no semi colons for starters.

      Your saying that I should get rid of those wonderful features that NetBeans provides and crawl before I walk and in the long run it will pay me dividends?

      Thanks.
      Thanks. When compiling your class files in NetBeans IDE, did anyone use your programs on the internet? Or did you see it done on the internet. Using the IDE. I'm trying something now. But cannot download an IDE yet. I want to know if the JFrame will work on a government website. Did they use your programs that you had stored on the NetBeans? I'm on a Chromebook now. Chrome is my browser.