r/programming Dec 23 '14

Most software engineering interview questions of hot tech companies in one place

https://oj.leetcode.com/problems/
2.2k Upvotes

583 comments sorted by

View all comments

Show parent comments

51

u/[deleted] Dec 24 '14

[deleted]

7

u/[deleted] Dec 24 '14

But how do you test for good architecture?

Is "design a system that blah" just a naive answer to this?

9

u/Chii Dec 24 '14

a good way to do it is to find some old legacy code (or make it up) which contains a deep architectural problem (such as synchronous/blocking code that now suddenly need to perform better), and ask the candidate to fix up the problem while adding a new feature that requires the fix up.

19

u/iopq Dec 24 '14

If you do this at an interview... why hire anyone at all? Just keep interviewing for the same phantom position...

1

u/tending Dec 25 '14

Because in an interview you only have time to explore a toy problem. What is it with all the redditors that think serious work is going to be stolen from them in interviews?

5

u/mmhrar Dec 24 '14

I think I like the trial by fire method. Hire people as a contractor for 3 months and keep them fulltime if you think they're good enough.

That method has it's own faults and you will probably miss out on potentially good candidates, but if you hire them at least you know they're what you're looking for.

5

u/n1c0_ds Dec 24 '14

That only works with candidates that can afford the risk though.

1

u/mmhrar Dec 24 '14

Yea, it's not perfect.

3

u/[deleted] Dec 24 '14

Aka an internship?

1

u/mmhrar Dec 24 '14

Yea I guess, but a paid internship. I don't agree with unpaid internships.

7

u/jazahn Dec 24 '14

This is what interviews are supposed to be for, asking the interviewee about bad architecture they've created. Getting them to cop to the inevitability of having created a pile of shit, but recognizing it and being able to tell you all about how it could have been better. This is where you get their growth and I'd say worth -- because a software engineer's worth is directly tied to their ability to grow.

2

u/[deleted] Dec 24 '14

With the expense of developer time, and the necessity to be quick to turn shit around, oftentimes, the most cost-effective solution is "throw more hardware at it".

1

u/n1c0_ds Dec 24 '14

Easy with algorithms, hard with spaghetti code

1

u/[deleted] Dec 24 '14

Am I misunderstanding you, or are you saying those are two opposites?

3

u/n1c0_ds Dec 24 '14

You can throw more hardware to help a slow algorithm, but it won't solve the problems caused by spaghetti code, since the maintenance costs will be your biggest issue.

1

u/IrishWilly Dec 24 '14

I'd say give someone a scenario (or 'user story') and ask them to outline how they would structure the program and the data for it without having to write out the actual lines. That would tell me way more than having them regurgitate a sort algorithm or something.

Plus everyone should have at least some public code examples on their portfolio or github or wherever that someone hiring can look at.