News for hackers. Stuff that matters.
Re:Write a parser with JavaScript by cabaalis on Thursday December 12, 2019 @11:25AM (#21773234)
That's a heck of an interview question. I like what he was tempted to write better. I really don't want engineers toiling for hours over something a language or framework already provides.

I get the purpose, of course, but geez.

Re:Write a parser with JavaScript by jedimastert on Thursday December 12, 2019 @11:32AM (#21773309)
One of my interview questions was to write a toy lisp interpreter (only needs to do addition and multiplication, that kinda thing). Not nearly this crazy, only took like 20 lines of Python, but I could see why it would be helpful.

But an entire JSON parser? That's nuts!

Re:Write a parser with JavaScript by bd82 on Thursday December 12, 2019 @11:46AM (#21773472)
I develop a parsing library for fun and I don't think that would be an easy or useful interview question.

Maybe it makes sense if you assume the input has already been tokenized so you are not expected to deal with the minutiae of string literal escape sequences and such and can focus on the high level design/flow...

Re:Write a parser with JavaScript by agumonkey on Thursday December 12, 2019 @02:12PM (#21775178)
I'm obsessed with plt and parsers... What would be better interview questions.?