Q&A





Q&A

Q1:

Is there a reason why the codebase attribute should be used in an applet tag?

A1:

If all Java programs are grouped into their own subfolder, as indicated by codebase, this structure might improve the way a website is organized, but there's no other reason why using codebase is better than omitting it. The choice is a matter of personal preference.

Q2:

What happens if the height and width specified for an applet don't leave enough room for the information that is displayed in the paint() method?

A2:

The information will be drawn off-screen, beyond the edges of the applet window, and won't be visible at any point while the applet runs. Choosing the right dimensions for an applet is largely a matter of trial-and-error until you find the right size for both the height and width attributes of the applet tag. You can't resize an applet window from within a Java program, so the only way to control its size is by using the height and width attributes. Fortu nately, you can change the web page's HTML without having to recompile the Java program.

Q3:

What is the Peter Principle?

A3:

The principle was an idea popularized in the book The Peter Principle: Why Things Always Go Wrong by Laurence Peter with Raymond Hull.

Peter, a Canadian-born author, psychologist and professor, put forth the following principle: In the workplace, every employee rises to his own level of incompetence.

If an employee does a good job, he is repeatedly promoted until he eventually reaches a level where he cannot do the work—and is no longer promoted.

I was promoted to write computer books in 1996 and have remained in the position for nine years.


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows