Archive for the 'Programming' Category
Sunday, March 27th, 2005
Agylen: Comparable vs equals has a nice discussion of how compareTo is used in Sets.
If you don’t understand how Java is going to use your compareTo and your equals methods you can run into a problem with Sets. Basically you shouldn’t have a compareTo() method that returns 0 unless equals() returns true.
Since […]
Posted in Java | No Comments »
Wednesday, February 23rd, 2005
Using JUnit With Eclipse IDE is a great simple tutorial on how to use JUnit in Eclipse. It doesn’t assume any knowledge of JUnit, but is useful as a quick tutorial for people wanting to make a switch to the Eclipse development environment.
Posted in Java | No Comments »
Tuesday, February 22nd, 2005
Reflection is a mechanism in java that allows to to get information about a class without needing to know the type of the class. The program below takes a java class name as a command line argument and shows you all of the methods and field names that are in the class.
You […]
Posted in General, Java | No Comments »
Monday, February 21st, 2005
I’ve been using Eclipse and it is a very nice IDE. I’m very impressed with the number of plugin’s available for it. One of the plugins I’ve been using is called CheckStyle. Basically it can check your code for errors whenever you save it. The errors are configurable and it comes with […]
Posted in Programming | No Comments »
Sunday, February 20th, 2005
There are many situations whey you have information on a web page that needs to be emailed to individuals on a regular basis. Often times all that is needed is some type of script that will grab a URL, put it in an email and send it to the correct person. This article […]
Posted in Technology, Programming | No Comments »
Thursday, February 10th, 2005
First let me say that I’m not a huge fan of Javascript. I understand the need for Javascript, but generally I prefer to program for a server environment instead of worrying about the client. However I ran into an issue this week that required Javascript, so here is what I learned about refreshing […]
Posted in Programming | 1 Comment »
Sunday, January 30th, 2005
I have some XSLT stylesheets that I use to integrate information from Amazon with my reading list on my website. This weekend I decided to create another list using Amazon’s “People Who Bought this Book also Bought” feature. After a couple generations of downloading books that were related to books I read, I […]
Posted in Java | No Comments »
Sunday, January 30th, 2005
The other day when doing some particularly large xslt conversions I kept running out of memory in the JVM. After doing a bit of research I found two command line arguments that help solve the problem. -mx allows you to set the maximum size of the memory allocation pool while -ms allows you to […]
Posted in Java | No Comments »
Saturday, January 29th, 2005
The cut command in unix lets you specify which part of a line you want to echo. For example if
cat file.txt
produces something like:
12345678
23456789
34567890
then you could pipe the file into the cut command to show only the 3rd character like this:
cat file.txt | cut -c 3
3
4
5
You can also specify ranges like this:
cat file.txt | cut […]
Posted in Programming | No Comments »
Sunday, January 2nd, 2005
The new certification test for Java 1.5 (or Java 5 or Tiger) is going to be coming out as a beta soon. According to Kathy Sierra’s weblog the new test is going to avoid the complicated “puzzle” type problems and concentrate more on your ability to accomplish specific objectives with Java code. It […]
Posted in Technology, Programming, Java | 1 Comment »
Sunday, January 2nd, 2005
One of the questions I ran into when preparing for the Java Certification exam dealt with how Java handles nested comments. Since this isn’t something I usually do in my code I wasn’t sure how it worked. It turns out the results were different than I expected.
First lets look at the double slash […]
Posted in Java | No Comments »
Sunday, January 2nd, 2005
After using Java for about four years, I started wondering how well I really understood the language, so I started looking into Sun’s certification. Sun offers the following certifications:
Sun Certified Programmer
Sun Certified Developer
Sun Certified Web Component Developer
Sun Certified Business Component Developer
Sun Certified Developer for Java Web Services
Sun Certified Enterprise Architech
Sun Certified Mobile Application Developer
The […]
Posted in General, Java | No Comments »