Prof. Bill's Coding NotesI found myself making little Post-it reminders all the time while I was coding. Finally, I decided to create this page instead. The notes are sorted by topic. JavaI will post Applet and non-Applet (main() method-based) program templates on the k: drive. You should (almost) never start with an empty screen. Get a starting template for a new class or applet and start with that. Show me your template(s) when you have them. jGRASPAll things said, I really like jGRASP... it's lean and mean. Notice that it only adds a single file to your folder to take care of its business. The things I don't like so much:
At North Central, jGRASP can be found in the "Network Programs" menu under Start. Get proficient, get in a groove and always use:
When generating your Javadoc documentation (it's in the Project/Generate Documentation menu), add the -author option to "Additional Command Flags". I have looked at the options page for Javadoc trying to find a way to make the pages less verbose (like cutting out the "Nested Class Summary", for example), but I have not been successful. Speaking of Javadoc, the tags I want to see everyone use are:
When you build or compile and get an error, double-click on the error in the status window at the bottom and the cursor will move to that line of code in your editor window. AppletsWhen viewing Applets in your internet browser, beware the "hard caching" that browsers like Firefox do with Applets. If you change your Applet and do a reload in the browser, it won't load in your new Applet code. The only way I know of to get the browser to actually re-read your applet Java is to quit the browser and start it up again. The browser's refresh only updates the HTML the browser reads, not the Java. You must get comfortable working with both Applets and Java application programs (that use main()). In general, I use main() while I'm coding because it's faster (^B, ^R, rinse, repeat). Once I have a stable version, then I may turn my application into an Applet. Remember, an Applet is just a fancy Frame. To add an Applet to a web page, you need to add a single line of HTML code. Here's how I added my RTreeApplet to a web page: <applet code="RTreeApplet.class" width="500" height="500"></applet> In this case, RTreeApplet.class must be in the same folder as the web page. Doing this is a nice way to post your Applets on the internet and also print the output of an Applet.
|