Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Rumor Mill (http://www.chiefdelphi.com/forums/forumdisplay.php?f=15)
-   -   2007 Robot Controller (http://www.chiefdelphi.com/forums/showthread.php?t=49525)

ThomasP 29-12-2006 14:33

Re: 2007 Robot Controller
 
Quote:

Originally Posted by chris31 (Post 546038)
Java doesnt run on PICs by default. Plus Microchip is a sponsor of FIRST. I think that they hope with there donation of Mplab that they assume some people will grow to use and like it and then use PICs and there C compiler for personal and buisness projects..

There is actually a project people are working on to slave VEX controllers to a Java board here. If you check out Systronix's website, you'll see that it has a lot of potential and could be used for things that the PIC controller wouldn't be able to.

I'd just be really dissapointed if FIRST stays with C instead of progressing to a newer technology only because of one of their sponsors wants them to... doesn't really seem like something FIRST stands for.

Quote:

Originally Posted by TomBottiglieri
Java isnt built to run on small embedded devices. The main point of Java is to provide cross platform compatibility. When you compile a Java program, it does not compile to straight machine code, as a C program does. It compiles to whats called Java Byte Code, which then has to be run through an interpreter to be turned into machine code your processor can understand. Based on your system (Windows, Mac OS, Linux, UNIX, etc..) you will need a different interpreter. We are all using the same system in FIRST, so there is no need for that level of abstraction. Java is one of the slowest languages out there, and when developing for embedded devices you want to strive for speed and efficiency.

The reason AP CS is taught in Java is for its wide range of compatibility, and the fact it is an object oriented language which is built off the idea of classes. While your final product may be slow and limited, the programming methods you must use to create applications is very robust and practical. The AP CS class doesn't exist to teach you Java, but rather to teach good programming techniques in an object oriented language.

Java SE and EE may be slow (you should look at server vm benchmarks though), but I think the CLDC Micro Edition is faster than C on the PIC processor...

Tom Bottiglieri 29-12-2006 14:36

Re: 2007 Robot Controller
 
Quote:

Originally Posted by ThomasP (Post 546045)
There is actually a project people are working on to slave VEX controllers to a Java board here. If you check out Systronix's website, you'll see that it has a lot of potential and could be used for things that the PIC controller wouldn't be able to.

What's one thing you want to do with your robot that can't be done in C with structures? Sure, its not a full blown class, but its close enough. Just because something is newer doesn't mean its better.

There is absolutely no reason for IFI to change their hardware. It works well and people are familiar with it.

Plus, C# blows the pants off of Java, IMHO.

ThomasP 29-12-2006 14:45

Re: 2007 Robot Controller
 
I'm not really up for a argument about which programming language is better... the only reason I'd like to see Java in FIRST is because of the AP classes being taught in Java. Some people struggle in CS classes learning one language and telling them the robot is programmed in a different language from what they're learning in class destroys their potential interest fast.

chris31 29-12-2006 14:51

Re: 2007 Robot Controller
 
Quote:

Originally Posted by ThomasP (Post 546045)
There is actually a project people are working on to slave VEX controllers to a Java board here. If you check out Systronix's website, you'll see that it has a lot of potential and could be used for things that the PIC controller wouldn't be able to.

Theres nothing Java can do that C cant do. The hardware will do the same thing no matter what software is running it.

Personally I like embedded devices and am glad that I get to use C for FIRST. Its a nice break from OOP and Java. I love C structs. I guess its just how I think.

Donut 29-12-2006 17:21

Re: 2007 Robot Controller
 
Quote:

Originally Posted by ThomasP (Post 546049)
I'm not really up for a argument about which programming language is better... the only reason I'd like to see Java in FIRST is because of the AP classes being taught in Java. Some people struggle in CS classes learning one language and telling them the robot is programmed in a different language from what they're learning in class destroys their potential interest fast.

At how many schools is AP Comp. Science an issue though? I know in our district only half of our schools even teach that class, and they didn't actually use Java until 2 years ago (prior to that it was still C). AP Comp. Science is a 3rd year programming class, meaning at least in our district you must take two other programming classes (both with different languages) before you can take it.

I could see it maybe good in a few particular cases, but overall I think most schools have their programming curriculum laid out in such a way that this wouldn't have much of an effect.

Not that Java can't be used for robot programming, that's why Parallax developed the Javelin chip.

chris31 29-12-2006 17:59

Re: 2007 Robot Controller
 
Quote:

Originally Posted by Donut (Post 546081)
At how many schools is AP Comp. Science an issue though? I know in our district only half of our schools even teach that class, and they didn't actually use Java until 2 years ago (prior to that it was still C). AP Comp. Science is a 3rd year programming class, meaning at least in our district you must take two other programming classes (both with different languages) before you can take it.

I could see it maybe good in a few particular cases, but overall I think most schools have their programming curriculum laid out in such a way that this wouldn't have much of an effect.

Not that Java can't be used for robot programming, that's why Parallax developed the Javelin chip.

Dang. I go to a private school so its a difrent situation. But I took Intro to Com. Sci. as a freshman. We have 10 people in the class which wasnt to bad for a high school with 110 people. I was going to take the AP as a sophmore then. Howver due to people leaving the school and some people not wanting to take the class we only had 3 people so they didnt teach it. They were supposed to teach the intro class that year so that the folowing year we would have two grades worth of people to take the AP. They didnt teach the intro so here I am, junior with no AP Com. Sci., so the 3 of us decided to take it as an independant study (basucally a free period with no teacher) and we learn it on our own and will take the AP at the end of the year.

woo this was a overyly long post.

Donut 30-12-2006 00:11

Re: 2007 Robot Controller
 
Quote:

Originally Posted by chris31 (Post 546092)
Dang. I go to a private school so its a difrent situation. But I took Intro to Com. Sci. as a freshman. We have 10 people in the class which wasnt to bad for a high school with 110 people. I was going to take the AP as a sophmore then. Howver due to people leaving the school and some people not wanting to take the class we only had 3 people so they didnt teach it. They were supposed to teach the intro class that year so that the folowing year we would have two grades worth of people to take the AP. They didnt teach the intro so here I am, junior with no AP Com. Sci., so the 3 of us decided to take it as an independant study (basucally a free period with no teacher) and we learn it on our own and will take the AP at the end of the year.

woo this was a overyly long post.

This almost ended up being the case of what happened to me as well. I took Intro. to Comp. Science as a Freshman, and Windows Programming as a Sophomore. Our original AP Comp. Science teacher left after my Freshman year, and for our Sophomore year the class was taught by a teacher from another high school in our District. I was signed up for the class last year, and they decided it wouldn't be offered at my high school. Finally they've brought it back this year so I get it next semester.

JamesBrown 30-12-2006 07:23

Re: 2007 Robot Controller
 
Quote:

Originally Posted by ThomasP (Post 546049)
I'm not really up for a argument about which programming language is better... the only reason I'd like to see Java in FIRST is because of the AP classes being taught in Java. Some people struggle in CS classes learning one language and telling them the robot is programmed in a different language from what they're learning in class destroys their potential interest fast.

I am not sure how familiar you are with C or JAVA but it is very easy to move between them, if you have learned to program in JAVA you should have no problem moving to C. Also a good AP course should be focusing on the algorithm design and psuedo code portion of programming more than they focus on language syntax. If you can only program in one language then you really haven't learned computer science, you learned JAVA or C or Basic. I taught my self C, then basically taught my self JAVA (I was in a class but the teacher had never used anything other than Q basic) and that was more than enough for me to learn how to program. Since then I have picked up VB, and Python in about a week each, I am starting to do some work with C#. Once you learn to program (not to code) you can switch between languages no problem, you just may want to keep some reference materials around to remember syntax if you haven't used a language in a while.

ThomasP 30-12-2006 13:28

Re: 2007 Robot Controller
 
I'm actually quite familiar with Java and C but I wasn't arguing for me, I personally have no problem with C, I was arguing for the people I've seen come to one meeting, hear that robot isn't programmed in a language they're familiar with, and not come back. And now I'm just going to start pretending like this thread doesn't exist, seeing a new person bashing me every time I open this thread is getting old lol.

fimmel 30-12-2006 13:51

Re: 2007 Robot Controller
 
if people want to program the bot in java they can get a simple java board and interface it with the main controller through serial. just have someone who likes c make a code to pass the data on.

makes sense to me.

/forest

efoote868 30-12-2006 14:20

Re: 2007 Robot Controller
 
while teaching new programmers C, who are familiar with java, the hardest things for them to learn are preprocessors. We spent a good hour describing #def. oh well.

I'm not exactly sure how one could benefit from java more than C. Although it is very easy to think of a robot as "Shooter", "Arm", "Drive", etc.; it really isn't necessary, and I can't see myself ever coding Shooter robotShooter = new Shooter();

Danny Diaz 01-01-2007 18:36

Re: 2007 Robot Controller
 
This is actually a really interesting thread. Should a technologically-focused organization change every time the college board or some academic institution decides what's the hot new thing? Not to sound like Grandpa from the Simpsons, but when I tool AP CS in high school the language of choice was Pascal. Then C and Java started to move in, and even though the industry was moving towards C and C++ the academic institutions were moving towards Java. Why Java? I asked the head of the CS department at Georgia Tech at the time, and he said "enrollment". Of course that was the time of the dot-com boom when everybody and their grandmother was learning Java to develop the next big web application that never happened. *sigh*. But even more recently Java has been taking over because of its instant-gratification and graphical nature - students think they're learning more when they can spend 5 minutes programming and get a box to fly across the screen. However, for embedded programming, you don't generally get the instant gratification, you may toil for hours and find out it works or doesn't work.

I worked on a paper with a professor at Georgia Tech my senior year on the development of computer science fundamentals at various Universities around the world - we got several colleges and universities from several countries to participate. We gave everyone the same programming challenge - parse a file for information and display that information in various ways depending on sort criteria provided by the user. The institutions were allowed to use either Java or C/C++ to solve the problem, the students were allowed to use almost any resource they had access to (moderators watched to make sure they didn't go to the web looking for a solution but they were certainly allowed to view manuals, API, or programming resources), and anyone who participated was required to provide everything they did (incomplete programs and all). The results were very astounding - the students/schools that used C++ solved the problem an average of 40% with a high percentage very close by looking at their code, whereas the students/schools that used Java solved the problem an average of 20% with a high percentage not even having a clue as to how to approach the problem (and I'm pulling these numbers off the top of my head, but I am pretty sure they're close). The results were pretty astounding, and we had to ask ourselves why this was. One of the biggest pieces of feeback we got from a school that used Java was, "Our students just aren't use to solving this kind of problem. They predominantly create classes and icons - you know, something OO or graphical - and they work from there. Even though Java has the capability of doing what you ask, our students just weren't comfortable with doing that kind of work. This just didn't fit in with their skill set." The Java programmers were comfortable with programming graphical widgets, and the C/C++ programmers were comfortable with data tasks. To me that was totally unexpected, but over time I came to understand that it's the nature of the language and the person.

Even at National Instruments you can see a big seperation between those who prefer to work on Application Software for its graphical nature and instant gratification, and those who prefer drivers and embedded programming. Sure, the languages are LabVIEW (application/graphics) and C++ (drivers) but it's the exact same concept.

So should FIRST move to Java because that's what students are learning in school or should it stay with the language that was developed for the task? Something more to think about.

-Danny

Sparks333 02-01-2007 22:02

Re: 2007 Robot Controller
 
I wouldn't count on USB-anything at this point. USB is hot-swappable, and is a real pain in the neck to code a good firmware driver for (I know this from experience), and without a good operating system managing the devices, I seriously doubt that we're going to see anything except our lovely DB-15 and -9 ports. Besides, the DB-15 ports on the OI are excellent for custom-built controllers (you don't have to screw around with protocols), and I doubt they'd ditch that. I DO hope they fix the temperature-variant oscillatior problem (Popularly known as the '8.2v error')... it caused my toes many a pain over the build season.
DB-9 is very robust, and not bad to interface with. Most microcontrollers support it natively via USART, while USB in a microcontroller is more of a rarity - Microchip has five or so that support it - so, I'd buckle up and grab your USB-Serial converters for another year, and pray for a Linux system sometime in the future.
On the programming side, there is a whole other set of issues with moving away from C. Currently, there is only the C18 C compiler for the Microchip products, plus an assembler (if there is a team out there that actually uses the assembler, please, I'd like to shake your hand). Some chips support Java natively, but it would require a complete architechture shift (Atmel's Jazelle core), which I can't see happening after so many years of Microchip support. There are a few third-party compilers that support languages other than C for the PIC, but it would require a re-code of FIRST's operating system, which the field controller may not like. It's very risky when moving from such a proprietary system. In the end, the number of work-arounds and time committed to making the system work with another language is offset by the acessibility of a more complex language.

Sparks

Sparks

team540pr2007 03-01-2007 15:43

Re: 2007 Robot Controller
 
although it would be nice for the programming to become usb it would create other technical problems. such as the wiring issue, with usb you have to have more resistors than with serial, so you electronics board is more complicated and harder to repair when damaged.


All times are GMT -5. The time now is 19:13.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi