News for hackers. Stuff that matters.
Re:Just compile some Scala code to get an interview by raganwald on Monday May 02, 2011 @11:29AM (#2506577)
To all the naysayers here:

Please remember that the set of people who read HN is NOT representative of the set of people applying for programming jobs. Something that may seem trivial to the point of insulting here may be an effective way of filtering hundreds of really bad resumes out of the process.

For example, the very act of installing and properly running "Hello World" in your language is probably going to cut your pile of submissions by 50% or more. It's a fizz-buzz filter. It isn't meant to try to filter the top 50% of HN readers from the bottom 50% of HN readers, or to identify the Scala programmers but reject anyone who solves the "puzzle" in Python or PHP, it's meant to filter out the folks who can't get anything to work in any language.

No big deal really, it's not like they're promising you a job if you solve the puzzle. They just want to cut the submissions down to a manageable number by eliminating the no-hopers.

Re:Just compile some Scala code to get an interview by petervandijck on Monday May 02, 2011 @11:38AM (#2506616)
Indeed. We get resumes for PHP developers living in Bangladesh. We get resumes from outsourcing companies.

And indeed: we're not promising you the job. Just promising you we'll talk to you on Skype.

And finally: we've already gotten a few really good job applications with the attention this is getting :)

And finally finally: yes, I messed up the blog post.

Re:Just compile some Scala code to get an interview by CodeMage on Monday May 02, 2011 @11:14AM (#2506517)
I haven't run this, but the code seems to have an error. As far as I can tell "k.size" will return 19 and you need to subtract 20 from the ASCII code to get the real thing. Otherwise you would get gibberish.

EDIT: I actually went and ran the thing, just to make sure I wasn't crazy. You definitely need to change "(c - k.size)" to "(c - k.size - 1)".

Re:Just compile some Scala code to get an interview by jorgeortiz85 on Monday May 02, 2011 @11:19AM (#2506534)
Reply to your edit: No, they meant for the string to have two backslashes, not one. Otherwise the domain is wrong.
Re:Just compile some Scala code to get an interview by gojomo on Monday May 02, 2011 @12:43PM (#2506856)
Identifying such a bug could very well be an intentional part of their filter. Was it your intent to post part of the solution for GetGush applicants to crib?
Re:Just compile some Scala code to get an interview by petervandijck on Monday May 02, 2011 @01:14PM (#2506993)
No that was just me messing up the blog post.
Re:Just compile some Scala code to get an interview by antiterra on Monday May 02, 2011 @11:16AM (#2506522)
gWU`UAXYjT[ig\\eBWca looks like 20 characters to me, why would k.size return 19?
Re:Just compile some Scala code to get an interview by CodeMage on Monday May 02, 2011 @11:17AM (#2506526)
Because \\ is an escape for \.
Re:Just compile some Scala code to get an interview by jorgeortiz85 on Monday May 02, 2011 @11:18AM (#2506529)
Because Java/Scala strings use \ as an escape character, so the string "\\" parses as a string with a single backslash character, not two.
Re:Just compile some Scala code to get an interview by jorgeortiz85 on Monday May 02, 2011 @11:10AM (#2506500)
I think they meant:

    val k = """gWU`UAXYjT[ig\\eBWca"""
Otherwise one backslash escapes the other and the string isn't the appropriate length.
Re:Just compile some Scala code to get an interview by CodeMage on Monday May 02, 2011 @11:22AM (#2506549)
Duh. Now I feel stupid. There was obviously an "H" missing in the e-mail address.
Re:Just compile some Scala code to get an interview by Luyt on Monday May 02, 2011 @01:44PM (#2507113)
Well, that took me only 5 minutes, a refreshing experience after getting a webstack up on OSX consisting of memcache, oursql, CherryPy and MySQL for the first time ever ;-)

  $ cd /usr/ports/lang/scala
  $ sudo make install clean
  $ rehash
  [fire up an editor and paste the code into test.scala]
  $ scalac test.scala
  $ scala ApplyTo
  [email protected]
  $ cat test.scala
  object ApplyTo extends Application {
      val k = "gWU`UAXYjT[ig\\\\eBWca"
      println(k map {c => (c - k.size).toChar toLower}) 
      }
Hmmm, do I get the job? ;-) Oh wait, I see I maybe should have saved the source code in ApplyTo.scala instead of test.scala.

I really should look into Scala some day Real Soon Now, interesting that it runs on the JVM, I was messing around a bit with Clojure, which also runs on the JVM. I haven't worked with Java recently, but I used it some years ago and I remember the interesting FileStreamBufferedReader class hierarchy which you needed to read a simple file. My personal blog is mentioned in my profile.

Re:Just compile some Scala code to get an interview by jodrellblank on Monday May 02, 2011 @11:17AM (#2506525)
"Hiring Great Scala Developers"? I translated your Scala into Python and got the answer, but I'm not a great Scala developer or even a good Python one. Seems quite a weak filter which risks flooding you with applications.

But I do want to hear more about Digital pictures: We are building a product to solve real problems

Are you willing to say any more about it, or is it all secret until you launch?

Re:Just compile some Scala code to get an interview by blacksmythe on Monday May 02, 2011 @11:24AM (#2506560)
>> Seems quite a weak filter

That was only a small part of the filter:

  " Mention your github/HN/blog urls, if you have them. Mention personal projects. Mention startups. Mention open source."
Re:Just compile some Scala code to get an interview by abrenzel on Monday May 02, 2011 @11:29AM (#2506575)
Am I a loser because I didn't feel like downloading a Scala compiler or translating this to a language I do have an interpreter for, so I just got the table from man ascii, counted the characters in the string, and then did the transformation by hand?
Re:Just compile some Scala code to get an interview by lanna on Monday May 02, 2011 @11:59AM (#2506690)
If you don't feel like even downloading the Scala compiler, you definitively should not apply for a Scala developer position.
Re:Just compile some Scala code to get an interview by stanmancan on Monday May 02, 2011 @01:27PM (#2507044)
In his defence he never asked if he should still apply, he simply asked if he was a loser for using an ascii table to figure it out instead of compiling :P

Which no, that doesn't make you a loser. I think if anything it makes you part of the average HN population, hackers. You were curious, you thought of a solution to the problem presented, and you went ahead and figured it out.

Re:Just compile some Scala code to get an interview by abrenzel on Monday May 02, 2011 @12:05PM (#2506705)
Touche
Re:Just compile some Scala code to get an interview by glesperance on Monday May 02, 2011 @02:15PM (#2507243)
For those like me that were too curious to wait for an interview to know more about this startup : http://nextmontreal.com/gush/
Re:Just compile some Scala code to get an interview by wcsun on Monday May 02, 2011 @01:25PM (#2507034)
Re:Just compile some Scala code to get an interview by phoyd on Monday May 02, 2011 @11:04AM (#2506478)
Why is the decoded mail address pointing to a server in china?
Re:Just compile some Scala code to get an interview by petervandijck on Monday May 02, 2011 @11:10AM (#2506504)
Google apps.
Re:Just compile some Scala code to get an interview by petervandijck on Monday May 02, 2011 @12:27PM (#2506795)
(The code got indeed messed up in the formatting. I put it in the HTML source.)
Re:Just compile some Scala code to get an interview by jpr on Monday May 02, 2011 @01:33PM (#2507070)
And by trying to get the code to compile I'm yet again reminded why I don't like Scala:

The compiler is slow as fuck to get started and the syntax of the language is such that whitespace appears to matter. No thanks.

But I wish y'all good luck anyway.

Re:Just compile some Scala code to get an interview by sipefree on Monday May 02, 2011 @11:04AM (#2506476)
>>> k = "gWU`UAXYjT[ig\\eBWca"

>>> ''.join([chr(ord(c) - len(k) - 1) for c in k])

'[email protected]'

Can I get a job as a translator?

[deleted]
Re:Just compile some Scala code to get an interview by jodrellblank on Monday May 02, 2011 @11:20AM (#2506539)
The essence of trying to control information let out onto the itnernet.

Should I read anything much into this about your future company's handling of data security and leaked information? ;)

Re:Just compile some Scala code to get an interview by arctangent on Monday May 02, 2011 @11:30AM (#2506579)
You've got to be kidding, right?

You've set the bar for entry so low that most people on here would be able to solve the problem in their sleep!

It's fair for us on HN to assume that we're not your target market, so posting the answer here can by definition do no harm.

Re:Just compile some Scala code to get an interview by lanna on Monday May 02, 2011 @11:47AM (#2506641)
You got it wrong. It is not a puzzle, it is not a problem. There is nothing to solve there, there is no challenge. They don't ask you to solve anything. It is just compile and run. You don't even have to explain how it works, just compile and run. Yes, it is easy as hell, but raganwald got it right: it is just to filter the resume spammers.
Re:Just compile some Scala code to get an interview by antiterra on Monday May 02, 2011 @11:52AM (#2506664)
To be fair the posted solution at the parent of this thread is wrong. The gush supplied code also doesn't compile and run correctly without modification.
Re:Just compile some Scala code to get an interview by arctangent on Monday May 02, 2011 @01:29PM (#2507049)
My point was that few resume spammers are likely to be hanging out on HN in the first place, so posting the solution here would not be a problem.
Re:Just compile some Scala code to get an interview by code_duck on Monday May 02, 2011 @11:07AM (#2506490)
for($e="tdbmb.efwahvtir/dpn",$i=0;$i<strlen($e);$i++){$r=$e[$i];echo chr(ord($r)-1);}

Uh... can I get a job doing PHP?