News for hackers. Stuff that matters.
Re:Ruby-jokes/job_interview by pcwalton on Tuesday March 05, 2013 @01:32PM (#5326360)
I really hope nobody has ever actually asked candidates to write quines.
Re:Ruby-jokes/job_interview by sp332 on Tuesday March 05, 2013 @01:22PM (#5326293)
Looks like an upgrade from HQ9+ http://esolangs.org/wiki/HQ9%2B
Re:Ruby-jokes/job_interview by koobe on Tuesday March 05, 2013 @01:35PM (#5326378)
That does not look like a quine to me.
Re:Ruby-jokes/job_interview by Falling3 on Tuesday March 05, 2013 @01:38PM (#5326398)
Well the quine function sure does.
Re:Ruby-jokes/job_interview by sp332 on Tuesday March 05, 2013 @03:46PM (#5327232)
I don't know Ruby, so this is probably obvious, but: Why does quine() need an argument? What good is __FILE__ there?
Re:Ruby-jokes/job_interview by Falling3 on Tuesday March 05, 2013 @07:03PM (#5328363)
Even though you don't know ruby, you should really check out the source code. It's very simple. __FILE__ is a reference to the current file name.

If you'd looked at the source code, you'd see that it's actually a pretty cheap quine, since it has access to that magic variable. You could do the same thing with just:

puts File.read(__FILE__)

Re:Ruby-jokes/job_interview by sp332 on Tuesday March 05, 2013 @07:17PM (#5328455)
Oh man, i was just thinking of this in terms of a REPL and didn't think of incorporating it into a file. duh :) thanks
Re:Ruby-jokes/job_interview by hcarvalhoalves on Tuesday March 05, 2013 @02:01PM (#5326553)
> => "I have a special interest in modular mobile startup platforms."

Sounds legit.

Re:Ruby-jokes/job_interview by pavel_lishin on Tuesday March 05, 2013 @02:17PM (#5326660)
Shit, I think that might be what we actually do.
Re:Ruby-jokes/job_interview by rinrae on Tuesday March 05, 2013 @04:49PM (#5327587)
"Also, most job interviews are dumb, and we felt the need to point this out."

+1.

Also, I'm happy to be working in an industry where you can get a job without these kind of job interviews.

Re:Ruby-jokes/job_interview by mhartl on Tuesday March 05, 2013 @02:11PM (#5326617)
The attention to detail cracks me up. It even has a test suite!