• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

using an IDE as a Beginner

 
Bartender
Posts: 5465
212
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How many times have I not read this on our forum:

As you are just starting out it is recommended that you do everything through command line programs and not use any IDE such as Eclipse. Learning to work with an IDE has its own learning curve and will frustrate you when what you really want to do at this point is to concentrate on Java

I always wonder how much of this is based on experience, and how much of this is based on parrottism?

My personal experience is quite the opposite: after writing my first program in NoteBook (or was it Wordpad?), I had to open the Windows Command Line. It was many years since I worked with that archaïc thing, and it took me quite a while to reach the directory where my '.java' was saved. When I compiled, I got zillions of errors reported. I went back to NotePad, changed a bit, and then my WCL frame was closed! Well, it took me forever getting the program to do what I wanted it to do, and I thought: if that is the way to go, I'll not be using Java.

In my despair, I even wrote a bit of code in Excel's VisualBasic in an attempt to automate this nightmare process somewhat, but that too was not working nicely. So I started looking on the internet if I could improve on this hopeless situation. I found NetBeans, and what a LifeSaver that was! Daunting? Yes, a little, but far less than this CLI stuff.

A while ago, preparing for the OCAJP, it was time to start using the CLI. It wasn't that hard, but of course,  I had tons of experience at that time.

So, to whom it concerns: keep telling beginners to use the CLI, just don't tell me.
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My experience was that I compiled the first "Hello World" program at the command line, then went right to Eclipse (IDE) with no problem.  Well, not quite "no problem", but I learned what was a Java problem and what was an IDE problem pretty quickly.

I usually see the "don't begin with an IDE" admonition after a poster confuses an IDE problem with a Java problem.  
 
Marshal
Posts: 79151
377
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Knute Snortum wrote:. . . after a poster confuses an IDE problem with a Java problem.

Beginners have enough trouble learning Java® without learning the IDE, too.

Look at the Foreword (page 14) to Barnes and Kölling's Objects First with Java

James Gosling in that Foreword wrote:Watching  my  daughter  Kate  and  her  middle-school  classmates  struggle  through  a  Java course  using  a  commercial  IDE  was  a  painful  experience. The  sophistication  of  the  tool added significant complexity to the task of learning. I wish that I had understood earlier what was happening. As it was, I wasn’t able to talk to the instructor about the problem until it was too late.

Barnes and Kölling invented BlueJ, which I remember well. I didn't like it at all, unfortunately.

Yes, there are some people who happily learn to program Java® with NetBeans from the Hello, World stage, but if people are having difficulty in the early stages, why add the complication of an IDE?
 
Saloon Keeper
Posts: 10687
85
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows ChatGPT
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Piet Souris wrote:How many times have I not read this on our forum:


So what source would you recommend for someone trying to learn both Eclipse and HelloWorld at the same time?
 
Marshal
Posts: 8856
637
Mac OS X VI Editor BSD Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I like mostly about the command line, is that forces you at an early stage to use tools as Java API site to look up for method signatures, that's a skill. Second, it gives an ability to understand how packages work and what is a classpath. Third, it does not let run the code which has compilation errors. Fourth, you learn basic cli instructions, which you will need at some point anyway. Fifth, it doesn't drain your laptop battery so quick
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An IDE like Eclipse or NetBeans is not as easy as just typing in text in a text editor.

IDEs have their own (large) set of concepts. You have to understand how the IDE organizes projects and files, which is often different from how files are organized on the file system. Then you have to learn all the windows, buttons, menus and other functions. When you use Eclipse, you have to learn what perspectives are. If you don't understand that Eclipse organizes things in perspectives, then it's going to be hard and confusing to understand what is happening. And on top of that, you'll have to learn the programming language - and especially if you're brand new to programming, then learning the IDE and the programming language at the same time can become overwhelming.

To use the command prompt, you'll also have to learn some basic commands such as 'cd' and 'dir' and you'll have to understand how files are organized in the file system - but that's something all programmers need to understand anyway. The command prompt is a lot simpler than an IDE and it just does what you tell it to do, which makes it easier to follow what's happening.

