Tuesday, May 1, 2012

What kind of developer are you?


(1) Russian technology or Dr. Simplify

public Customer save(Customer customer) {
  inject();
  try {
    check(customer);
    Customer saved = customerService.save(customer);
    return customerDao.detach(saved);
  } catch (Exception e) {
    Messages messages = handleException(e);
    customer.setMessages(messages);
    return customer;
  }
}

(2) Mr/Mrs 2003


public Customer save(Customer customer) {
  return new BoundaryTemplate() {

    @Override
    public Customer wrap(Customer customer) {
      check(customer);
      Customer saved = customerService.save(customer);
      return customerDao.detach(saved);
    }
  }.executeOn(customer);
}

(3) Human minifier


@BoundaryWrapper
public Customer save(Customer customer) {
  check(customer);
  Customer saved = customerService.save(customer);
  return customerDao.detach(saved);
}

I have a strong bias that might surprise you, but please give me your votes before I confess.

Why do we need another compiler generator?

A conversation I had with Terence Parr, the creator of ANTLR, about why there is a new version of ANTLR.