seralize my thoughts into posts

Archive for the ‘Uncategorized’ Category

Great developers love tricky challenges. Do you ?

Last time I was looking for a great engineer for my team I  published a post and asked readers to solve a  tricky puzzle.

Results were amazing – got many responses with quality CVs, and eventually  found the right guy.

My conclusion is that developers like challenges, and teasing them with an interesting puzzles can really help you boost your recruitment with great CVs.

We are extending our team again, and we are looking for a brilliant engineer, so if you think you got what it takes here  a new challenge for you.

contact me via twitter or drop your CV via mail – yonatan [at] outbrain [dot] com.

Can you Solve the Puzzle ?

As I posted before I’m  Looking for an outstanding Software Engineer. Interested ? try solve this puzzle, and contact me via twitter or drop your CV via mail – yonatan [at] outbrain [dot] com.

puzzle

Provide an alternate implementation of the following class,  Thunk, that uses no conditional logic. For extra credit, make it thread-safe.

abstract class Thunk {
  private boolean evaluated;
  private T value;
  public T get() {
    if (!evaluated) {
      value = compute();
      evaluated = true;
    }
    return value;
  }
  abstract protected T compute();
}

If you thought about something like this, try to find a more elegant solution.

abstract class Thunk<T> {
  private T value;
  public T get() {
    try {
      value.toString();
    } catch (NullPointerException e) {
      value = compute();
    }
    return value;
  }
  abstract protected T compute();
}

codecleaner – opensource project was born

As part of my work in Outbrain.com I’ve developed a maven plugin to standardize eclipse setting in a multi projects maven environment.

I’ve just shared it in gihub – https://github.com/yonatanm/codecleaner

The codecleaner plugin update the following types of eclipse settings:

  • Code Formatter
  • Save Actions
  • Clean up settings
  • Compiler Error/Warning level
  • JSP/XML/XSD/HTML Validation

more details will be followed soon…