There are also IDEs specifically made for beginners, such as BlueJ and Greenfoot. I've never used these myself. I guess these help hide some of the complexity, which makes it easier to get started. On the other hand, hiding some of these things can also hinder a student after a while - at some point, you'll have to learn what's happening under the hood, and if your IDE is hiding everything from you, you might not even be aware what's happening and it will take you longer to discover and learn how things really work.
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BlueJ is intended for beginners; it has features which allow the user to explore objects, call their methods, view the state of their fields, etc. It is good for showing the structure and behaviour of an object. It is less good at making larger apps; it complained at me whenever I tried to add package names (Eclipse does the opposite), and it uses its own virtual machine to execute code rather than starting from a main method. It is therefore necessary to move off BlueJ reasonably quickly. Another complaint I had is that it only shows compiler errors one at a time; you correct the error and some other error appears.
Of course, that was a long time ago; it might have changed.
 
Liutauras Vilda
Marshal
Posts: 8856
637
Mac OS X VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah, as a slightly different point. What students may be missing at the beginning, is a debugger from a clever IDE, which could be useful in understanding program's flow, but we don't hear often that students using it anyway. There is command line debugger too (jdb), I've tried to use it for my own curiosity - it is usable, but probably for a start simple print statements are sufficient or use mentioned BlueJ which indeed is a simpler IDE and it has a user friendly debugger.

Some people don't like BlueJ, but I personally quite liked it. It highlights a code blocks, so it is hard to miss any curly braces.

Maybe it makes sense to go gradually from: terminal -> BlueJ/... -> Eclipse/NetBeans/IntelliJ.
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maybe. As a BlueJophobe, I would use the command line until you have enough classes to merit named packages and you know how to compile packages and update the CLASSPATH from a terminal/command line.
Then use NetBeans/Eclipse/IntelliJ.
 
Ranch Hand
Posts: 85
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I started learning java  with blue jay quickly realized that it was  a  beginners tool and the videos teaching you java on udemy using that program  went way to slooooow for me . I then tried net beans   gave net beans learning  all of 2 mins and gave up with that  program  then, quit that crappy os windows I was trying to program on. Want back to mac osx  downloaded eclispe  started learning java on  it and been using eclispe  ever since
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Considering the number of times we see someone trying to execute some code in an IDE that doesn't actually compile yet, I would say there's an advantage to be had using the command line to get new devs to understand the steps involved in creating even the simplest program.

That and a lack of understanding of classpaths are the two main issues I see with people jumping into IDEs without enough knowledge of programming in general.
 
Liutauras Vilda
Marshal
Posts: 8856
637
Mac OS X VI Editor BSD Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dave is right. There is no point or at least there is no much point to try to reinvent wheel here. Everybody more experienced clearly understands, that command line is worth knowing, and if you getting it to know earlier, you don't need to learn later, plus it have advantages knowing it earlier rather than later.

Yes, some parts may look easier in IDE at first sight, but overall it isn't. Kudos to who came up with this advice not to use IDE's at the beginning.
 
Rancher
Posts: 383
13
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This discussion sort of puts me to mind of the analogy of someone who has never done any construction work, never touched a tool, has no concept of measuring and calculating in order to determine material size and layout, etc...And then, someone stands them in front of a table saw, tells them to build a house, and walks away, leaving that inexperienced person with the daunting task of trying to build a house with tools completely foreign to them. Obviously there is more danger of putting someone in that position, but to me the idea is similar to someone new to programming opening an IDE (let alone trying to install and/or configure it) for the first time.

I personally found starting out with a simple editor like Wordpad forced me to learn proper syntax (semi-colons to end lines of code, opening and closing brackets in the proper places, and so on), proper indentation for readability and efficiency, and so on. Even more so, it helped give me a good foundation for understanding the role and importance things like opening and closing brackets play in proper code development. And using the command line gave me a more in-depth understanding of compiling, of the file and folder structure (i.e. classpath) of a project, and of running and debugging a program with or without arguments, among other things.

I don't argue the fact that IDEs offer automated features that do things like auto-indent, red underlining incorrect syntax, but for a beginner that kind of automation does nothing for teaching the critical basics. You can't learn to do something properly if an intelligent tool is correcting "behind the scenes", or even pointing out mistakes, for you without you catching them yourself and knowing how to correct them.

Let me give another example, which might appear like I have gone completely off-track from the point of this discussion, but bear with me: Have you ever tried calling an airport to book a flight (let's pretend that's your preference over booking it online), only to find out that their computers are down, so they tell you to call later? Is it that difficult for them to take your information over the phone when you call, and then enter it into the computer later and call back to confirm? My point here is that there is a risk to relying on all the "bells and whistles" technology provides, and we lose the fundamental capacity to think. Have our brains become mush? Which brings me back to the point of this discussion: Using a text editor and command line might be a less appealing method to beginning programming, but it filters out all the "fluff" and forces you to concentrate on the fundamentals. You are entering commands to compile and run the program, you have to provide arguments (if applicable) - it is all text and command driven.

