r/programming • • May 08 '15

Five programming problems every Software Engineer should be able to solve in less than 1 hour

https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour
2.5k Upvotes

2.1k comments sorted by

View all comments

Show parent comments

204

u/mughinn May 08 '15

While I never interviewed anyone, time and time again people who do, write blogs and posts about how only 1 in 200 persons who apply for programming jobs can solve those kind of programs (like fizzbuzz).

I have no idea how true that is, but if it is anywhere close to that, then yeah, if they CAN'T solve those problems it shows a lot about the ability to write apps, mainly that they can't.

66

u/CaptainStack May 08 '15

Why don't I ever get asked FizzBuzz? I feel like all the problems I get in interviews are really really hard.

37

u/eythian May 08 '15

I had one interview where the coding section was first implement fizz-buzz, then write an algorithm to find cycles in graphs.

The first was clearly "can you code, or are we wasting our time", the second was "did you actually learn anything in your computer science course."

13

u/CaptainStack May 08 '15

I don't think I've ever had a first round that wasn't an order of magnitude harder than FizzBuzz.

21

u/[deleted] May 08 '15

A friend of mine was recently asked to implement a spreadsheet application at one interview, and a space invaders game on the other. I think it's about time to start invoicing the interviewers for your time on test assignments.

8

u/SirNarwhal May 08 '15

Exactly. Spent fuckin 2 days making some ridiculous over-engineered game of Rock Paper Scissors in Angular for one test just to have them not respond for 2 weeks in which time I found a job elsewhere. Multiply that by like 30-40 interviews when you're looking and it's more work than a full time job.

→ More replies (1)

39

u/nitiger May 08 '15

the second was "did you actually learn anything in your computer science course."

Oh, sure. Let me just recall something from 2 years ago that I learned as a Sophomore, no biggie.

33

u/NecroDaddy May 08 '15

Two years ago bud? Try 15 for me. I had one week to relearn everything from college.

→ More replies (1)
→ More replies (9)
→ More replies (4)

0

u/[deleted] May 08 '15

[deleted]

12

u/cles30 May 08 '15

I guess you could do that but oh god why?

10

u/zarazek May 08 '15

That's standard queue implementation in functional languages (this data structure is persistent).

8

u/cles30 May 08 '15

ooh you said the magic f word. I must now find out all about this!

→ More replies (1)

6

u/[deleted] May 08 '15

Hey you can do it, it'll just take O(N) to do a push operation. That's the type of out of the box thinking we need. /s

→ More replies (5)
→ More replies (11)
→ More replies (2)

22

u/jakdak May 08 '15

Back when C was the primary development language, I used to ask folks to reimplement the standard library string compare function.

All I was really looking for was a loop and some indication that the applicant knew that strings were basically character arrays.

A very depressing number of folks either couldn't or wouldn't do it.

→ More replies (34)

9

u/joequin May 08 '15

I've was told at several of my first job interviews that I was the first person to successfully solve fizz buzz.

→ More replies (3)

75

u/svpino May 08 '15

Agreed. In my experience, 1 out of 10 applicants know how to solve these problems. The rest taught themselves JavaScript in a weekend and stamp the word "Developer" in their resume.

0

u/[deleted] May 08 '15

[deleted]

56

u/zoomzoom83 May 08 '15

I've interviewed quite a lot of people over the years. These days I hire almost entirely through referrals and networking - meetup.com groups are great - but back when I was openly advertising for positions, a very significant majority of applicants that came across my desk couldn't solve even the most trivial "FizzBuzz" level problem.

14

u/Lawtonfogle May 08 '15

The problem isn't a solution. It is getting something close to a solution. Missing the fizzbuzz happening together, while meaning your answer is imperfect, is vastly better than the people who either don't have a clue what to do or write out 100 print statements.

0

u/[deleted] May 08 '15

[deleted]

→ More replies (10)
→ More replies (6)
→ More replies (14)

38

u/OffColorCommentary May 08 '15

The people who can't pass interviews don't stop applying.

It doesn't take 90% of applicants being terrible for 90% of applications to be terrible.

→ More replies (3)

28

u/coffeesippingbastard May 08 '15

Jesus fuck...

I interviewed candidates at my last company. It was awful.

If I asked candidates "name some data types" they would look at me with a blank face.

Some would give me string or into so I'll move onto "Name some common data structures" shit- I'll take list/stack/queue/linkedlist/tree/heap again...blank face.

If they make it to fizzbuzz- I literally preface the question is "there is no trick- I don't give a shit about efficiency- just get it to work SOMEHOW"
I'll allow for mistakes, nerves, etc but god damn there are a lot of people who work in IT that can't code for shit.

18

u/OneWingedShark May 08 '15

If I asked candidates "name some data types" they would look at me with a blank face.

Type Bob is null record;
Type Steve_Boolean is (True, False, Steve);
Type Negative is Integer range Integer'First..-1;
Type Mike is delta 3#0.1# range 0.0..10.0
with Size => 8; -- Yes, a fixed-point with a step of 1/3rd.

But seriously? Unable to even name types or data-structures? Are these CS graduates of any sort? -- You might have a case for suing the degree-issuing institution for fraud.

→ More replies (19)
→ More replies (8)
→ More replies (25)
→ More replies (39)
→ More replies (14)