
Will you hire this guy? - RomanPushkin
http://ro31337.github.io/Will-you-hire-this-guy/
======
greenyoda
_" goto operator in C? It can be simplified. This code smells! He probably
should go and work for Starbucks."_

The use of 'goto' in C to separate error-handling code from main-line code is
a commonly accepted practice.

Also, "goto" isn't an operator.

~~~
andrewguenther
I wouldn't hire this person. And I'm not talking about Linus.

------
wyldfire
`goto` to arbitrary labels can be pretty risky. But `goto` to facilitate a
single-point-of-exit for a function is a pretty sane idiom. It's all over the
linux kernel and I don't think that anyone regrets it.

So I wouldn't state something like "Even Linus isn't perfect," rather "you
should be open minded to learn new development idioms in environments where
you're less experienced."

~~~
vskarine
Agree with you. My first job out of college was working with C code on
embedded modem software and when I saw this pattern and was like WTF?! but
then realized how useful it is to have single point of exit in a function
(especially in embedded systems code).

~~~
Gibbon1
Often it's very useful to have separate returns from functions for errors. The
reason being you can set a break point on the error return and then let the
code run. The code will run normally until the error occurs, which in some
cases may take days.

------
mikestew
I'll use the "vouch" function for the first time ever, because if you think
Roman's an idiot, congratulations, you're in the running for World Champion of
Missing the Point.

Lest you doubt me, let me quote the final sentence which you probably didn't
read after the first, and impulsively felt the need to run back to HN and show
everyone how smart you are: "Author of this code is Linus Torvalds. This world
is not perfect and your judging based on small peice of code just doesn’t
work."

IOW, Roman might very well know C better than you do, and ironically folks
like you might be the reason he wrote the post in the first place.

~~~
minimaxir
I flagged this submission because it was provocative (w/ linkbait title) with
no proportionately intellectual or insightful payoff.

~~~
mikestew
Eh, good point, it was a bit thin on content. I probably should have let
sleeping dogs lie.

As for the other comments, I'm thinking I'm reading this quite differently
than others. That's cool, that's why we have a voting system I guess.

------
borvo
Ok, here's what I got from this - Roman can't spell and doesn't understand how
to code in C. Fail?

------
auvi
If you are wondering the code is from the Linux kernel source:
drivers/usb/core/hub.c

Direct link:
[https://github.com/torvalds/linux/blob/48d10bda1f2c69980601a...](https://github.com/torvalds/linux/blob/48d10bda1f2c69980601a61194015bb0790fb7ab/drivers/usb/core/hub.c)

------
ChuckMcM
I suppose I should be happy that some Fortran code I wrote back in school
wasn't in Github. One of the things I look for in people is their ability to
learn, and to do that they have to challenge themselves, to re convince
themselves when they do something that it is still the right thing to do, the
right path to take, and when they discover new information or new insights
they adapt their behavior appropriately.

It makes me wonder if folks growing up in the permanent digital foot print age
will be able to escape their early years. There is a reason police records for
minors are often sealed, so as adults the things they did as kids don't
permanently stain their lives. It is the basis for the right to be forgotten
movement in the EU as far as I can tell.

------
Xyik
Seems just like click-bait, author makes a point but doesn't really go in
depth or explain his thoughts. And it only works because the author tries to
mislead you : 'This code smells' Why does it smell exactly? Why should he work
at Starbucks?Don't judge a book by its cover, don't extrapolate on a single
data point, or a single piece of code, got it.

------
HelloRipley
When I was working with GStreamer, gotos of this sort were all over the main
workhorse functions in the common elements.

------
zump
Someone should send this to Linus for some juicy popcorn.

