Stupidest ways people solve coding interviews 😅

Video ID: zfYd4qUSRu4

YouTube URL: https://www.youtube.com/watch?v=zfYd4qUSRu4

Added At: 13-06-25 21:17:24

Processed: No

Sentiment: Positive

Categories: Tech, Self-Help

Tags: software engineering, interview, programming, code, tutorial, developer

Summary

The video shares humorous stories about interview experiences as a software engineer. The speaker showcases two examples of poorly written code and praises the creativity behind them. One example is a function that sorts an array by printing out numbers with a delay equal to the number itself.

Transcript

as a software engineer I've given
hundreds of interviews over the last
couple years and the code that some
people write under pressure is pretty
funny so here's some of the stupidest
code that I've seen that's so stupid
it's pretty clever so here's the first
one and is even function I don't think
this person knew what the mod operator
was because look just look at this code
so they get the absolute value of the
number passed in then they set this
Boolean to true then they do a for Loop
going up to that number and they keep
flipping the Boolean from True to false
FSE and then they return whatever the
end result is and it's kind of clever I
mean if you don't have the mod operator
it's basically going up to this number
and then flipping back and forth and if
you flip it back to where it was then
it's even and if you don't it's odd
but kind of crazy so this is probably my
favorite they were asked to sort an
array so given an array of numbers just
sort it so they go through a for Loop
through the whole array and they set a
timeout where it'll print out that
number but only after a delay of that
number and I was like that is genius
this is so good let me show you what
this looks like okay so here I have it
and let me hit enter right
now look at that it's sorts the
array it's so good it's so stupid and so
good now my company didn't let me pass
the last guy but he's a pass in my book
because whoever whips that out during a
programming interview genius genius