Kerry Buckley

What’s the simplest thing that could possibly go wrong?

Archive for the ‘Java’ Category

Java ‘Good for Nothing’?

leave a comment

In Language Explorations, Ola Bini (of JRuby fame) suggests that there won’t be any more ‘big languages’, but instead more of a mix-and-match approach, with different languages used for different parts of an application according to their strengths, all running on the JVM (or presumably .NET if you’re on the dark side).

An interesting opinion (which I’ve slightly mischievously taken out of context here) from the article:

In fact, I’m not sure if Java the language is good enough for anything, anymore.

Written by Kerry

January 2nd, 2008 at 5:03 pm

Posted in Java,Software

String#casecmp

4 comments

As far as I can tell, this is the correct way to do case-insensitive string comparison in Ruby:
[ruby]
if string1.casecmp(string2) == 0
# strings match, ignoring case
end
[/ruby]
That’s so ugly, it almost looks like Java. Actually, it’s worse than Java, which has String#equalsIgnoreCase.

Written by Kerry

November 8th, 2007 at 1:31 pm

Posted in Java,Ruby

An issue with mock-driven development in dynamically-typed languages

leave a comment

First, let me make it clear that I really like BDD, I really like mocks, and I really like dynamic languages. RSpec does a pretty good job of combining all three.

However, there’s one disadvantage that duck-typed languages suffer when it comes to using mocks to drive the design of the interfaces between objects.

Read the rest of this entry »

Written by Kerry

May 29th, 2007 at 10:09 am

Posted in Agile,Java,Ruby

Hi, I’m Ruby on Rails…

one comment

The guys over at Rails Envy have created an excellent J2EE vs Rails parody of Apple’s Get a Mac adverts:

Apparently there are more coming over the next few days.

Written by Kerry

May 14th, 2007 at 5:02 pm

Posted in Java,Rails

cruisecontrol.rb

leave a comment

In case you missed it, those nice people at ThoughtWorks released CruiseControl.rb yesterday.

Read the rest of this entry »

Written by Kerry

March 13th, 2007 at 7:13 pm

BT’s Java SDK part two: making phone calls

leave a comment

Yesterday we saw how easy it is to send text messages using the SDK, so now let’s try making a phone call.

Read the rest of this entry »

Written by Kerry

February 18th, 2007 at 12:02 pm

Posted in BT,Java,Web21C

BT’s Java SDK

4 comments

As I mentioned recently, I now work in the Web21C SDK team. The SDK provides a simple API for programmatically accessing various web services that BT provides, including SMS, conference calls and location services.

The SDK is in public beta, and is currently free (with daily usage limits). Up to now it’s only been available for those crazy .NET folks, but the next release (on Monday, all being well) will extend that to Java, PHP and Python. Rumour has it that Ruby’s in the works too.

I’ve been having a play with the Java version – here’s a sneak preview…

Read the rest of this entry »

Written by Kerry

February 17th, 2007 at 5:01 pm

Posted in BT,Java,Web21C

“Given when then” in JUnit

leave a comment

AS I mentioned at the end of this post, I’ve been convinced by Dan North’s case for using the “given when then” pattern for specifying scenarios during behaviour- or test-driven development, and while I wait for JBehave to be released, I’ve been playing around trying to come up with a way of using the pattern to clarify intent in (Java) unit/acceptance tests.

Read the rest of this entry »

Written by Kerry

January 9th, 2007 at 12:18 pm

Posted in Agile,Java

Testing java code using rspec and jruby

6 comments

Now that rspec runs under jruby, and with a few hours to spare, I thought I’d have a play.

[Update:] I’ve simplified the import of java.util.Date following a suggestion in a comment (from Charles Oliver Nutter, no less!). I also noticed that I wasn’t using rspec’s setup properly (or at all), so I’ve tweaked the samples a little. I haven’t got the code here to try out, so there may be typos.

Read the rest of this entry »

Written by Kerry

December 21st, 2006 at 1:44 pm

Posted in Agile,Java,Ruby

It’s official: two generations out of date

leave a comment

Sun released JSE 6 today, and some of us (for reasons beyond our control!) are still using 1.4.

Still, an as-yet-unknown new project beckons in the new year, so who knows?

Written by Kerry

December 11th, 2006 at 1:47 pm

Posted in Java