Aug 02

Over the past couple of weeks I’ve been interviewing candidates for a Java developer position.
I can’t find words to describe my feelings now so I’ll recycle something a friend of mine, who’s also hiring, said:

It’s next to impossible to hire anyone useful now.

My complaint with most of the applicants is that they behave – there’s no other way to say this – machines.

I did what I did because I was told to it. Never really thought about it.

This infuriates me beyond belief.

So here a few tips for your (and my) next interview:

  1. Don’t make up stuff on your CV. Sounds obvious but you’ll be surprised by how many people list technologies they have barely used on their CV and when asked about it don’t have a clue. You have no idea how bad this looks. (The red bullshitter light starts flashing in my head instantly)
  2. Show that you have passion for what you do. Being a Sun certified Java developer is all well and good but when I ask you what you have been looking into recently, or if you’ve worked on something on your own make sure to have an answer; or, if you don’t, make sure you have a good excuse.
  3. If you have 1000 years of experience with something I expect you to have some thoughts about it. Once again, Sun certified Java developer, if I ask you where do you see java going in the next 5 years have an answer! There must be something you think needs improving in Java or that you’d do differently. I’ll go wherever Sun takes me is just not an acceptable answer.
  4. Have an opinion! For God’s sake have one. I’ll even settle for half an opinion. If not about a technology you have used for 10 years at least about the coffee I just bought you during the interview. There’s no point in talking for an hour with somebody who has nothing to tell me other than “I’ll do everything you want, I always did.”
  5. Know what the company you have applied for does! This sounds stupid but I have called people after 1 week of their application and after 10 minutes with them over the phone I found out that they have no idea what the company they applied at was doing. That’s an instant goodbye!
  6. Fill the gaps in your CV, and proof-read it before sending it out for goodness sake. It’s fine that you have taken one year off to travel the world. If your CV does not list anything for the whole of 2009 I’m going to ask you about it. Give me a sincere instant answer and there’ll be no problem. Give me random excuses and it’s goodbye. As for proof-reading I had somebody applying who had listed “quick apprehension” as a skill. I’m not into hiring failed super-heroes. (I assume they ment quick comprehension)
  7. Apply for jobs you are genuinely interested in. You are not likely to get a job if your interviewer notices you don’t give a toss about what you do and who you do it for, and it shows. So Unless you are applying for a position as a nut-packer make sure you’re going for a job you’d actually enjoy doing and are interested in.

Needless to say my search continues.

After reviewing more than 60 CVs I have almost completely given up on websites such as Monster and CWJobs and I’m going to go entirely through connections now.

Tagged with:
Oct 30

Maybe that’s a bit too harsh, maybe recursive query are not evil, it’s just the people who use them.

PostgreSQL LogoI spend quite a lot of time working with PostgreSQL users helping them optimise their queries. When I read that PostgreSQL 8.4 added support for recursive queries I knew that a whole new hellish chapter in my life would begin.

First off. What are recursive queries: (from PostgreSQL manual)

Recursive queries are typically used to deal with hierarchical or tree-structured data. A useful example is this query to find all the direct and indirect sub-parts of a product, given only a table that shows immediate inclusions:

WITH RECURSIVE included_parts(sub_part, part, quantity) AS (
SELECT sub_part, part, quantity FROM parts WHERE part = ‘our_product’
UNION ALL
SELECT p.sub_part, p.part, p.quantity
FROM included_parts pr, parts p
WHERE p.part = pr.sub_part
)
SELECT sub_part, SUM(quantity) as total_quantity
FROM included_parts
GROUP BY sub_part

These structures are commonly used in relational database. Just think about a threaded comment system for a blog or an industry classification for securities on multiple levels (financial data is what I’m most familiar with).

In this latter case you can image that you’ll hardly ever extract industry classification information by itself. It’s generally used as a sub-query to provide additional information about a security, a trade or what have you.

As I said earlier I have nothing against recursive queries per se. However, I can already see people out there creating monster-queries in production systems. The sort of monster query that needs to be executed 50 times a second, the one that just doesn’t work.

Storing and retrieving tree-structured data in SQL is one of my favourite questions in interviews. I always make a point of asking it. Not because it’s particularly challenging technically but because it will tell me a lot about the way the person I’m interviewing thinks about data.

The first part of the question is obviously do design a structure to hold threaded blog comments.

Whether you use a separate table to hold the relationship between nodes or a self-referencing parent id column in the same table I don’t really care. So long as you come up with an answer we can move on with the interview, because the answer to the next part of the question is what interests me.

I will now call your blog page with the ID from an element in your structure, any element. I want you to return instantly the ID of the root element for that branch of the tree.

- Root comment 1
   - Child 1.1
   - Child 1.2
      - Child 1.2.1
   - Child 1.3
- Root comment 2
   - Child 2.1
      - Child 2.1.1
         - Child 2.1.1.1
   - Child 2.2

I will call you with 2.1.1.1 and I want you to tell me 2, instantly. Feel free to change your database structure.

Their answer to this will tell me how they feel about de-normalisation and if they can think in those terms. We are talking about the daft requirements written by a product person who’s clearly gone quite mad. All he cares about is getting the data out quickly, nothing else.

Easiest de-normalised way out is to add a root id column in each comment row. It will make inserting new comments slower but it won’t require any recursion to go back to the top when selecting data.

If all you can come up with is recursive query I’ll be sorely disappointed. It’s cool and elegant but not nearly efficient enough for a high-availability production system.

Feel free to talk about recursive queries when I ask you this question, just remember to put the magic words “materialized view” in front of it. then we can talk.

Let this bet a warning to you. If I find a non-materialized/cached recursive query in your production code I will recursively kick you in the head.

Tagged with:
Nov 25

I have a few things to post but no strength to do it. I figured another one of those trademark Bird and Fortune videos would do just as well.

[youtube=http://www.youtube.com/watch?v=3pcePHasv5w&rel=1]

Tagged with:
preload preload preload