Oren Eini

aka Ayende Rahien

Oren Eini

CEO of RavenDB

a NoSQL Open Source Document Database

Get in touch with me:

oren@ravendb.net +972 52-548-6969

Posts: 7,578
|
Comments: 51,203

Copyright ©️ Ayende Rahien 2004 — 2025

Privacy Policy · Terms
filter by tags archive
stack view grid view
  • architecture (608) rss
  • bugs (450) rss
  • challanges (123) rss
  • community (378) rss
  • databases (481) rss
  • design (894) rss
  • development (640) rss
  • hibernating-practices (71) rss
  • miscellaneous (592) rss
  • performance (397) rss
  • programming (1085) rss
  • raven (1445) rss
  • ravendb.net (529) rss
  • reviews (184) rss
  • 2025
    • May (10)
    • April (10)
    • March (10)
    • February (7)
    • January (12)
  • 2024
    • December (3)
    • November (2)
    • October (1)
    • September (3)
    • August (5)
    • July (10)
    • June (4)
    • May (6)
    • April (2)
    • March (8)
    • February (2)
    • January (14)
  • 2023
    • December (4)
    • October (4)
    • September (6)
    • August (12)
    • July (5)
    • June (15)
    • May (3)
    • April (11)
    • March (5)
    • February (5)
    • January (8)
  • 2022
    • December (5)
    • November (7)
    • October (7)
    • September (9)
    • August (10)
    • July (15)
    • June (12)
    • May (9)
    • April (14)
    • March (15)
    • February (13)
    • January (16)
  • 2021
    • December (23)
    • November (20)
    • October (16)
    • September (6)
    • August (16)
    • July (11)
    • June (16)
    • May (4)
    • April (10)
    • March (11)
    • February (15)
    • January (14)
  • 2020
    • December (10)
    • November (13)
    • October (15)
    • September (6)
    • August (9)
    • July (9)
    • June (17)
    • May (15)
    • April (14)
    • March (21)
    • February (16)
    • January (13)
  • 2019
    • December (17)
    • November (14)
    • October (16)
    • September (10)
    • August (8)
    • July (16)
    • June (11)
    • May (13)
    • April (18)
    • March (12)
    • February (19)
    • January (23)
  • 2018
    • December (15)
    • November (14)
    • October (19)
    • September (18)
    • August (23)
    • July (20)
    • June (20)
    • May (23)
    • April (15)
    • March (23)
    • February (19)
    • January (23)
  • 2017
    • December (21)
    • November (24)
    • October (22)
    • September (21)
    • August (23)
    • July (21)
    • June (24)
    • May (21)
    • April (21)
    • March (23)
    • February (20)
    • January (23)
  • 2016
    • December (17)
    • November (18)
    • October (22)
    • September (18)
    • August (23)
    • July (22)
    • June (17)
    • May (24)
    • April (16)
    • March (16)
    • February (21)
    • January (21)
  • 2015
    • December (5)
    • November (10)
    • October (9)
    • September (17)
    • August (20)
    • July (17)
    • June (4)
    • May (12)
    • April (9)
    • March (8)
    • February (25)
    • January (17)
  • 2014
    • December (22)
    • November (19)
    • October (21)
    • September (37)
    • August (24)
    • July (23)
    • June (13)
    • May (19)
    • April (24)
    • March (23)
    • February (21)
    • January (24)
  • 2013
    • December (23)
    • November (29)
    • October (27)
    • September (26)
    • August (24)
    • July (24)
    • June (23)
    • May (25)
    • April (26)
    • March (24)
    • February (24)
    • January (21)
  • 2012
    • December (19)
    • November (22)
    • October (27)
    • September (24)
    • August (30)
    • July (23)
    • June (25)
    • May (23)
    • April (25)
    • March (25)
    • February (28)
    • January (24)
  • 2011
    • December (17)
    • November (14)
    • October (24)
    • September (28)
    • August (27)
    • July (30)
    • June (19)
    • May (16)
    • April (30)
    • March (23)
    • February (11)
    • January (26)
  • 2010
    • December (29)
    • November (28)
    • October (35)
    • September (33)
    • August (44)
    • July (17)
    • June (20)
    • May (53)
    • April (29)
    • March (35)
    • February (33)
    • January (36)
  • 2009
    • December (37)
    • November (35)
    • October (53)
    • September (60)
    • August (66)
    • July (29)
    • June (24)
    • May (52)
    • April (63)
    • March (35)
    • February (53)
    • January (50)
  • 2008
    • December (58)
    • November (65)
    • October (46)
    • September (48)
    • August (96)
    • July (87)
    • June (45)
    • May (51)
    • April (52)
    • March (70)
    • February (43)
    • January (49)
  • 2007
    • December (100)
    • November (52)
    • October (109)
    • September (68)
    • August (80)
    • July (56)
    • June (150)
    • May (115)
    • April (73)
    • March (124)
    • February (102)
    • January (68)
  • 2006
    • December (95)
    • November (53)
    • October (120)
    • September (57)
    • August (88)
    • July (54)
    • June (103)
    • May (89)
    • April (84)
    • March (143)
    • February (78)
    • January (64)
  • 2005
    • December (70)
    • November (97)
    • October (91)
    • September (61)
    • August (74)
    • July (92)
    • June (100)
    • May (53)
    • April (42)
    • March (41)
    • February (84)
    • January (31)
  • 2004
    • December (49)
    • November (26)
    • October (26)
    • September (6)
    • April (10)
