Shop OBEX P1 Docs P2 Docs Learn Events
java — Parallax Forums

java

ArchiverArchiver Posts: 46,084
edited 2002-05-29 20:01 in General Discussion
In a message dated 5/29/02 1:30:59 AM Pacific Daylight Time,
basicstamps@yahoogroups.com writes:


> Message: 24
> Date: Wed, 29 May 2002 06:11:12 -0000
> From: "selmaware" <martin@s...>
> Subject: Re: Javelin Stamp
>
> I'm going to pipe in on this one too.
>
> The Javelin programs in Java. Just as in PBASIC with the BASIC
> Stamps, the great thing is you can do a lot with very little.
>
> The Javelin is the same way. You need to read and input and take
> action? Well, you find an example and work from that. You need
> something else, you look for an example and work from that modifying
> it to your needs and understanding it the same way. AS your needs
> grow, so do your skills with it.
>
> Java is a vey powerful programming tool, but also I think it is much
> simplier than PBASIC in many ways. There are specific basic
> structures. The roots of the language are very simple and it grows
> from there.
>
> There are great reasons beyond the Javelin itself to program in
> Java. Java, C, C++, JavaScript, and several other languages share
> very similar syntax.
>
> The biggest difficulty people have moving from a BASIC to something
> like Java is that BASIC is a very unstructured language, and as such,
> it allow programmers to be very sloppy in coding (me included!).
> Java on the other hand is a very structured language. BASIC
> programmers need to find a way around GOTOs.
>
> PBASIC to display that a button is pressed until released, the clear
> P5:
>
> Main:
> OUT5 = 1
> Button_Test:
> IF IN8 = 1 THEN SkipThis
> DEBUG "The button is down",CR
> Goto Butoon_Test
> SkipThis:
> OUT5 = 0
> GOTO Main
>
> Java to display that a button is pressed until released:
>
>
> //While a state is true, perform the action in braces
>
> while(true) //loop forever true = true
> {
> CPU.writePin(CPU.pin5,true); // set P5 to 1 or true
> while (CPU.readPin(CPU.pin8)) // loop while P8 = 1 or true
> {
> System.out.println("The button is down");
> }
> CPU.writePin(CPU.pin5,false); // set P5 to 0 or false
> }
>
>
> Which is easier, to follow all the GOTOs, or to 'see' the block
> structure?
>
> One of the greatest benefits of Java is the use of objects. The I/O
> pins are objects, serial ports are objects, etc, etc. As more object-
> classes are developed, it will be far easier for programmers to
> address additional devices as objects.
>
> Which is easier to code to read a serial A/D, the numerous code to
> control pins and perform bit-banging to accumulate the digital value,
> or a single line of code such as:
>
> temp = ADC0831.read() * conversion_factor;
>
> The ADC0831 object does all the hard work for us, no more copying and
> pasting 10 lines of code which need to be decifered and modified to
> fit our code.
>
> Or how about:
> robot.foward(10); // moves robot forward for 10 seconds
>
> Now, wouldn't these be nice when implemented? [noparse]:)[/noparse]
>
> The 3 most common goofs in programming with Java and its like:
> - Braces to group statements not equally paired
> - Case sensitive code
> - Missing semi-colons at the end of statements (think of them like
> periods. One 'line' of code can be on mulitple screen lines until
> ended with a ;
>
> Having taught both C and BASIC, I think BASIC is actually harder to
> learn the essentials because there isn't a common 'core' for
> learning BASIC.... the language is all over the place when it comes
> to structures of code.
>
> I think the Javelin is great, and I'm excited at the prospect of
> being able to teach my students a structured widely used language,
> and still have all the fun of a Stamp [noparse]:)[/noparse] When I teach C, the
> students perform endless hours of coding 'calculator' programs to
> give a reason for Input and Output. I'd much rather be using
> switches and LEDs [noparse]:)[/noparse]
>
> Last word... the Debugger in the Javelin IDE allows run-time
> debugging allowing you to follow your code execution, view contents
> of variables, set breakpoints... really cuts down on the debug time.
>
> Just my 2.5 cents...
>
> -Martin Hebel
> Electronic Systems Technologies
> Southern Illinois University
> http://www.siu.edu/~imsasa/est
> -- AND --
> SelmaWare Solutions
> Graphics Data Acquisition and Control for your BASIC Stamp
> AND Javelin Stamp!
> http://www.selmaware.com/stampPlot/samples/javelin/stampplot1.htm
>
>
>
> --- In basicstamps@y..., azeasi@a... wrote:
> > Does one need to know Java to be able to use the Javelin Stamp? I
> would hope
> > that it would be as intuitive as the Basic Stamp IDE. In other
> words, one
> > does not really need to "know" Basic to use the Basic Stamp. Is
> this the same
> > for the Javelin?
>