Now, having noted all that, I respect Piet's bad experience with trying to use the command line, and the fact that, in his case, he found using NetBeans helped him.

Anyway, my 2 cents worth...

Cheers!
 
Liutauras Vilda
Marshal
Posts: 8856
637
Mac OS X VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Randy Maddocks wrote:Now, having noted all that, I respect Piet's bad experience with trying to use the command line


I wouldn't say his experience was bad.

If we take his all post apart and analyse, I'd say back in that time he got tremendous experience. Need to take into account that internet wasn't that rich and there were little to no communities where the questions could be asked and instant help received.

Reading Piet's post carefully, I get an impression, that every hard moment he had, lead him to think and look for solution. So he had to research, which I presume earned him a skill too - how to attack problem. He even tried to automate process. Doesn't it look like a real world problem programmers solving?

All that made him a good problem solver he is today. I can't tell more as just: per aspera ad astra

I'm glad Piet created this topic.

Randy Maddocks, have a cow for your detailed experience. That makes a lot sense.

As you are just starting out it is recommended that you do everything through command line


Last point, need to note, that we are talking about 2 instructions in most cases: [1] javac; [2] java - can be something simpler? Use of packages aren't that needed at the beginning either, so to set manually classpath comes only at a later stage, unless student likes challenges.
 
Randy Maddocks
Rancher
Posts: 383
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Liutauras Vilda wrote:Reading Piet's post carefully, I get an impression, that every hard moment he had, lead him to think and look for solution. So he had to research, which I presume earned him a skill too - how to attack problem. He even tried to automate process. Doesn't it look like a real world problem programmers solving?  



Point well taken! Use of the word "bad" was probably a little too strong.

Thanks for the cow!  
 
Piet Souris
Bartender
Posts: 5465
212
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well,

my intention was to give beginners an alternative point of view. I hope that every beginner can make a well informed decision about the subject.
(and also: I was anxious to know what evidence there was for the correctness of the statement).

My final remarks:
1) Liutauras keeps confirming what I once wrote to him in a PM ( )
2) this Ranch is one of the few places on Earth where the twain DO meet!    
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Piet Souris wrote:. . . I hope that every beginner can make a well informed decision about the subject. . . .

That sentence strikes me as slightly oxymoronic; how can beginners know whether they are going to understand an IDE?
 
Piet Souris
Bartender
Posts: 5465
212
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, how do beginners know whether they are going to understand java?
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My take-away would be to learn some very simple Java programs from the command line, then learn an IDE and Java together.
 
Campbell Ritchie
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Knute Snortum wrote:My take-away . . .

It doesn't sound very different from what I would do.
 
Liutauras Vilda
Marshal
Posts: 8856
637
Mac OS X VI Editor BSD Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Piet, Cowgratulations, your topic has been published in our July's Edition Journal.
 
Ranch Hand
Posts: 1067
2
IntelliJ IDE Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the best things new programmers can do, is learn how to use a debugger.  Once you know how to use a debugger, you can solved most of your own problems.  And since it would be crazy stupid to use a command line debugger, you should learn how to use an IDE - as most IDEs contain debuggers.
 
Greenhorn
Posts: 3
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it is completely OK to use an easy to use IDE right from the start, like Netbeans, where you can use all the stuff from Oracle.
IDEs offer you some automated code check, autocomplete, automatic indention and formatting, comfortable navigation between references etc. etc..
You can download and import example projects from Oracle and debug them.
So debugging is of utmost importance throughout your programmer life, in any language.
Knowing the sequence of evaluation (to understand constructors, inheritance, design patterns) and inspect any param value at any moment is the best way to understand, find errors and create new code (unless you are Chuck Norris, of course).
Second, use a javadoc plugin, where you can get information about the classes.
So you do not have to start a browser for some basics.
Besides you should dedicate one lesson for hello world on the command line to know the basic commands, the environment variables and how to use text editors.
When i want to learn a new framework i buy a book with good examples and run them in debug mode.
If the examples do not work, throw away the book and buy another one, because loss of time is more expensive than bad books.
 
