> Maybe because an applet a day sends the bad students
> away.
*lol* I wish it were that easy.
My assumption: because "every teach yourself Java" book assumes an applet to be the best thing to do for a beginner, and the teachers get all their knowledge and didactics from those.
> Applets are very hard to debug, they have a slow
> development cycle, Web caches cause problems and the
> security restrictions limit what can be achieved.
Because many teachers themselves learned Java from bad books and think it's the way to go ...
Personally I'd be much to lazy to give such examples, I'd rather give examples that could easily be verified using a JUnit test.
> My guess is because there's a fear of the command
> line. I'll bet those same teachers tend to make
> their students use IDEs as well.
Part of the problem is that most courses are too short to get into some of these things. There is such a spectrim of things to try and teach to people in such a short amount of time. Personally I would actually prefer to see the first course be a logic course complete with flow charts. The language is much easier to pick up than the algorithms, and I also suspect it would be easier to pick up a language when they realize how linear computers really are.
>
> Or maybe they think an applet will feel more "real"
> to the students because it's contained in a browser,
> which is an application they recognize.
Maybe it's all just because they're using ancient textbooks, back before the formalized Collections Framework and when applets were Java's raison d'etre.
Heaven forbid we simply give our schools more money. There are billionaires who need government handouts, dammit! (This message is about US politics.)
> Maybe it's all just because they're using ancient
> textbooks, back before the formalized Collections
> Framework and when applets were Java's raison
> d'etre.
>
> Heaven forbid we simply give our schools more money.
> There are billionaires who need government handouts,
> dammit! (This message is about US politics.)
Don't think it's only specific to the US. However those handouts do create jobs .... That is a discussion for another topic and another forum. Besides all money for books will be needed to buy texts that show that we only have 8 planets not 9
> Maybe it's all just because they're using ancient textbooks...
And I don't buy that for a hot dang second. Based on my personal experience, students are "encouraged" to buy the "new" editions each year which often differ only superficially from previous editions, yet carry hundreds of dollars of costs when the previous editions would work just dandily.
~
> Applets are very hard to debug, they have a slow
> development cycle, Web caches cause problems and the
> security restrictions limit what can be achieved.
Most courses follow a book. Most books teach it that way.
Someone could write a different book. They would have to promote it to get it into use.
Someone with lots of spare time....
> Someone could write a different book.
I recommend the following:
[url=http://www.sun.com/books/catalog/gosling_JPL4.xml]The Java Programming Language - 4th Edition[/url], Arnold, K., Gosling J., Holmes D. (2006).
[url=http://www.amazon.com/gp/product/0596009208/qid=1143065568]Head First Java[/url], by Bert Bates and Kathy Sierra
:o)
~
> > Maybe it's all just because they're using
> ancient textbooks...
>
> And I don't buy that for a hot dang second. Based on
> my personal experience, students are "encouraged" to
> buy the "new" editions each year which often differ
> only superficially from previous editions, yet carry
> hundreds of dollars of costs when the previous
> editions would work just dandily.
In college, yeah, there's a tremendous scam to undermine the market in used textbooks by coming out with marginally different "new" editions each year.
In grade school, where the schools provide the texts, they use ancient texts.
> ve to promote it to get it into use.
> >
> > Someone with lots of spare time....
>
> Me! I can't even write my one name with any clarity
> never mind try to explain complex stuff I don't
> undertand myself.
Are you my little twin brother in disguise? ;-)
kind regards,
Jos
> ve to promote it to get it into use.
> >
> > Someone with lots of spare time....
>
> Me! I can't even write my one name with any clarity
> never mind try to explain complex stuff I don't
> undertand myself.
Errr...have you actually read a couple of text books?
Although the job requirements probably do list that apparently those that do the hiring don't verify it all the time.
And the actual writing isn't that difficult. Organizing it and generating the determinism to do it are much harder.
> > There are billionaires who need government
> handouts, dammit!
>
> Handouts? It's the billionaires that are giving money
> to the government in the first place.
The trend in tax law has been to avoid taxation of old wealth, and tax the middle class instead. If you earn income in the US today you pay a higher tax rate than a lazy ******* who inherited it. And then that tax money goes to the DoD whence it goes to corporations owned by the lazy bastards.
> (This message
> is in refutation of the "rich people are evil"
> meme.)
Rich people aren't necessarily evil. (Though some certainly are, and it's hard to be good when you've been spoiled all your life and told that you're better than everyone else.) The US tax law is evil though, and scarily reminiscent of the tax system that turned the late western Roman empire into Dark Ages Europe.
> Maybe it's all just because they're using ancient
> textbooks, back before the formalized Collections
> Framework and when applets were Java's raison
> d'etre.
>
> Heaven forbid we simply give our schools more money.
> There are billionaires who need government handouts,
> dammit! (This message is about US politics.)
We're talking about higher education here aren't we? You buy your own books, so I fail to see what how much money the schools get has to do with anything. Besides, the public school system already gets more money than it needs, the problem is it's absorbed by a bloated bureaucracy. Every four years there's another bond to fix the same problems the last bond was going to fix and it passes every time because it's "for the children". Nobody ever wants to ask where the hell the money from the last bond went and why it didn't fix them, nor why we should expect that this one will work when the last ten didn't.
> For things which want a simple canvas - such as the
> Mandelbrot image I had as the 4th Java exercise in my
> university course - applets are quicker to set up
> than frames. No need to explain frame.pack() etc. So
> they're not always inappropriate.
Sorry but I don't buy this. Whether using Applets or Frames one still has to understand AWT including layout managers and one still has to understand event driven programming.
Instead of AWT's pack() and setVisible() one has to create an HTML page that defines how the Applet is displayed, place some code in the init(), start(), stop() etc methods and one has to deploy this into a Web server. If one wants to get anywhere near the file system one needs to either sign the applet or update the sandbox to allow it.
> > Sorry but I don't buy this.
>
> Read it again. You seem to have missed the words
> "simple canvas". With an applet I just have to
> override paint(Graphics).
:-) OK! So you just have to override paint() and then create an HTML page and then install the whole in a Web server.
> > Sorry but I don't buy this.
>
> Read it again. You seem to have missed the words
> "simple canvas". With an applet I just have to
> override paint(Graphics).
So we are not arguing over vapor, I decided to create a simple example both as an Applet and as an AWT application.
Applet -
import java.awt.*;
public class MinimalApplet extends java.applet.Applet
{
public void paint(Graphics g)
{
super.paint(g);
g.setColor(Color.BLUE);
g.fillOval(0, 0, getWidth(),getHeight());
}
}
with HTML
<HTML>
<BODY>
<APPLET codebase="classes" code="me/sabre150/test/MinimalApplet.class" width=640 height=480></APPLET>
</BODY>
</HTML>
Application -
import java.awt.*;
public class MinimalAWT extends Canvas
{
public void paint(Graphics g)
{
super.paint(g);
g.setColor(Color.BLUE);
g.fillOval(0, 0, getWidth(),getHeight());
}
public static void main(String[] args)
{
Frame frame = new Frame();
Canvas canvas = new MinimalAWT();
canvas.setPreferredSize(new Dimension(640, 480));
frame.add(canvas);
frame.pack();
frame.setVisible(true);
}
}
So yes, there is less Java code in an Applet but this is pretty much offset by the HTML.
I know which I pefer.
> I know which I pefer.
Me too; I don't like graphics:public class SimpleApp {
public static void main(String[] args) {
System.out.println("BLUE");
}
}
kind regards,
Jos ;-)
> Applets are very hard to debug, they have a slow
> development cycle
This is not true. They can be debugged just as easily as a regular app. Compilation is the same. You can see runtime errors in the Java Console.
> Web caches cause problems
You can either set the cache policy or run with the appletviewer.
> security restrictions limit what can be achieved.
This is not a problem if the applet is signed or is granted the permissions in the policy file.
There's not much difference in creating a GUI application than an applet. Whenever I've been required to create an applet, I make it so it can also be run as an application.
// AppApplet.java
import javax.swing.*;
public class AppApplet extends JApplet {
public void init() {
getContentPane().add(new ApplicationPanel());
}
public static void main(String args) {
JFrame frame = new JFrame("App-Applet");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(new ApplicationPanel());
frame.pack();
frame.setVisible(true);
}
}
// ApplicationPanel.java
import javax.swing.*;
public class ApplicationPanel extends JPanel {
...
}
> > Applets are very hard to debug, they have a slow
> > development cycle
>
> This is not true.
Let us agree to differ then. Rather than edit, compile and run you have to edit, compile, jar, sign, deploy then run.
> They can be debugged just as
> easily as a regular app.
I disagree. Yes you can do simple System.out stuff but using something like gdb is much more difficult. Not that I'm proposing that students should use gdb.
> Compilation is the same.
We agree on that.
> You can see runtime errors in the Java Console.
and that.
>
> > Web caches cause problems
>
> You can either set the cache policy or run with the
> appletviewer.
Adding to the learning burden of the Student. So the Java new comer has to learn about setting the cache policy before learning about Java.
Applet viewer does not have the same security restrictions as Web Browser. If the student only uses Applet viewer to run his programs then he might just as well use the command line.
>
> > security restrictions limit what can be achieved.
>
> This is not a problem if the applet is signed or is
> granted the permissions in the policy file.
Once again adding to the learning burden of the student. How to Jar classes. How to Sign jars. How to set security permissions.
>
> There's not much difference in creating a GUI
> application than an applet. Whenever I've been
> required to create an applet, I make it so it can
> also be run as an application.
Yes, I do the same but once again adding to the leaning burden of the student.
> > // AppApplet.java
> import javax.swing.*;
> public class AppApplet extends JApplet {
>public void init() {
>getContentPane().add(new ApplicationPanel());
> }
>
>public static void main(String args) {
>JFrame frame = new JFrame("App-Applet");
>
> rame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
> frame.getContentPane().add(new
> ApplicationPanel());
>frame.pack();
> frame.setVisible(true);
>}
>
>
> // ApplicationPanel.java
> import javax.swing.*;
> public class ApplicationPanel extends JPanel {
>...
>
On these forums I see many questions on Applets from Java students who would like to get on with learning Java but are hindered by trying to understand the idiosyncrasies of Applets.
> Rather than edit, compile and run you have to edit, compile, jar, sign, deploy then run.
You don't have to jar, sign or deploy them.
It just occurred to me that the sandbox could actually be a reason. Students do do silly things, either unintentionally or as badly thought through pranks, so it's either code review (which obviously would be preferable but does take lots of time) or run in a sandbox of some description.
> On these forums I see many questions on Applets from
> Java students who would like to get on with learning
> Java but are hindered by trying to understand the
> idiosyncrasies of Applets.
I really don't think Applets add much to the learning curve. If someone can understand data structures and algorithms, this should not be a problem. And yes, I believe students should tackle a beginner algorithms course before learning Java or any other programming language.
We need to give students more credit and stop dropping standards to cater to a few.
@ YAT_Archivist: good catch on the sandbox issue
> In grade school, where the schools provide the texts,
> they use ancient texts.
I agree 100 %. I think one possible solution would be for the school district to hire a well qualified Java proffesional that could come up with a current course outline that teaches the important concepts of OOP. Than it just becomes a matter for the school to basically build and print their own text books. There is an aweful lot of current material on the web.At this site for example.
Another option for public schools would be to strike some kind of deal with one of those online tech library like Safari Books or Books 24x7.
Maybe some day in the future when all students have laptops and every house has a fiber optic link, thats how it will be, but thats a farr way off.
Just my 2 ¢.
JJ
//I agree that Applet is difficult to debug. (Because applet use thread)
Teacher may think that students will be happy when they learn fancy GUI.
It is much better than students learn programming from flowchart and some oo concept before they learn Java.
I start Java programming on Applet in my career. It is not difficult to use Java but it is very difficult to use it properly and efficiently.
> > > Applets are very hard to debug, they have a slow
> > > development cycle
> >
> > This is not true.
>
> Let us agree to differ then. Rather than edit,
> compile and run you have to edit, compile, jar, sign,
> deploy then run.
Are you suggesting that books that teach via applets and teachers that do the same always, or most of the time, use a web server rather than the applet viewer?
> > In grade school, where the schools provide the
> texts,
> > they use ancient texts.
>
>
> I agree 100 %. I think one possible solution would
> be for the school district to hire a well qualified
> Java proffesional that could come up with a current
> course outline that teaches the important concepts of
> OOP. Than it just becomes a matter for the school to
> basically build and print their own text books. There
> is an aweful lot of current material on the web.At
> this site for example.
At least in the US (and more than a few other countries) you can't just extract anything you want, print it up, and use it in a classroom. Copyright prevents that not to mention that some accountablity for the actual facts would be nice as well.
> Are you suggesting that books that teach via applets
> and teachers that do the same always, or most of the
> time, use a web server rather than the applet viewer?
No, I'm suggesting that I've never used a browser (and I've used quite a few) which wasn't capable of rendering an HTML page from your hard drive without any web server being required.
> > Are you suggesting that books that teach via applets
> > and teachers that do the same always, or most of the
> > time, use a web server rather than the applet
> viewer?
>
> No, I'm suggesting that I've never used a browser
> (and I've used quite a few) which wasn't capable of
> rendering an HTML page from your hard drive without
> any web server being required.
Your point is unclear to me.
One because I wasn't responding to you.
Two because it isn't clear how your point is a counter to mine. I was pointing out that, regardless of the methodology, that one doesn't need a web server (nor jaring an deploying) and apparently you are saying the same thing?
> > In grade school, where the schools provide the
> texts,
> > they use ancient texts.
>
>
> I agree 100 %. I think one possible solution would
> be for the school district to hire a well qualified
> Java proffesional that could come up with a current
> course outline that teaches the important concepts of
> OOP. Than it just becomes a matter for the school to
> basically build and print their own text books. There
> is an aweful lot of current material on the web.At
> this site for example.
I would challenge the premise that a grade school should be offering classes in programming to begin with. That's a bit too far off topic for this forum though. Suffice it to say I see no reason classes specific to a profession be taught in high school. I took college courses while I was still in high school and see no reason those that are interested and able couldn't do the same.
> I would challenge the premise that a grade school
> should be offering classes in programming to
> begin with. That's a bit too far off topic for this
> forum though. Suffice it to say I see no reason
> classes specific to a profession be taught in high
> school. I took college courses while I was still in
> high school and see no reason those that are
> interested and able couldn't do the same.
Actually, I do see a reason people couldn't take college courses. However, in such circumstances it's fairly well assured that providing classes like this in high school with any value would be nearly impossible.
> I would challenge the premise that a grade school should be offering classes in programming to
> begin with. That's a bit too far off topic for this forum though. Suffice it to say I see no reason
> classes specific to a profession be taught in high school. I took college courses while I was still in
> high school and see no reason those that are interested and able couldn't do the same.
Why shouldn't a grade school have programming classes? My grade school taught us BASIC when I was in about third grade--and that was 1983. Then we learned Logo. You could have procedures/functions in Logo--even if most ended up being used for drawing pictures, you could still learn something about programming. I didn't have any computer classes of any sort in high school (except at an Explorers Post--none taught by or related to the school itself, though). But, I'm not sure programming is really "specific to a profession". A basic understanding of computers and programming will probably help most people--it certainly shouldn't hurt them. Introducing students to programming will only open their eyes to other potential opportunities for careers. You don't need to be a software engineer to have a use for programming.
> Why shouldn't a grade school have programming
> classes? My grade school taught us BASIC when I was
> in about third grade--and that was 1983. Then we
> learned Logo. You could have procedures/functions in
> Logo--even if most ended up being used for drawing
> pictures, you could still learn something about
> programming. I didn't have any computer classes of
> any sort in high school (except at an Explorers
> Post--none taught by or related to the school itself,
> though). But, I'm not sure programming is really
> "specific to a profession". A basic understanding of
> computers and programming will probably help most
> people--it certainly shouldn't hurt them.
> Introducing students to programming will only open
> their eyes to other potential opportunities for
> careers. You don't need to be a software engineer
> to have a use for programming.
First, there's a difference between courses catered to software development and learning things like OOP and a course on general computing. The former probably isn't appropriate for high school, the latter I would expect. It's analogous to the difference between offering a class on driving and and offering one on truck driving and transporting hazardous materials.
I was too generic in saying "programming". An abstract introduction to software development certainly seems appropriate and for the purposes of that I'd expect to see C++, or BASIC or Java used to teach. In such a case why would we need the latest book with updated information? At that point the language is just a tool used to introduce them to programming, they don't need to know the latest enhancements and features nor do they need to be aware of the latest advancements in language theory.
In other words, I understand and could support a "programming" class that is a general introduction in much the same way wood shop was to being a carpenter. At that point, however, a book that's a year old is unlikely to be of significant value to a book that's five years old. Once you get to the point where that's of significance you're probably talking about classes that don't belong.
> > I would challenge the premise that a grade school
> should be offering classes in programming to
> > begin with. That's a bit too far off topic for
> this forum though. Suffice it to say I see no
> reason
> > classes specific to a profession be taught in high
> school. I took college courses while I was still in
> > high school and see no reason those that are
> interested and able couldn't do the same.
>
> Why shouldn't a grade school have programming
> classes?
I agree with that iff "programming" is taught as a vehicle for expressing abstract ideas in concrete form (and--vital for grade-schoolers--a form that provides direct, immediate, visible feedback), and as a general, high level introduction to "the way computers work."
The latter falls under the same umbrella as the shop class I took in 7th and 8th grade. I learned the fundamentals of how an internal combustion engine works, and had to troubleshoot a really simple probablem--mis-gapped plug or something. I couldn't use that knowledge to do any serious repairs on my mom's car, but it made me conversant in the conepts and "workflow." Likewise electrical circuits, although I had a pretty solid grasp on them before going in, thanks to following around the electrician that wired the expansion to my dad's restaurant, and to the Radio Shack 150 in 1 Electronic Project Kit I got for Christmas one year. Good times. :-)