Couchbase vs RavenDB Performance at Rakuten Kobo Whitepaper
  previous post next post  
Apr 03 2008

How to get good people: Two phase code tests

time to read 1 min | 50 words

It is fairly common in job interviews to request some sort of a code sample. Generally a solution for a problem that the prospective employer gives the candidate. An interesting twist on that is to go over the code, give a single additional requirement, then see what the result it.

Tweet Share Share 15 comments
Tags:
  • Programming

  previous post next post  

Comments

Kalpesh
03 Apr 2008
04:25 AM
Kalpesh

Wouldn't a real example make the readers of your blog test it?

An interview by Oren ;)

Ken Egozi
03 Apr 2008
06:50 AM
Ken Egozi

When I was interviewing people for my team, I had a twist on that.

I'd have asked people to tell me which is their strongest language (usually c#), and which languages they do not know at all (usually ruby/python/lisp).

Then I would have them do a simple fizz-buzz/string-reverse thing in their favorite language. As people already have pointed out, 90% of candidates CANT WRITE CODE so they couldn't have done that, even with VS2005 (and google) open in front of them.

Of the lucky ones who could code that, I'd have asked to translate their code to the language they do not know ... that was fun !

Dragos
03 Apr 2008
06:50 AM
Dragos

Yes, please, a real example would be great ;)

Tuna Toksoz
03 Apr 2008
07:54 AM
Tuna Toksoz

@Ken Egozi

Which one did they prefer? recursive one or the loop one, or another?

Benny Thomas
03 Apr 2008
08:10 AM
Benny Thomas

Damn, i thought i could write programs, but i don't even know what w fizz-buzz is, so I clearly cant do any thing good in a coding enviroment.

And the scary part: my coworkers need my to help them write code. But try to get them to write tests? And why do I ever try to get dem to refactor.

Plz, hire me, I cant make coffee, but I know how to make a pretty tasteful sandwich!

Rik Hemsley
03 Apr 2008
10:04 AM
Rik Hemsley

A technique I recently tried was to ask the candidate to provide a sample of their code which demonstrates some of their areas of ability. I told them it was OK to provide old code which they found slightly embarrassing as they would be asked to criticise it.

I spent about an hour reading their code and writing down what I thought could be improved (it would have been shorter but they provided quite a lot!). I then asked the candidate to write down how they thought it could be improved.

I then compared their analysis with mine and sent a copy of mine to them, while letting them know I would be happy to discuss any differences of opinion.

I think this worked well, as hopefully the candidate was relaxed and able to give a good account of themselves, meaning that I was able to perform a decent analysis of their abilities.

Dals
03 Apr 2008
13:47 PM
Dals

Not blinking ?

http://www.computerworld.com/action/article.do?command=printArticleBasic&articleId=9072119

The Other Steve
03 Apr 2008
14:17 PM
The Other Steve

I've been interviewing lately. I've now had to take two tests which amounted to a bunch of picky details about the .net framework.

Dals - Interesting article. As a aspie myself, I recommend noise-canceling headphones. ;-)

Jeff Tucker
03 Apr 2008
19:38 PM
Jeff Tucker

I make people write code in interviews and am always astounded at when people can't write something simple, like filtering an array of duplicate values or finding prime numbers (I was once asked what a "primary number" was). I am also usually asked to write code in interviews. However, my attitude on submitting sample code or on writing something prior to the interview (or writing something in order to be considered for the interview) is that I generally don't want to do it. I don't mind doing it if I really want to work at that particular company or if I've approached them and they guarantee that they'll interview me if I send them a simple program, but generally for every job that requires that I submit a code sample, there are three jobs that don't. My time is valuable and I don't want to spend it writing code for you for free, particularly when I could better spend the two hours or so that it would take me to write your program talking to recruiters or interviewing for other jobs that pay just as much as yours does and has the same benefits and writes the same business applications. If you make code part of the interview, even if it's an all-day interview, that's fine with me, but don't ask me to do something on my own time just so that you'll consider interviewing me because I probably won't do it.

joak
04 Apr 2008
07:55 AM
joak

using Ayende.FizzBuzz;

using NUnit.Framework;

namespace FizzBuzz

{

[TestFixture]

public class MyFizzBuzz

{

    [Test]

    public void MyFizzBuzzTest()

