Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 5,972 | Comments: 44,524

filter by tags archive

FAIL can impress, too

time to read 2 min | 308 words

I mentioned that a quick way to setup things for me to think that a candidate is a bad idea is to send us a UI project. This is usually a very strong indication that the candidate doesn’t really have any idea what they are doing. They have been doing Win Forms projects, so they write the code for the task at hand in buttom1_Click event handler. Or inside the Page_Load code in an ASP.Net WebForms application if they are “web developers”.

On the other hand, here is a strong counter example. We had a candidate send in a WinForms project, as I said, that is usually a bad sign. But then I actually looked at his code:

image

And here is a single method:

image

This code is several levels of too complex for the task.  It can be easily simplified to a great degree quite easily.

But the key point from this, and the reason that this candidate has an interview later this week, is that this demonstrate a bunch of things:

  • Understanding of separation of concerns.
  • Code that actually does what it is supposed to do.
  • Proper integration between UI & backend code (for example, we are working with large files, so we have progress bars and off-the-UI-thread work).
  • The UI doesn’t look like it was put together by a hiccupping monkey.

I can work with this. There are things that need to be improved for what we do, but there appears to be a SOLID foundation here.


Comments

Jahmai Lay

It's not the point of the article, but that code screenshot is unreadable, even when zoomed.

Ayende Rahien

Jahmai, That is quite intentional.

hilton smith

congrats to the candidate who will no doubt read this blog post. its official. you're not a "hiccupping monkey"...

:D

Brian

Jahmai, That is quite intentional.

Sorry Oren, but I'm calling bullsh** on that answer.

Ayende Rahien

Brian, Well, fine. I am happy to be a fertilizer provider, in that case.

Brian

:)

Bill Davis

I would be worried that you have a procedural programmer on your hands. Separation of concerns is great, but I wouldn't call that snippet SOLID. It's certainly breaking the SRP for the method in question; even without reading the code, there's no way that method has a single responsibility.

peter

@Jahmai I agree with Oren here. We have a rule-of-thumb in our group that any function that you have to scroll the screen to see the end of is too long.

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

No future posts left, oh my!

RECENT SERIES

  1. Production postmortem (5):
    29 Jul 2015 - The evil licensing code
  2. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
  3. API Design (7):
    20 Jul 2015 - We’ll let the users sort it out
  4. What is new in RavenDB 3.5 (3):
    15 Jul 2015 - Exploring data in the dark
  5. The RavenDB Comic Strip (3):
    28 May 2015 - Part III – High availability & sleeping soundly
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats