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

334

u/vital_chaos May 08 '15

Yeah I write Fibonacci sequences all the time. It's my hobby. /s Why do people think that writing short test functions in an interview has anything to do with actually delivering products? Sure some ditch digger might fail at these, but does it tell you anything about how well they build actual apps?

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)
→ More replies (146)