31

I did a job interview recently for a company and the test was something like this.

In ruby, write a web server that will serve a specific line number from a text file.

I thought up a simple solution and a more advanced solution, but I opted to go with the simple solution and submit my work quickly. I made a nice web server with tests and everything and it used the sed command to get the line number from the file.

Now, they had various instructions, like it had to perform. They asked how it'd perform with 10G, 100G files. I thought "Eh... it'll be alright."

The solution they were looking for was the "advanced" solution that I thought up, which involved storing a binary file of 32/64 bit integers that reference the byte-offset of the line they're looking for. Basically a binary index file.

This violates all of my sensibilities, because I would never build a database indexer like this using ruby, of all things.

I thought it was a stupid test, and how do these companies honestly expect me to spend hours coding and then tell me I didn't go far enough? It's unethical.

I actually followed-up with the "advanced" solution a couple hours after hearing I was out, just to show them that their process is flawed.

Comments
  • 2
    hours?
    why not shove the entire thing into a database, and use row number as index?
  • 3
    I have written more than one letter of rejection to companies whose interview questions and methods have indicated a fundamentally broken understanding of software development and developers. I find it best to avoid that kind of hell up front. Admittedly, I can only do this because I already have a good job and lots of work experience. Good Luck!
Add Comment