[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2002-05-29 20:01
    Hummm. Now I am intrested. Ever since I learned C++ I love objects. I was
    always wondering why no one would of developed a system to use it in chips.
    I mean it is kind of ovious, using objects to handle memory, I2C or 1-wire
    devices.

    hehe I am looking at it at anyrate[noparse]:)[/noparse]
    Original Message
    From: <LJGeib@a...>
    To: <basicstamps@yahoogroups.com>; <LJGeib@a...>
    Sent: Wednesday, May 29, 2002 9:15 AM
    Subject: [noparse][[/noparse]basicstamps] java


    > In a message dated 5/29/02 1:30:59 AM Pacific Daylight Time,
    > basicstamps@yahoogroups.com writes:
    >
    >
    > > Message: 24
    > > Date: Wed, 29 May 2002 06:11:12 -0000
    > > From: "selmaware" <martin@s...>
    > > Subject: Re: Javelin Stamp
    > >
    > > I'm going to pipe in on this one too.
    > >
    > > The Javelin programs in Java. Just as in PBASIC with the BASIC
    > > Stamps, the great thing is you can do a lot with very little.
    > >
    > > The Javelin is the same way. You need to read and input and take
    > > action? Well, you find an example and work from that. You need
    > > something else, you look for an example and work from that modifying
    > > it to your needs and understanding it the same way. AS your needs
    > > grow, so do your skills with it.
    > >
    > > Java is a vey powerful programming tool, but also I think it is much
    > > simplier than PBASIC in many ways. There are specific basic
    > > structures. The roots of the language are very simple and it grows
    > > from there.
    > >
    > > There are great reasons beyond the Javelin itself to program in
    > > Java. Java, C, C++, JavaScript, and several other languages share
    > > very similar syntax.
    > >
    > > The biggest difficulty people have moving from a BASIC to something
    > > like Java is that BASIC is a very unstructured language, and as such,
    > > it allow programmers to be very sloppy in coding (me included!).
    > > Java on the other hand is a very structured language. BASIC
    > > programmers need to find a way around GOTOs.
    > >
    > > PBASIC to display that a button is pressed until released, the clear
    > > P5:
    > >
    > > Main:
    > > OUT5 = 1
    > > Button_Test:
    > > IF IN8 = 1 THEN SkipThis
    > > DEBUG "The button is down",CR
    > > Goto Butoon_Test
    > > SkipThis:
    > > OUT5 = 0
    > > GOTO Main
    > >
    > > Java to display that a button is pressed until released:
    > >
    > >
    > > //While a state is true, perform the action in braces
    > >
    > > while(true) //loop forever true = true
    > > {
    > > CPU.writePin(CPU.pin5,true); // set P5 to 1 or true
    > > while (CPU.readPin(CPU.pin8)) // loop while P8 = 1 or true
    > > {
    > > System.out.println("The button is down");
    > > }
    > > CPU.writePin(CPU.pin5,false); // set P5 to 0 or false
    > > }
    > >
    > >
    > > Which is easier, to follow all the GOTOs, or to 'see' the block
    > > structure?
    > >
    > > One of the greatest benefits of Java is the use of objects. The I/O
    > > pins are objects, serial ports are objects, etc, etc. As more object-
    > > classes are developed, it will be far easier for programmers to
    > > address additional devices as objects.
    > >
    > > Which is easier to code to read a serial A/D, the numerous code to
    > > control pins and perform bit-banging to accumulate the digital value,
    > > or a single line of code such as:
    > >
    > > temp = ADC0831.read() * conversion_factor;
    > >
    > > The ADC0831 object does all the hard work for us, no more copying and
    > > pasting 10 lines of code which need to be decifered and modified to
    > > fit our code.
    > >
    > > Or how about:
    > > robot.foward(10); // moves robot forward for 10 seconds
    > >
    > > Now, wouldn't these be nice when implemented? [noparse]:)[/noparse]
    > >
    > > The 3 most common goofs in programming with Java and its like:
    > > - Braces to group statements not equally paired
    > > - Case sensitive code
    > > - Missing semi-colons at the end of statements (think of them like
    > > periods. One 'line' of code can be on mulitple screen lines until
    > > ended with a ;
    > >
    > > Having taught both C and BASIC, I think BASIC is actually harder to
    > > learn the essentials because there isn't a common 'core' for
    > > learning BASIC.... the language is all over the place when it comes
    > > to structures of code.
    > >
    > > I think the Javelin is great, and I'm excited at the prospect of
    > > being able to teach my students a structured widely used language,
    > > and still have all the fun of a Stamp [noparse]:)[/noparse] When I teach C, the
    > > students perform endless hours of coding 'calculator' programs to
    > > give a reason for Input and Output. I'd much rather be using
    > > switches and LEDs [noparse]:)[/noparse]
    > >
    > > Last word... the Debugger in the Javelin IDE allows run-time
    > > debugging allowing you to follow your code execution, view contents
    > > of variables, set breakpoints... really cuts down on the debug time.
    > >
    > > Just my 2.5 cents...
    > >
    > > -Martin Hebel
    > > Electronic Systems Technologies
    > > Southern Illinois University
    > > http://www.siu.edu/~imsasa/est
    > > -- AND --
    > > SelmaWare Solutions
    > > Graphics Data Acquisition and Control for your BASIC Stamp
    > > AND Javelin Stamp!
    > > http://www.selmaware.com/stampPlot/samples/javelin/stampplot1.htm
    > >
    > >
    > >
    > > --- In basicstamps@y..., azeasi@a... wrote:
    > > > Does one need to know Java to be able to use the Javelin Stamp? I
    > > would hope
    > > > that it would be as intuitive as the Basic Stamp IDE. In other
    > > words, one
    > > > does not really need to "know" Basic to use the Basic Stamp. Is
    > > this the same
    > > > for the Javelin?
    > >
    >
    >
    >
    > [noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the Subject and
    Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
Sign In or Register to comment.