James Dixon

Ranch Hand
+ Follow
since Jun 20, 2009
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 James Dixon

Hi Anu

The best way to find out would be to put some break points in the code (for example, in the constructor for Animal and in the UseAnimal 'main' method) then debug your application.

that should give you some idea of the order in which things are initialised

have fun!
11 years ago
Depending on the country there are a number of different recognised Testing qualifications kicking around

If you are in the UK, and don't plan on working abroard then the BCS's ISEB qualification seems to be well regarded.
However if you are working in another then the ISTQB qualification seems to be in more demand.

Note: At a foundation level, both seem to be interchangable
11 years ago
I have to say I haven't worked on Win2003 before, but I can't imagine it would be any different...

Did you try adding the environment variable 'SystemRoot' to see if that managed to sort out the problem?
If not you could also drop down to the command prompt and type 'set' and press enter and see if 'SystemRoot' is listed.
11 years ago
Looking through the selenium source code (here) you can see that the error is thrown if the the environment variable %systemroot% is not found.

As a 'Quick Fix' you could try adding the environment variable SystemRoot to point to the windows directory. But as this is something that windows provides it is a bit surprising that it cannot be found. Which version of windows are you working with?

Or for that matter are you testing on a windows box :-)
11 years ago
Hi Karthik

I think you misunderstand what an abstract class is. Abstract classes cannot directly be implemented (i.e. you cannot call new AbstractClass()). They must be extended to be used.

The idea behind having one is that you may have a concept of, say a Cat, and you have different species of cats.
What you could do is create an interface called Cat and then implement it a number of times to create your different species. This is perfectly acceptable, however as the number of cat species increases this starts becoming more and more unwieldy as you have to implement all methods each time a new species it added so you may end up repeating a lot of code.

One solution would be to create a GenericCat class to hold all the the common code and methods, and then extend this for each of your species, overriding the methods for each species as needed. This poses two problems though. Firstly it allows for the GenericCat to be implemented directly, which we don't want any one to do, and secondly we have to implement all the methods defined in the interface, meaning that when we create our new species we may forget to override one of the methods that we need to, thus introducing a possible error.

A better solution would be to use an AbstractCat class that implements Cat and then only implements the methods that will be common to all Cats.
That way we don't have to worry about developers trying to directly implement AbstractCat(i) as there will be a compile error, or if they forget to implement a method as again this will cause a compile time error. It also means that the code will be cleaner as the abstract class will not be cluttered with empty methods or ones that return arbitrary values (which should also help reduce the risk of error).

(i) Note: I am telling a bit of a white lie at this point as developers can sort of implement AbstractCat, but as it confuses matters I thought I'd leave out the fringe cases. For more info though have a look into Anonymous classes and possibly the use of Reflection.

I hope I haven't confused matters too much :-)
11 years ago
You seem to be pretty much there. All you should have to do is pass in the localized string when listing your log value e.g.:
As a word of advise, if you do go down this route, I would suggest that you override resourceBundle.getString, to pass back a default value if the locale cannot be found.

Other than that have fun!
11 years ago
Hi Dar Var

One way you could do it is to pass property values into your log, that way all you need to worry about is keeping your internationalized versions of the properties files up to date...
See here for more info
11 years ago
Hi Divya

I've had the same problem as well. I think the issue is that the project creation does not initiate a build when it finishes, so you need to make a change, and save for it to generate the gen folder.

For me creating a new java class seemed to do the trick, but I'd imagine just making a change to a file and saving should work too.
12 years ago
Hi Jothi

I haven't tried it myself, but doing a quick search brought up the following link:
http://code.google.com/p/android-bluetooth/

Maybe there is something in their code that allows you to control the length of time the device is discoverable for
12 years ago
Instead of copying the apk file to the sdcard and installing from there you can also use adb from you machine. For more info have a look here:
adb info
and
How to install apk's using adb
12 years ago
Hi Lucky
I think that you have misunderstood what 'extends' does.

Basically when you use 'extends' the class takes on all the properties of the Uber class in addition to its' own, so the reason 'super.' is not needed in front of 'y' is because the class Minor has its' own instance of y.

For simplicity you could think of extends as a flag to tell the compiler to copy the contents of the Uber class into the Minor class without overwriting anything (which then gives you your overrides).

James
12 years ago
Hi Jacob

If you look at the java docs it gives you quite a good explanation about the differences between the two:
Date
Calendar

Personally I wouldn't use either. Joda Time is a lot more developer friendly for any time/date manipulation you want to do.
12 years ago
Hi Aruna

Wikipedia gives quite a good description of what unit testing is, and does...

James
12 years ago
Hi Santosh
Is there any particular reason why you need to do this? As ideally your tests should be designed to run independantly of each other.
The reason for this is that if one fails it won't affect any of your other tests, it makes it easier to pinpoint where a problem is, and should make it easier to update the tests as your program evolves.
12 years ago
Personally I've always found Joda Time to be a great tool to use when it comes to messing around with dates.
It always seemed to be a bit more intuative than the Java API's offering

12 years ago