    {

          Console.Write(FizzBuzzTest.GetAyendeFizzBuzzString(1, 100);

    }

 }

}

Adam Mills
05 Apr 2008
01:20 AM
Adam Mills

One of our tests is to give them the starting point example from Martin Fowlers "Refactoring". We get them to add new requirements to the already terrible code.

We do this twice, the second time the requirement is aimed at being difficult based on their current design. To see if they will modify it to or fight with the current design.

PandaWood
06 Apr 2008
01:49 AM
PandaWood

"...I was once asked what a "primary number" was"

Ho-hum Jeff ;-) I'm so unconvinced that being able to write a program to find a Prime number is going to give any clue how good someone is. I might fall asleep during your interview. Get some creativity into your coding exercises! ;-) That's what you want?

PandaWood
06 Apr 2008
02:06 AM
PandaWood

Adam Mills, I like your tests with refactoring, this is more like it. Designing, creating and refactoring/dealing with existing code is what it's all about, as I see it.

You don't ask them what a Prime Number is at the end I hope.

joak
07 Apr 2008
08:57 AM
joak

A simple test can be: «Refactoring, what do you do when you read that:

if (testOK == false)

{

        args.IsValid = false;

}

»

Some would immediately write:

args.IsValid = testOK;

but they miss that when testOK is true, args.IsValid can remain false...

I would only rename testOK in a first move. Then think about what is stinky when a variable is named testOk... Something to change, for sure !

Sheraz
07 Apr 2008
20:02 PM
Sheraz

@ Joak

if (testOK == false)

{

args.IsValid = false;

}

Refactored

if(TestIsNotOk())

{

     SetArgumentAsInvalid();

}

Comment preview

Comments have been closed on this topic.

Markdown formatting

ESC to close

Markdown turns plain text formatting into fancy HTML formatting.

Phrase Emphasis

*italic*   **bold**
_italic_   __bold__

Links

Inline:

An [example](http://url.com/ "Title")

Reference-style labels (titles are optional):

An [example][id]. Then, anywhere
else in the doc, define the link:
  [id]: http://example.com/  "Title"

Images

Inline (titles are optional):

![alt text](/path/img.jpg "Title")

Reference-style:

![alt text][id]
[id]: /url/to/img.jpg "Title"

Headers

Setext-style:

Header 1
========
Header 2
--------

atx-style (closing #'s are optional):

# Header 1 #
## Header 2 ##
###### Header 6

Lists

Ordered, without paragraphs:

1.  Foo
2.  Bar

Unordered, with paragraphs:

*   A list item.
    With multiple paragraphs.
*   Bar

You can nest them:

*   Abacus
    * answer
*   Bubbles
    1.  bunk
    2.  bupkis
        * BELITTLER
    3. burper
*   Cunning

Blockquotes

> Email-style angle brackets
> are used for blockquotes.
> > And, they can be nested.
> #### Headers in blockquotes
> 
> * You can quote a list.
> * Etc.

Horizontal Rules

Three or more dashes or asterisks:

---
* * *
- - - - 

Manual Line Breaks

End a line with two or more spaces:

Roses are red,   
Violets are blue.

Fenced Code Blocks

Code blocks delimited by 3 or more backticks or tildas:

```
This is a preformatted
code block
```

Header IDs

Set the id of headings with {#<id>} at end of heading line:

## My Heading {#myheading}

Tables

Fruit    |Color
---------|----------
Apples   |Red
Pears	 |Green
Bananas  |Yellow

Definition Lists

Term 1
: Definition 1
Term 2
: Definition 2

Footnotes

Body text with a footnote [^1]
[^1]: Footnote text here

Abbreviations

MDD <- will have title
*[MDD]: MarkdownDeep

 

FUTURE POSTS

No future posts left, oh my!

RECENT SERIES

  1. Recording (16):
    29 May 2025 - RavenDB's Upcoming Optimizations Deep Dive
  2. Webinar (6):
    27 May 2025 - RavenDB's Upcoming Optimizations Deep Dive
  3. RavenDB News (2):
    02 May 2025 - May 2025
  4. Production Postmortem (52):
    07 Apr 2025 - The race condition in the interlock
  5. RavenDB (13):
    02 Apr 2025 - .NET Aspire integration
View all series

RECENT COMMENTS

  • What a massive presentation! As a person who spent some time with a db written in .NET I can strongly relate to some points. ...
    By Scooletz on Recording: RavenDB's Upcoming Optimizations Deep Dive
  • I’d love to learn your thoughts on SPANN https://arxiv.org/abs/2111.08566 that with centroids and keeping the posting lists s...
    By Scooletz on Comparing DiskANN in SQL Server & HNSW in RavenDB
  • Joel, The DiskANN paper talks about it being viable for more than a billion vectors datasets.  In such a scenario, it would ...
    By Oren Eini on Comparing DiskANN in SQL Server & HNSW in RavenDB
  • Do you know why they chose DiskANN? These things are usually about tradeoffs but it seems DiskANN is just worse in every way.
    By Joel on Comparing DiskANN in SQL Server & HNSW in RavenDB
  • Scooletz, Yes, we look at other stuff. Most of those are _not_ allowing you to build themselves incrementally nor are they...
    By Oren Eini on Scaling HNSW in RavenDB: Optimizing for inadequate hardware

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats
}