Bartender
Posts: 1868
81
Android IntelliJ IDE MySQL Database Chrome Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
While I know that is a 'beginners' level discussion, however I think that may be worth pointing out that later on if/when you prep for certification testing you will have to know:
  • at least the basics of using the command line
  • you won't have syntax highlighting available to you on the test
  • the spacing/indenting of the questions on the test may not be easy to read/understand


  • You should also think of where you want to be or what you want to do once you learn Java.  While certification can be helpful there are still many different areas that you may want to specialize in. For instance if you are learning Java so that you can program against Android devices then you should learn how to use IntelliJ by Idea (there is a free community edition).

    BTW:
    You DO NOT need to be certified in Java to create Java programs or to be a good Java programmer.
    In fact if you are certified in Java that does not mean that you are a good Java programmer, it means that you have a good understanding of how Java does things.
     
    Greenhorn
    Posts: 11
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    What method is recommended for Swing programming?  A long time ago (late 90's, early 00's) when I made a living at Java we used SlickEdit (text editor) where I worked for Swing programming.  It was really complicated for me and after the 'Bust' in Seattle I got out of programming looking for a more stable career.  Now I want to do some recreational Java programming as I'm getting ready to retire.  I've done a little Swing using TextWrangler on my Mac, some with NetBeans and just started using Eclipse for it.   I'd like to hear the opinion on what others think.
     
    Campbell Ritchie
    Marshal
    Posts: 79151
    377
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I think you shou‍ld write layouts by hand . . . at least until you know how to write layouts by hand. Then allow a GUI builder to do it for you. That way you will understand what is going on if anything goes wrong.
     
    Greenhorn
    Posts: 7
    1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I'm an older guy and am coming back to Java after many years for fun.

    I've started with using Notepad++ and the command line. My biggest problem at first has always been getting it set up so the classpath points to the right thing, etc. Once all that is working it's pretty easy. I had never heard of BlueJ but recently took a quick look. I didn't like it because it generated a bunch of stuff that might be useful to the brand new person but not for me so I'm sticking with Notepad++.

    I'm not religious about this one way or the other. I believe if you install Netbeans that you have to install the option that installs PHP/HTML5 for it to set up the SDK for you. The option for Java only requires that you set up the SDK yourself.

    In closing, if you DO go the command line route and your brand new, it may seem like at first that your learning at a snails pace. Actually, your learning more than you realize. If you start out at the command line and then later start using an IDE you'll be amazed at what you know.
     
    Campbell Ritchie
    Marshal
    Posts: 79151
    377
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Lom Scott wrote:. . . . I had never heard of BlueJ but . . . . I didn't like it . . . .

    I have suffered from BlueJ too. I know what you mean  .
    I am not sure I understand what you mean about CLASSPATHs. I think it usually causes more harm than good to set a system CLASSPATH. By the time you are making apps big enough to need a CLASSPATH set, you are probably ready to move to a proper IDE, which means NetBeans/Eclipse/IntelliJ.
     
    Knute Snortum
    Sheriff
    Posts: 7125
    184
    Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Lom Scott wrote:My biggest problem at first has always been getting it set up so the classpath points to the right thing, etc.


    Do you mean using the command line option cp?

       java -cp /path/to/Java/dir SomeClass
     
    Lom Scott
    Greenhorn
    Posts: 7
    1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Knute Snortum wrote:

    Lom Scott wrote:My biggest problem at first has always been getting it set up so the classpath points to the right thing, etc.


    Do you mean using the command line option cp?

       java -cp /path/to/Java/dir SomeClass



    Yes, that's exactly what I meant. I'm just working through it that way so that I can just do it without thinking about it.
     
    Lom Scott
    Greenhorn
    Posts: 7
    1
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Lom Scott wrote:I'm an older guy and am coming back to Java after many years for fun.

    I've started with using Notepad++ and the command line. My biggest problem at first has always been getting it set up so the classpath points to the right thing, etc. Once all that is working it's pretty easy. I had never heard of BlueJ but recently took a quick look. I didn't like it because it generated a bunch of stuff that might be useful to the brand new person but not for me so I'm sticking with Notepad++.

    I'm not religious about this one way or the other. I believe if you install Netbeans that you have to install the option that installs PHP/HTML5 for it to set up the SDK for you. The option for Java only requires that you set up the SDK yourself.

    In closing, if you DO go the command line route and your brand new, it may seem like at first that your learning at a snails pace. Actually, your learning more than you realize. If you start out at the command line and then later start using an IDE you'll be amazed at what you know.



    EDIT: I would like to make a correction I made in my original post above. I stated that in Netbeans you must select the PHP/HTML5 option in order for it to install the SDK for you. That is not correct. If you select the PHP/HTML5 option it will only give you those projects types when you start a new project so that is NOT the option you want to choose.
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic