Tuesday, 24 April 2007

specifying types on static methods with generics

If you're working with generics and writing static methods sometimes you find the need to specify the type in a generic method. e.g.
class Foo {
public static <T> doSomething(String name) {... }
}
Often the compiler often does the right thing
Cheese cheese = Foo.doSomething("Edam");
but sometimes you really need to specify the type. You can use the following syntax to do that
Foo.<Cheese>doSomething("Edam");
Kinda obscure I know but it might come in handy if you're working with generics.

Wednesday, 18 April 2007

Sharing code snippets online with TextMate

TextMate is an awesome text editor for OS X. I just learnt of a nice plugin from proyal on #codehaus IRC...

When you want to share a code snippet in your editor with others, highlight a bit of code then hit ctrl-command-t and select Paste Selection Online and you can post a link to the code either to a URL or iChat etc. Very cool! :)

Go Sonatype

It looks like Jason, John, Neel and others new venture, Sonatype just pulled off the cloak; good luck guys. Am hoping this helps make Maven even better :).

Maven's like a car; most days it gets you where you wanna get nice and easy with a quite comfy ride (when you wanna build a project no longer do you have to mess around with build.properties files in Ant, hack Ant's build.xml or shove random jars in your ant/lib/ directory or manually install jars or mess with classpaths yada yada). Maven though does need a regular service (rm -rf ~/.m2/repository) and might not always work so well in different terrains. Though when it breaks down and stops working, its such a huge PITA :)

Podcast on Apache ActiveMQ available on feathercast

There's a feathercast of me being interviewed on Apache ActiveMQ available which discusses various things such as Apache ActiveMQ being top level etc. David Reid did a good job interviewing me and an even better job editing out my swearing and mumblings so it vaguely sounds like I know what I'm talking about :). There's a bunch of other interesting podcasts on feathercast too which are well worth checking out.

Monday, 16 April 2007

I love FakeSteve!

If you've not read it yet and you use a Mac then you should stop now and read some FakeSteve.

Its an excellent read; though be warned its quite addictive; I've found myself gradually working back in time for earlier and earlier posts. Any post with Bono in it just has me in stitches. And I love the nick names; My Little Pony, Squirrel Boy etc. LOL.

I'm increasingly thinking its really the Real Steve Jobs though...

First Post!

Am just experimenting with a new blog location. If this works OK I'll move my other blog over to here :)