News for hackers. Stuff that matters.
Re:Show HN: 15-question language identification quiz by ammon on Thursday July 13, 2017 @02:04PM (#14763619)
We (Triplebyte) actually tested a while ago whether identifying languages was predictive as an interview question (we thought it might predict general experience / exposure to lots of code). It was not predictive of anything. So this quiz is just for fun!
Re:Show HN: 15-question language identification quiz by sinistersnare on Thursday July 13, 2017 @02:34PM (#14763895)
It is worded opposite of what you say:

> You're in the top 3% of engineers! (We should know, we've interviewed thousands.) We can totally help you get a job if you're interested.

It is worded as if scoring well in this is an accurate predictor of engineering skill.

Re:Show HN: 15-question language identification quiz by a3n on Friday July 14, 2017 @08:16AM (#14769177)
It may be an accurate predictor of who will respond to ads.
Re:Show HN: 15-question language identification quiz by dtft on Thursday July 13, 2017 @05:36PM (#14765476)
> Just for fun

...or to retarget engineers on FB and other channels :)

Re:Show HN: 15-question language identification quiz by krat0sprakhar on Thursday July 13, 2017 @02:33PM (#14763888)
Came here just to confirm this. I got all right but it doesn't seem to be valid test for hiring. Fun quiz! :)
Re:Show HN: 15-question language identification quiz by shubb on Friday July 14, 2017 @06:46AM (#14768823)
Can confirm. I'm a terrible programmer but got 100%. I guess it selects for people with very unfocused careers and no real specialism.
Re:Show HN: 15-question language identification quiz by throwanem on Friday July 14, 2017 @07:00AM (#14768874)
One could as easily argue that it selects for people who closely follow Hacker News - I got 15/15 too, but only because I'd previously seen several of the more esoteric languages mentioned here.
Re:Show HN: 15-question language identification quiz by ammon on Thursday July 13, 2017 @02:35PM (#14763904)
Yup, it's not a test for hiring
Re:Show HN: 15-question language identification quiz by dotancohen on Friday July 14, 2017 @03:31AM (#14768185)
It seems that some of the same questions were difficult or tricky for many people, i.e. the Kotlin question or the Lisp question (which were the two that I missed as well). It would be great to see the stats on this one. Thanks!
Re:Show HN: 15-question language identification quiz by throwaway2016a on Thursday July 13, 2017 @02:54PM (#14764076)
Got 14/15 but I have a feeling it was only because I made the assumption I would not see the same language twice. Without that assumption a few were toss ups for me.

Of all the languages on there the only one in that set I had never used / seen at all is Kotin and that's the one I got wrong.

Several of them were mandatory for me to learn in college but I haven't seen since. (looking at you, Prolog and Verilog... Verilog is useful but I don't do hardware dev)

Re:Show HN: 15-question language identification quiz by SilasX on Thursday July 13, 2017 @05:30PM (#14765424)
Got 14/15 because I couldn't tell Emacs Lisp from Clojure. Argh ...
Re:Show HN: 15-question language identification quiz by endgame on Thursday July 13, 2017 @09:07PM (#14766687)
The [ ] around the args are the giveaway.
Re:Show HN: 15-question language identification quiz by dvcrn on Thursday July 13, 2017 @10:16PM (#14766930)
defn vs defun :)

I remembered it somehow as "clojure doesn't allow you to define fun"

Re:Show HN: 15-question language identification quiz by nameless912 on Friday July 14, 2017 @12:47AM (#14767536)
Lol, I should print this out on a poster and give it to That One Clojure Guy(tm) at work.
Re:Show HN: 15-question language identification quiz by QuercusMax on Friday July 14, 2017 @01:54PM (#14771783)
Missed this as well. I should have guessed Clojure because it's a language people actually might use. All I could tell is it's some kind of Lisp.
Re:Show HN: 15-question language identification quiz by Arcsech on Thursday July 13, 2017 @07:20PM (#14766134)
Yep, I also missed Kotlin. I technically missed Clojure too, because I rushed and hit Emacs Lisp before actually fully reading the example and all the answers.
Re:Show HN: 15-question language identification quiz by arethuza on Thursday July 13, 2017 @05:02PM (#14765201)
I also scored 14/15 - got PHP wrong I thought it was Perl which is slightly embarrassing as I've never used PHP but I have used Perl.
Re:Show HN: 15-question language identification quiz by nameless912 on Friday July 14, 2017 @12:48AM (#14767540)
PHP and Perl are basically like Spanish and Italian when it comes to syntax. Both can more or less interoperate with the assistance of lots of hand gestures and facial expressions.
Re:Show HN: 15-question language identification quiz by twic on Thursday July 13, 2017 @08:00PM (#14766368)
Ditto. I'm positive that code would be valid Perl with the right libraries.

Which isn't saying much.

Re:Show HN: 15-question language identification quiz by dunham on Thursday July 13, 2017 @09:17PM (#14766726)
Same here, because I knew they intersected and presumed it was a trick question. Technically, I believe it is neither valid perl nor PHP because it's missing an opening brace on one of the if statements.
Re:Show HN: 15-question language identification quiz by sethrin on Friday July 14, 2017 @06:48AM (#14768829)
PHP lets you skip using curly braces for conditionals. I've seen real-world code which used this style only once, and it was about as bad as you'd expect.
Re:Show HN: 15-question language identification quiz by dunham on Saturday July 15, 2017 @04:42PM (#14778821)
Yeah, I suspected that, but it looked like there was a close brace and no open brace. (I only noticed because I was specifically looking at the braces to try to determine if it was PHP.)
Re:Show HN: 15-question language identification quiz by rmrfrmrf on Thursday July 13, 2017 @09:56PM (#14766849)
The lovely globals (e.g. `$_GET`) are what give PHP away.
Re:Show HN: 15-question language identification quiz by netvarun on Thursday July 13, 2017 @05:16PM (#14765324)
Can concur. I managed to get all correct, but that one question that almost tripped me was the PHP question.

As an ex-perl dev, (looks at self) shrugs in disbelief!

Re:Show HN: 15-question language identification quiz by khedoros1 on Thursday July 13, 2017 @05:26PM (#14765398)
I did that too, and in the same situation (although I got more wrong).
Re:Show HN: 15-question language identification quiz by yellowapple on Thursday July 13, 2017 @03:20PM (#14764312)
I also missed Kotlin.

A lot of them could be inferred from what the code is doing. For example, PHP and Perl are sometimes really hard to distinguish, but I was able to get PHP right by deciding that "this ain't what a Perl hacker would write". Same with Ada v. VHDL.

Re:Show HN: 15-question language identification quiz by munchbunny on Thursday July 13, 2017 @04:26PM (#14764855)
Missed Kotlin here too. I also missed one where I guessed Haskell when it was actually Prolog.

I feel like this quiz was much more about how much you've dabbled at surface level in various languages, enough or not enough to remember specific details to aid in process of elimination. For example, I knew what GLSL stood for, so the picture was most definitely not GLSL. And I had at one point written Scheme and looked into Lisp enough to guess that it was Clojure and not Lisp. And I remembered vaguely enough that Objective-C still uses C-like pointer notation, for example. And I remembered enough of computer engineering class to immediately identify that the VHDL question's code fit the use case despite not having written a line of VHDL (or Verilog) ever.

Re:Show HN: 15-question language identification quiz by twic on Thursday July 13, 2017 @08:01PM (#14766380)
For the last question, a smattering of art history will guide your guessing much better than a smattering of computer science!
Re:Show HN: 15-question language identification quiz by vram22 on Saturday July 15, 2017 @01:50PM (#14777921)
I got Kotlin right, but only because I happened to see some Kotlin code (due to the somewhat recent HN thread about it, based on a post by Steve Yegge), else might have got it wrong, due to maybe thinking Kotlin syntax would likely be similar to Java.

On second thoughts, though, I guess there is no need for a JVM language's syntax to resemble Java's (much, anyway). E.g. Jython, JRuby, Groovy, etc.

Re:Show HN: 15-question language identification quiz by rpeden on Thursday July 13, 2017 @04:30PM (#14764890)
15/15, not that it matters. I guess all those years of reading about languages on HN and trying out languages even when I had no real use for them was good for something, at least. :)
Re:Show HN: 15-question language identification quiz by nvr219 on Thursday July 13, 2017 @03:46PM (#14764539)
I am not a programmer other than one visual basic course I took in college.

My score: "You got 8 out of 15 right You're in the top 50% of engineers. Can your friends beat you? Share your score and challenge them to do better!"

Re:Show HN: 15-question language identification quiz by pmontra on Thursday July 13, 2017 @02:58PM (#14764113)
14/15. I guessed wrong between Piet and GLSL which I never heard about. How many possible questions are there?
Re:Show HN: 15-question language identification quiz by ammon on Thursday July 13, 2017 @03:11PM (#14764238)
Yeah, Piet's a curveball! It's a pretty cool (esoteric, totally useless) language however.
Re:Show HN: 15-question language identification quiz by khedoros1 on Thursday July 13, 2017 @05:30PM (#14765427)
Piet's an esoteric, and GLSL is OpenGL's Shader Language. GLSL looks kind of C-like, while Piet looks like Mondrian paintings (for many programs, anyhow).
Re:Show HN: 15-question language identification quiz by ronald_raygun on Friday July 14, 2017 @04:11PM (#14772798)
Yeah, I got that problem because I knew who Piet Mondrian was, so I took an educated guess.
Re:Show HN: 15-question language identification quiz by rwj on Thursday July 13, 2017 @04:41PM (#14765002)
If I hadn't read an article on esolangs last week, I would have missed Piet.
Re:Show HN: 15-question language identification quiz by jonesetc on Thursday July 13, 2017 @05:52PM (#14765606)
There are only 15, the quiz is static.
Re:Show HN: 15-question language identification quiz by yakshaving_jgt on Friday July 14, 2017 @05:26AM (#14768595)
I got 12/15 initially. Then I followed the link to retry the test, and somehow got 15/15. It's amazing how quickly you can progress as an engineer.
Re:Show HN: 15-question language identification quiz by ynniv on Thursday July 13, 2017 @02:42PM (#14763965)
That must be top 3% for a large value of 3, or perhaps a small value of 100. How's the HN traffic doing? ;-)
Re:Show HN: 15-question language identification quiz by hghmn on Friday July 14, 2017 @12:27AM (#14767475)
I know this is intended as just a fun test, but the highlight.js library used on these pages adds the language name as part of the class name on the code block...
Re:Show HN: 15-question language identification quiz by amyjess on Thursday July 13, 2017 @03:56PM (#14764627)
13/15

One was because I got two LISPs mixed up with each other, the other because it was in a language I didn't recognize (Piet) and there were two languages I didn't know anything about as options (GLSL was the other).

Re:Show HN: 15-question language identification quiz by placebo on Thursday July 13, 2017 @05:22PM (#14765367)
same score, same reasons :)
Re:Show HN: 15-question language identification quiz by emersonrsantos on Friday July 14, 2017 @12:03AM (#14767368)
Do one with only assembly languages and we have to guess the architecture.
Re:Show HN: 15-question language identification quiz by nameless912 on Friday July 14, 2017 @12:49AM (#14767543)
It's all `mov` instructions. Go.
Re:Show HN: 15-question language identification quiz by vram22 on Saturday July 15, 2017 @01:16PM (#14777715)
Just did it, and got 14/15. But see below.

Saw this thread yesterday and at first did not feel like taking the quiz (because I thought I would not do well, also because I didn't think it was too interesting).

But today read about half of this thread again. Then felt motivated to take the quiz (just for fun). Was not expecting more than say 8/15. Surprised to see I got 14/15 (but in top 3% of engineers -- definitely not :). It was definitely partly due to reading some of this thread first, else I would never have been able to figure out the Ada/VHDL question (at least just by guessing / logic / prior knowledge), even less the Piet one (since had never heard of it - at least had heard of Ada and VHDL). I guess the result was also partly due to being interested in programming languages right from the start of my career, and having at least read a little about many, and having dabbled in some (apart from the ones I worked in for non-trivial periods).

Anyway - somewhat interesting quiz idea.

Re:Show HN: 15-question language identification quiz by tluyben2 on Friday July 14, 2017 @02:07AM (#14767877)
Wrote code in all but Piet, so knew it was not glsl. I must spend way too much time behind a computer as i also knew all besides Piet even if it was not multiple choice :)

I do think it should be harder; like when you get a lesser known language, also add the choice for others; APL + K + J for instance, or worse (for many) K or J showing either.

C vs C++ vs D.

Prolog vs Haskell vs Ocaml. Curveball there could be something like Mercury.

Haskell vs Purescript.

Re:Show HN: 15-question language identification quiz by _raoulcousins on Thursday July 13, 2017 @04:05PM (#14764695)
14/15. I basically only program Python, but I guessed based on vague stereotypes of different languages. The wrong one was guessing Java for C#.
Re:Show HN: 15-question language identification quiz by sleepychu on Friday July 14, 2017 @04:59AM (#14768508)
That's a pretty fair toss-up if you're not familiar with either.
Re:Show HN: 15-question language identification quiz by QuercusMax on Friday July 14, 2017 @01:53PM (#14771768)
Biggest giveaway (as a lifelong Java programmer who's probably only written about 100 lines of C#, ever) is that C# Likes To Capitalize Freaking Everything. Java typically only capitalizes Types, but C# capitalizes Method Names as well.

It's like it was created by somebody who either likes German, or Olde-Timey English Writing.

Re:Show HN: 15-question language identification quiz by viach on Thursday July 13, 2017 @03:17PM (#14764288)
So the scheme is I answer questions in order to get my ego higher, you bribe me with "you are top n", I leave my CV?
Re:Show HN: 15-question language identification quiz by compumike on Thursday July 13, 2017 @03:21PM (#14764322)
(Note: I work at Triplebyte.) No CVs -- we skip resumes and cover letters, and match engineers to companies (bypassing recruiter and resume screens) based on demonstrated skills.
Re:Show HN: 15-question language identification quiz by monocasa on Friday July 14, 2017 @12:23AM (#14767448)
Demonstrated how?
Re:Show HN: 15-question language identification quiz by nameless912 on Friday July 14, 2017 @12:51AM (#14767556)
They have you take a quiz and (maybe) do an interview with one of their partner companies. FWIW I took the quiz and it was actually one of the better "fill out this survey and we'll see if we want to hire you"'s that I've ever seen: finding subtle-ish errors in code, demonstrating more than beginner knowledge in a couple of languages, and a pretty solid set of design questions. I didn't feel out of my league, but I also didn't feel like my intelligence was insulted.
Re:Show HN: 15-question language identification quiz by jadell on Thursday July 13, 2017 @05:55PM (#14765637)
11/15 A few I missed because I didn't know enough to tell them apart (eg Kotlin/Swift.) Others were process of elimination or a straight up guess. And I didn't even know there was an abstract visual programming language!
Re:Show HN: 15-question language identification quiz by lojack on Thursday July 13, 2017 @04:04PM (#14764680)
Interestingly enough, question 5 is actually syntactically correct Perl, but not PHP.
Re:Show HN: 15-question language identification quiz by girvo on Thursday July 13, 2017 @10:53PM (#14767074)
> syntactically correct Perl

Not a high bar to clear, mind you ;)

Re:Show HN: 15-question language identification quiz by max-m on Friday July 14, 2017 @08:11AM (#14769146)
Well, it is correct PHP as it is missing an opening "<?php" tag. Therefore the interpreter skips this part and prints it out. :D

When interpreting as PHP however

  if(isset($_SESSION['uid']))
      header("Location: reg");
  }
is either missing an opening bracket or has got one too many closing brackets.
Re:Show HN: 15-question language identification quiz by acheron on Thursday July 13, 2017 @03:36PM (#14764451)
Stupidly, I missed Ruby/Python from going too quickly right at the beginning. Then missed Ada/VHDL from never having heard of VHDL, and I thought "oh, looks like Ada."

Anyway, fun stuff. I laughed when Piet came up.

Re:Show HN: 15-question language identification quiz by ajdlinux on Thursday July 13, 2017 @07:12PM (#14766090)
Well, VHDL was heavily inspired by Ada, given they both came out of DoD contracts around the same time...
Re:Show HN: 15-question language identification quiz by acheron on Thursday July 13, 2017 @07:48PM (#14766290)
Yeah, I know that now after reading about it. Explains why I got them mixed up...
Re:Show HN: 15-question language identification quiz by still_grokking on Thursday July 13, 2017 @10:59PM (#14767104)
Too easy (15/15). Had only once to look a second time at the code snippet (elisp vs. clojure, but there were [] around the param, that made it clear).

Would be more fun if they would implement the same code snippet in different (but maybe quite similar) languages and one would have to label the (lets say six for an interesting difficulty level) snippets.

Re:Show HN: 15-question language identification quiz by MichaelBurge on Thursday July 13, 2017 @06:17PM (#14765803)
> Just as the ++ in the name C++ is intended to imply that C++ is a step above C, the # in the name C# is intended to resemble two ++ operators stacked on each other, indicating that C# is a step above C++.

I've sort of followed C# since it was released, and never realized this.

Re:Show HN: 15-question language identification quiz by boondaburrah on Thursday July 13, 2017 @09:01PM (#14766668)
I recall C# being a musical reference (a higher note than c), which is why it's pronounced C-sharp and not say, c-pound.

I would occasionally call it Db (D-flat) to be an arse.

I'm not sure if there was a formalized reasoning behind the name or if what I heard was just a rationalisation.

Re:Show HN: 15-question language identification quiz by toolslive on Friday July 14, 2017 @07:42AM (#14769034)
a complete arse would reply that Db and C# are not the same thing.
Re:Show HN: 15-question language identification quiz by hyperpape on Thursday July 13, 2017 @10:15PM (#14766927)
It's a bit of a giveaway that R included domain specific terminology: otherwise it would've been hopeless for me. Maybe the same for VHDL, but I know so little about it that I don't even know if you could write code without domain specific elements.
Re:Show HN: 15-question language identification quiz by vram22 on Saturday July 15, 2017 @01:52PM (#14777932)
BTW, what is the reason for the Piet question not showing any code or image (until you answer the question)? Is it somehow related to how the language works, or some feature of it?
Re:Show HN: 15-question language identification quiz by ajeet_dhaliwal on Thursday July 13, 2017 @07:30PM (#14766186)
Surprised how the ones I'm familiar with jump out instantaneously, only got 10/15 but should have got 11, silly mistake confusing ruby and python. Hadn't even heard of some of the ones at the end.
Re:Show HN: 15-question language identification quiz by nobleach on Thursday July 13, 2017 @07:47PM (#14766285)
Ahhhhhh! APL and Piet I didn't feel bad about (as I have never seen either) But VHDL vs Ada! Bad miss on my part. 12/15 is not too bad I guess....
Re:Show HN: 15-question language identification quiz by BenjiWiebe on Thursday July 13, 2017 @08:49PM (#14766617)
APL and Piet I got right. Instead I missed the newer obvious ones.. Clojure, Kotlin, Rust.
Re:Show HN: 15-question language identification quiz by bonzini on Friday July 14, 2017 @12:33AM (#14767499)
The missing font is the giveaway for APL!
Re:Show HN: 15-question language identification quiz by vortico on Thursday July 13, 2017 @02:41PM (#14763955)
Happened to get all of them, but it was getting harder at the end! Was C, C++, Java, Python or included because the quiz would have been too easy?
Re:Show HN: 15-question language identification quiz by bryanlarsen on Thursday July 13, 2017 @02:50PM (#14764026)
I thought the end was easier than the middle -- the languages there were older and more obscure to a 2017 audience, but that also generally made them much more distinctive.
Re:Show HN: 15-question language identification quiz by krallja on Thursday July 13, 2017 @04:16PM (#14764776)
The questions are selected in a random order from a larger set, so nobody likely saw the same questions or order as you.
Re:Show HN: 15-question language identification quiz by Sohcahtoa82 on Thursday July 13, 2017 @07:01PM (#14766030)
What evidence do you have of this? Judging by other comments, it's pretty clear everyone got the same questions in the same order.
Re:Show HN: 15-question language identification quiz by krallja on Sunday July 16, 2017 @03:25PM (#14783703)
Absolutely nothing. I have no idea why I wrote that.
Re:Show HN: 15-question language identification quiz by jscott313 on Thursday July 13, 2017 @06:41PM (#14765941)
Nope, they're always in the same order. Not sure why you'd guess otherwise and state it as fact.
Re:Show HN: 15-question language identification quiz by krallja on Sunday July 16, 2017 @03:25PM (#14783701)
Me either. And now I can't delete my stupidity, heh.
Re:Show HN: 15-question language identification quiz by pklausler on Thursday July 13, 2017 @03:22PM (#14764333)
Damn, I miss APL.
Re:Show HN: 15-question language identification quiz by Osmium on Thursday July 13, 2017 @07:38PM (#14766225)
Perhaps this should be a 'poll' post so people can vote for their results? (9/15)
Re:Show HN: 15-question language identification quiz by asadlionpk on Friday July 14, 2017 @06:49AM (#14768830)
My startup provides online compiler service for 20+ languages[0] so my work involves testing every language frequently. So this was easy for me.

[0] https://codepad.remoteinterview.io

Re:Show HN: 15-question language identification quiz by timwaagh on Friday July 14, 2017 @05:07AM (#14768529)
it was a fun test. i got like 13/15. not too bad i think considering the people who are on this site are making mistakes as well. maybe i deserve a higher salary?
Re:Show HN: 15-question language identification quiz by rvense on Friday July 14, 2017 @08:08AM (#14769137)
All fun and games till the plug at the end...
Re:Show HN: 15-question language identification quiz by DonaldFisk on Thursday July 13, 2017 @09:54PM (#14766842)
14/15. Confused Swift and Objective C.
Re:Show HN: 15-question language identification quiz by noncoml on Friday July 14, 2017 @12:36AM (#14767504)
13 out of 15 (No idea bout VHDL and Piet)
Re:Show HN: 15-question language identification quiz by optikals on Friday July 14, 2017 @03:46PM (#14772621)
Smart! Enjoy it so much!
Re:Show HN: 15-question language identification quiz by wambotron on Thursday July 13, 2017 @04:19PM (#14764805)
I got 11 of 15, but I can only write competently in maybe 4 of them (JS, Java, Python, PHP).