|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Learning to Program in Java
This is a great resource on learning how to program in Java. If your interested in learning this is a good place to start.
http://www.javapassion.com/javaintro/ If anyone else has any resources to share, I'm sure it would be helpful for teams considering Java as an option next year. |
|
#2
|
|||||
|
|||||
|
Re: Learning to Program in Java
Sun maintains a fantastic set of Java tutorials on their official web site.
http://java.sun.com/docs/books/tutorial/index.html These tutorials, along with JavaDocs of the Java API, are pretty much the only resources you need to get going. |
|
#3
|
||||
|
||||
|
Re: Learning to Program in Java
You can also try the robot emulator to test out the versions of Java and tools that will be available next year. Check out the "Get the emulator NOW" link at:
http://sunspotworld.com/frc |
|
#4
|
||||
|
||||
|
Re: Learning to Program in Java
Quote:
I also like the sam's 24 day series(or something like that) on Java. |
|
#5
|
|||
|
|||
|
Re: Learning to Program in Java
How hard is it to learn Java coming from C++?
|
|
#6
|
|||
|
|||
|
Re: Learning to Program in Java
It ought to be fairly easy, since they are similar languages. I haven't done anything with Java for years, though, so I guess I'm about to find out.
Anyone know if we will be able to run whatever IDE they give us on Linux? All the software available now runs on Linux, so I am hoping whatever FIRST gives us will, too. Last edited by computerish : 16-05-2009 at 20:59. |
|
#7
|
|||
|
|||
|
Re: Learning to Program in Java
Quote:
Everything they use is probably going to come directly from the SunSPOT project, which is definitely cross platform. Even if FIRST doesn't provide the software for us, there's a good chance we'll be able to get it ourselves, assuming they don't brand it in some horrible way (i.e., the FIRST downloader). |
|
#8
|
|||||
|
|||||
|
Re: Learning to Program in Java
In general, C++ -> Java is definitely easier than going in reverse. If you are good with C++ (and understand its underlying object oriented paradigm) you can pick up Java in a snap - it is both semantically and syntactically very similar.
|
|
#9
|
|||
|
|||
|
Re: Learning to Program in Java
Quote:
I just finished working on a project where we 'ported' / rewrote large segments of code- brought it over from C++. I'd say 80% of it was copy/paste from C++ to Java with no problems. Yes, there were issues with some things (copy constructors, destructors, etc) but for the most part it was pretty simple. The modern editor, assuming they give us netbeans to work in, will be a pleasure to work in compared to the older IDEs. I'll admit I know nothing about the graphical programming languages (heck I can't even remember the name of it)... but Java was fun to learn and use. |
|
#10
|
||||
|
||||
|
Re: Learning to Program in Java
I came across a weird thought in this process. One of my teachers, who teaches C++ and Java, told me that when you program and compile Java Code [not to robot, but for animation for example], and when you compile C++ [not to robot, but for animation for example], and you execute them both, and if they did the same thing, all same except the syntax of course, that C++ does the compiling and executing a little faster then Java. First of all is this true for the robot, and if it is, what possible effects could it have?
|
|
#11
|
|||||
|
|||||
|
Re: Learning to Program in Java
Quote:
One other factor that has traditionally scared roboticists away from Java is garbage collection. In C/C++, memory is allocated and freed by the programmer directly. In Java, memory is periodically freed when needed (a process called garbage collection). While this makes a programmer's life much, much easier, it means that sometimes the system will decide to do garbage collection at an inopportune time, causing you to miss real time deadlines. However, once again there has been some advancement in this area that has turned this issue from show stopper to mere nuisance. I don't think we'll see an enormous performance difference between Java and C++ on our cRIOs. Besides, most teams are only scratching the surface of what the cRIO can do. And good Java is both more robust and oftentimes faster than bad C++ - if a team isn't comfortable with C++, any code that they produce may well end up being faster in their Java implementation anyways. |
|
#12
|
||||
|
||||
|
Re: Learning to Program in Java
Quote:
|
|
#13
|
|||
|
|||
|
Re: Learning to Program in Java
There will be a difference, but since much of the heavy lifting is done by the FPGA, the differences will often not show up. Also since another expensive element, vision, is being done by an optimized binary library written in C, the differences again will not show up.
Raw arithmetic for control or other processing carried out on the cRIO will show the differences, and I'm as eager as anyone to see how they compare. LV is a compiled language, not a VM, but a good VM can beat a bad compiler. As with most engineering tasks, it will be a system of tradeoffs where performance is not the only thing to be concerned with. The ability to debug well and quickly modify code may be more important than the runtime performance. Greg McKaskle |
|
#14
|
|||
|
|||
|
Re: Learning to Program in Java
I once was designing a program to perform several million iterations and distance calculations. I worried constantly about memory and time. When it was run in java it executed in just under 1 second.
1 second. I gave up on the differences between C++ and Java at that point. |
|
#15
|
|||||
|
|||||
|
Re: Learning to Program in Java
What i'm hoping is the software will run on windows 7
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Canera Calibration- Java program | itsme | Programming | 1 | 20-01-2007 16:14 |
| Robocode: Learning JAVA the fun way. While fighting with robots. | Denalin Fusion | Chit-Chat | 2 | 26-09-2005 23:22 |
| java to pbasic | nzj1 | Programming | 11 | 09-01-2003 19:24 |
| Java Books | Yan Wang | Programming | 1 | 27-12-2002 16:26 |
| No Java for XP | Kyle Fenton | Chit-Chat | 21 | 23-07-2001 20:15 |