4 ms·
Just compile some Scala code to get an interview
- sipefree 16y ago>>> 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 16y agofor($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?
- deleted 16y ago[deleted]
- deleted 16y ago[deleted]
- jodrellblank 16y agoThe 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? ;)
- deleted 16y ago[deleted]
- arctangent 16y agoYou'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.
- lanna 16y agoYou 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.
- antiterra 16y agoTo 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.
- arctangent 16y agoMy 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.
- deleted 16y ago[deleted]
- phoyd 16y agoWhy is the decoded mail address pointing to a server in china?
- petervandijck 16y agoGoogle apps.
- jorgeortiz85 16y agoI think they meant: val k = """gWU`UAXYjT[ig\\eBWca""" Otherwise one backslash escapes the other and the string isn't the appropriate length.
- CodeMage 16y agoDuh. Now I feel stupid. There was obviously an "H" missing in the e-mail address.
- CodeMage 16y agoI 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 16y agogWU`UAXYjT[ig\\eBWca looks like 20 characters to me, why would k.size return 19?
- CodeMage 16y agoBecause \\ is an escape for \.
- jorgeortiz85 16y agoBecause Java/Scala strings use \ as an escape character, so the string "\\" parses as a string with a single backslash character, not two.
- jorgeortiz85 16y agoReply to your edit: No, they meant for the string to have two backslashes, not one. Otherwise the domain is wrong.
- gojomo 16y agoIdentifying 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?
- petervandijck 16y agoNo that was just me messing up the blog post.
- jodrellblank 16y ago"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 16y ago>> 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 16y agoAm 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 16y agoIf you don't feel like even downloading the Scala compiler, you definitively should not apply for a Scala developer position.
- abrenzel 16y agoTouche
- stanmancan 16y agoIn 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.
- raganwald 16y agoTo 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 16y agoIndeed. 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.
- petervandijck 16y ago(The code got indeed messed up in the formatting. I put it in the HTML source.)
- wcsun 16y agoSo, you are asking people to learn sbt? http://code.google.com/p/simple-build-tool/wiki/BuildConfiguration http://code.google.com/p/simple-build-tool/wiki/BuildConfigu...
- jpr 16y agoAnd 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.
- Luyt 16y agoWell, 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.
- glesperance 16y agoFor those like me that were too curious to wait for an interview to know more about this startup : http://nextmontreal.com/gush/ http://nextmontreal.com/gush/