Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Jaime M. Tovar

Ranch Hand
+ Follow
since Mar 28, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jaime M. Tovar

Doesn�t warranties that your task will be executed in exactly 10 milliseconds. It will awaken in 10 milliseconds and will be added to a queue, it will still have to wait till it comes it�s turn to be the thread in execution.

I think it is better option to use a timer.
14 years ago
You have to add the bin directory to the environment. In XP I think you have to go to My computer, advanced properties and environment variables. Look for the path one and add the route for your bin. Then open a new command window so it has taken the change into effect.

You must check again the �cp option in your docs. Maybe your are not positioned in the right directory when you are calling the java command. If you have a package like com.javaranch.example don�t try to run from the example dir. You have to run at the root directory where the com dir is located.
14 years ago
You only get 8 Strings because there is no String to get between �^^�. If you only want to count the number of �^� in the String you will need to take another approach.

Which is the specific task you have to accomplish with your program� maybe by knowing somewhat more it will be easier to understand your problem.
14 years ago
JRE has everything you need to run your java application. But lacks the development tools as the compilers and things like that.

The JDK is focused in development, it includes everything you need to run your application, but also it includes development tools as compilers.

Usually as a developer you work with a JDK and your clients will use a JRE make use of your application.
14 years ago
In your concept of decoupling you are decoupling the implementation, but you depend on the definition (the interface) to even compile. So you can compile A but it still depends on X (or its implementation).

I wrote about the example of the abstract class because I focused in the working part. You can define the abstract class without depending in the child. Without the child, there is no-one to do the work at run time so you still depend on the implementation execute. But it is just my opinion.

A jar is not a good translation of a module in java world. A jar is a way of packaging as you have said. But you still can have a complete module without even a jar.

There are times you can compile a jar without one or more specific implementations. For example you can work with a Connection interface without knowing which JDBC specific implementation you will be using at run time. You still depend on the JDBC definition.

I think all the coupling examples in the wikipedia reference, use the module concept to explain the characteristics of each specific example. I think that�s because dependencies are used usually al module level of abstraction.
14 years ago
Using my own logic and the emphasis in the class concept in your definition, I can tell yes, because a child class depends on the parent class to do its work�

But by definition usually dependency is used in a context of modules, not just a single class. You usually don�t need to care too much about how much a class depends on other classes as long as it is clear the responsibility of each class.

And in fact there are many gray areas. For example an abstract class depends on a child class, if there is no child class there is no one to do the work.
14 years ago
They can put you properties file in their own classpath. You have something like this.
/lib/Class1.class
/lib/Class2.class
/lib/Class3.class
/lib/config.properties

Your clients have something like this.
/new/ClassA.class
/new/ClassB.class

Then you jar all your .class files in lib.jar. (without the config.properties)

So your clients want to use your libraries. They can do something like this.
Import/add to classpath your lib.jar
Add a config.properties to their project so it looks like this:
/new/ClassA.class
/new/ClassB.class
/lib/config.properties

They can now jar their project including .class and .properties into new.jar and deploy both lib.jar and new.jar.

I hope it helps
[ September 25, 2007: Message edited by: Jaime Tovar ]
14 years ago
�The methods in the shared object class that manipulates the pesistent account data has to be ~both~ synchronized and static...so all new object references will access the same method(s) that access the persistent data. is that right?�

If you make the method static in a separate object it will be a bottle-neck. Here is other option so you can work directly with the account object.

The variable scope was defined when the variable was declared, not when it was used.
[ August 31, 2007: Message edited by: Jaime Tovar ]
14 years ago
When you spend more time writing the same code again and again, than learning new things about the language it is time to switch to an IDE. A good example is the public static void main(String [] args), when you start singing it in your mind before writing it, start learning how to use a good IDE. The tools you use and how you use them are very important abilities in any environment not just programming, and remember they are there to boost your productivity.
14 years ago
Try creating a hash where the letter is the key and the value is the number of occurrences, then you can get a char array from the original string. At the end you can get a set from the hash and order it first by number of occurrences and then the alphabetical order.
15 years ago
I think its a cvs header not something related with eclipse. Take a look to "cvs version control" in google.
15 years ago
The String array is an object by its own. When you ask in the hashmap for the value of the key you get the array object. Try to wrap the array so it will print in a clean way. You can use the array to create a structure that will make it easier to handle the data. Something like a Collection or alike.
15 years ago
Probably an infinite loop or recursion, it exhausts the heap and java crashes.
[ May 14, 2007: Message edited by: Jaime Tovar ]
15 years ago