Categories
Java Software

Java ‘Good for Nothing’?

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.

Categories
Java Ruby

String#casecmp

As far as I can tell, this is the correct way to do case-insensitive string comparison in Ruby:

if string1.casecmp(string2) == 0
  # strings match, ignoring case
end

That’s so ugly, it almost looks like Java. Actually, it’s worse than Java, which has String#equalsIgnoreCase.

Categories
Agile Java Ruby

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

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.

Categories
Java Rails

Hi, I’m Ruby on Rails…

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.

Categories
Agile Java Rails Ruby Software

cruisecontrol.rb

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

Categories
BT Java Web21C

BT’s Java SDK part two: making phone calls

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

Categories
BT Java Web21C

BT’s Java SDK

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…

Categories
Agile Java

“Given when then” in JUnit

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.

Categories
Agile Java Ruby

Testing java code using rspec and jruby

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.

Categories
Java

It’s official: two generations out of date

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?