Best way to learn Java in 3 months?

  • Context: Java 
  • Thread starter Thread starter NextElement
  • Start date Start date
  • Tags Tags
    Java
Click For Summary

Discussion Overview

The discussion revolves around the best strategies for learning Java within a three-month timeframe, particularly in the context of programming for a robotics competition. Participants share their experiences and suggestions, touching on comparisons with Python and other programming languages relevant to robotics.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant expresses a desire to learn Java for a robotics club, acknowledging the differences from Python.
  • Another participant suggests that prior knowledge of Python will facilitate learning Java, highlighting similarities in basic programming constructs.
  • Recommendations include downloading a Java compiler or IDE, such as Eclipse or NetBeans, and focusing on object-oriented programming concepts like classes and inheritance.
  • One participant emphasizes the importance of practical experience in learning programming, likening it to riding a bike.
  • A question is raised about the suitability of Python for robotics competitions, with a participant noting that previous teams used C++, Java, and LabVIEW.
  • Some participants argue that Python can be a good starting language, while others suggest that C might be better due to its non-object-oriented nature.
  • Concerns are raised about Python's performance in real-time programming scenarios, particularly in robotics, where memory management and performance are critical.

Areas of Agreement / Disagreement

Participants express differing opinions on the best starting language for programming in robotics, with some advocating for Python and others preferring C. There is no consensus on the suitability of Python for robotics competitions, as some believe it may not perform well enough in real-time applications.

Contextual Notes

Participants discuss various programming languages and their applicability to robotics, but there are unresolved questions regarding the performance and memory management of Python in this context.

NextElement
Messages
63
Reaction score
0
I'm joining my school's FIRST Robotics club, and our supervisor has said that we will be using Java to program our robot this year.

I have self taught myself Python and enjoyed it, but does any pone have any advice/tips/links for helping learn Java? I know it's a whole different animal compared to the basic Python I know, but I want to be a able to contribute to the team and I think it'll be a great learning experience.
 
Technology news on Phys.org
The best way to learn Java in 3 months is to give me $3,000!

I'm only kidding, although that is a viable option.

If you know Python, it really shouldn't be too hard to learn Java. I knew Python and C before learning Java. Loops, if/else statements, variables all work the same way in Java and Python, so being familiar with programming is going to come in handy.

My reccomendation is to download a Java Compiler along with SDK. The 2 most popular Java Compilers / IDEs are "Eclipse" and "NetBeans". I personally like Eclipse better than NetBeans, but they're both good.

Learn the syntax for the main java functions, like how to print a line (System.out.println()) etc. Learn how to declare scanners. Then look into the fundamentals of Object Oriented programming. You should learn about classes, polymorphism, and inheritance, those are the big topics in OOP.

Start off simple. Make your basic programs that take in user input and deliver something in return. Then after that move into more complicated territory like making a blackjack game.

http://docs.oracle.com/javase/tutorial/

The Java tutorials in the aforementioned link are a good way to start, or you might consider buying a textbook. In my OOP class, we used Java: How to Program 9th edition by Dietel. The book is mediocre, so I won't tell you that it's a good book, but it is currently being used in Universities to teach Java.

I hope this helps and good luck!
 
It's a lot like riding a bike. You don't really learn it from books, you learn it by doing it. MrTheBard's suggestions are good.
 
Python seems awesome for a new programmer. Could it be used for a FIRST Robotics competition? For example, the task for our robot is to shoot frisbees into goals surrounded by a tape that gives feedback to the robot, and we want to design it to where the robot can adjust and fire at this tape.

Our adult supervisor said that last year they mainly used C++, Java, and Labview. Is Python a good starting language to prepare to "step up" to those languages? Also I've never even heard of Labview, I'm assuming its more of an engineering-only code... What's it's purpose?
 
I don't see why Python couldn't be used for a robotics competition.

Python is definitely a good starting language, although I believe that 'C' is a better starting language, since it is not object oriented. That's just my personal preference though. Most of the concepts that you're going to learn in Python or C are going to directly translate over to C++ or Java, the syntax will change slightly, but it will be relatively easy to grasp.

If you're intent on learning Python, I suggest http://www.learnpythonthehardway.org

Here's a short bit on Labview: http://en.wikipedia.org/wiki/LabVIEW#Code_compilation

It seems to me that it's used to actually program the machines and interface with instruments. I have not used Labview, so that's just my guess.
 
Possibly, Python does not perform well enough (yet) to be use in robotics, that is, when doing "real time programming", which in a way is what robotics entails because performance nearly always matters. Also, when programming "close to the metal" as in robotics, you need to know exactly--I mean EXACTLY--what is going on in the computer's memory, even if you are using a language such as Java. This is because you may not have very much memory in the robotics target platform. These (performance, and understanding exactly how memory is being used) are what makes robotics challenging, and why Python might not be the best choice--because Python by design tries to save the programmer from having to think about either performance or memory.

That is good for beginners--it makes them happy. But the cost of it is lack of control over performance and memory.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 20 ·
Replies
20
Views
4K
Replies
21
Views
14K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 12 ·
Replies
12
Views
5K
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K