
Just compile some Scala code to get an interview - petervandijck
http://blog.getgush.com/post/5132502649/hiring-great-scala-developers-or-happy-to-learn-for
======
raganwald
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.

~~~
petervandijck
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.

------
CodeMage
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)".

~~~
antiterra
gWU`UAXYjT[ig\\\eBWca looks like 20 characters to me, why would k.size return
19?

~~~
CodeMage
Because \\\ is an escape for \\.

------
jorgeortiz85
I think they meant:

    
    
        val k = """gWU`UAXYjT[ig\\eBWca"""
    

Otherwise one backslash escapes the other and the string isn't the appropriate
length.

~~~
CodeMage
Duh. Now I feel stupid. There was obviously an "H" missing in the e-mail
address.

------
Luyt
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
      scala-dev@gushhq.com
      $ 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.

------
jodrellblank
"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?

~~~
blacksmythe
>> 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."

------
abrenzel
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?

~~~
lanna
If you don't feel like even downloading the Scala compiler, you definitively
should not apply for a Scala developer position.

~~~
stanmancan
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.

------
glesperance
For those like me that were too curious to wait for an interview to know more
about this startup : <http://nextmontreal.com/gush/>

------
wcsun
So, you are asking people to learn sbt?

[http://code.google.com/p/simple-build-
tool/wiki/BuildConfigu...](http://code.google.com/p/simple-build-
tool/wiki/BuildConfiguration)

------
phoyd
Why is the decoded mail address pointing to a server in china?

~~~
petervandijck
Google apps.

------
petervandijck
(The code got indeed messed up in the formatting. I put it in the HTML
source.)

------
jpr
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.

------
sipefree
>>> k = "gWU`UAXYjT[ig\\\eBWca"

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

'SCALA-DEV@GUSHQ.COM'

Can I get a job as a translator?

~~~
code_duck
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?

