Tag: home

Brew: the future of package management on OSX? Hope not.

Warning: This might come off a little ranty.

You know, it might just be that some people need to install older-than-the-bleeding edge versions of software. Some of us have stable production systems, that for whatever reason, don’t always run the latest, nightly-build-sure-it’ll-be-fine-no-really versions of everything.

Turns out to to this using “brew”, you have to go through some quite odd contortions

  1. Install brew (would assume you’ve already done this at least)
  2. brew update (this makes sure you have the /usr/local/.git directory)
  3. brew versions rabbitmq (I’m looking for 1.7.2 of RabbitMQ in this case)
  4. Copy down the git commit hash of the version I want.
  5. git checkout -b temp_branch $GITHASH
  6. brew install rabbitmq
  7. git checkout master
  8. git branch -d temp_branch

Clearly something like ‘brew install rabbitmq –version=1.7.2′ is far too difficult.

Also, what the hell is with brew littering the root of /usr/local with it’s junk? Is there something wrong with something clean like /usr/local/brew?


Modern Java

While it’s something I’ve been intending to do for quite a while now, I’ve finally managed to actually start using the Guava Libraries. This is a superset project which includes the Google Collections libraries, which are a huge improvement over the traditional J2SE Collections API.

It allows for very quick construction of collections objects: e.g.

final List empty = Lists.newArrayList();
final List populated = Lists.newArrayList("a", "b", "c");
final Map<Integer,MyThing> myMap = ImmutableMap.of(1, object1, 2, object2, 3, object3);

How about functions on lists?

final List spamList = Lists.transform(customers, new Function<Customer,EmailAddress>() {
    public EmailAddress apply(final Customer customer) {
         return customer.getEmail();

There is also a whole lot of other good stuff included, for I/O, Primitives utilities, String manipulation, Networking and concurrency.

Here is a link to some good resources.

Also, I just wanted to link to this article on JSR-310, which is the API that has arisen out of the very excellent Joda Date/Time library, which I endorse and use very heavily.