Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
qhat
Jul 6, 2015


cis autodrag posted:

ive never written a parser from scratch. who expects that from people when there's already good libraries for it in every non poo poo language?

In the terrible programmers thread there is a perfect example of when you need to roll your own parser (when the input is garbage and there's nothing you can do about it). It's also really not that hard.

Adbot
ADBOT LOVES YOU

qhat
Jul 6, 2015


I also once had to specialise my former company's inhouse JSON parser to be blazingly fast for a very specific type of JSON input.

The_Franz
Aug 8, 2003

qhat posted:

In the terrible programmers thread there is a perfect example of when you need to roll your own parser (when the input is garbage and there's nothing you can do about it). It's also really not that hard.

i've written parsers for xml, json and some other formats before and it's not hard, but i spent more than 3 hours on it to do it right and make sure everything worked

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

when i hear "parser" i imagine it must basically be a compiler and also be provably correct for all possible inputs. how do you put that together in 3 hours?

qhat
Jul 6, 2015


The_Franz posted:

i've written parsers for xml, json and some other formats before and it's not hard, but i spent more than 3 hours on it to do it right and make sure everything worked

sure but 3 hours is not really a long time. and i wouldn't expect someone to implement the whole standard, just something like write a program to turn a string like <html><body><p></p></body></html> into it's prettified version with indentation and throw errors on mismatched tags or something. not everything has to be an exercise in autism nerds.

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
like are we talking just "read this text and put it into a data structure" or like "please make an ll(1) parser" because the first i could do easily though with likely bad performance but the latter id have to brush up on a gently caress ton of theory for.

qhat
Jul 6, 2015


cis autodrag posted:

like are we talking just "read this text and put it into a data structure" or like "please make an ll(1) parser" because the first i could do easily though with likely bad performance but the latter id have to brush up on a gently caress ton of theory for.

just use a stack to remember which blocks you're currently in. the above question i posted i did in under an hour with no prep at all.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

cis autodrag posted:

like are we talking just "read this text and put it into a data structure" or like "please make an ll(1) parser" because the first i could do easily though with likely bad performance but the latter id have to brush up on a gently caress ton of theory for.

wikipedia says ll(1) is easy, what's the problem? :smug:

The_Franz
Aug 8, 2003

carry on then posted:

when i hear "parser" i imagine it must basically be a compiler and also be provably correct for all possible inputs. how do you put that together in 3 hours?

same

when i read "write a basic html parser" my brain turns it into "write something like rapidxml in under 3 hours"

Iverron
May 13, 2012

The closest thing to programming whiteboard interviews I've heard of in other semi well paying professions is having to do some sort of presentation.

Seems like there's a clear standards gap that's letting through enough terribles that doesn't necessarily exist in other industries. IIRC Uncle Bob likes to talk about how we'll be forced to close that gap with <Government Certified Software Guild> after a dev or two kill a bunch of people with a bug someday.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Iverron posted:

The closest thing to programming whiteboard interviews I've heard of in other semi well paying professions is having to do some sort of presentation.

Seems like there's a clear standards gap that's letting through enough terribles that doesn't necessarily exist in other industries. IIRC Uncle Bob likes to talk about how we'll be forced to close that gap with <Government Certified Software Guild> after a dev or two kill a bunch of people with a bug someday.

someday?

Iverron
May 13, 2012


fair enough,

if I'm remembering the talk right he mentions how he doesn't understand why it didn't happen with a few key examples like the Therac-25

qhat
Jul 6, 2015


I feel the problem with you guys is that you get asked a question and your brain explodes in an exponentially diverging avalanche of what ifs instead of just doing exactly what the interviewer asked for

redleader
Aug 18, 2005

Engage according to operational parameters

cis autodrag posted:

i got the house. the landlord is super nice and facetimed us a walk through. it's bigger than my current house and has a back yard fenced in. just need to sell this house and i am out of the woods on this poo poo.

keep your current house. become an absentee landlord. rise above the millennial cohort

Iverron
May 13, 2012

qhat posted:

I feel the problem with you guys is that you get asked as question and your brain explodes in an avalanche of what ifs instead of just doing exactly what the interviewer asked for

I don't think the general complaint has anything to do with not being able to adequately answer a question as much as the cargo culting around said questions

I work with a guy (for the next two weeks) who almost certainly cranks his hog every time he catches a dev with one of his gotcha questions

qhat
Jul 6, 2015


Iverron posted:

I don't think the general complaint has anything to do with not being able to adequately answer a question as much as the cargo culting around said questions

I work with a guy (for the next two weeks) who almost certainly cranks his hog every time he catches a dev with one of his gotcha questions

There are people in this thread arguing right here and now that coding should not form part of the interview process for a coding position.

qhat
Jul 6, 2015


It might surprise some but I have actually genuinely interviewed people who have entirely falsified their work experience and qualifications and pre-cooked their answers from glassdoor in an attempt to get an easy paycheck. This is why interviewers ask basic dumb questions and get people to explain themselves.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

my worst interview nightmare is to be interviewed by a yosposter

Stymie
Jan 9, 2001

by LITERALLY AN ADMIN
getting salty about your preferred way to have plausible deniability for excluding women and other "undesirable" candidates is really not a good look

The Management
Jan 2, 2010

sup, bitch?
jfc this thread.

qhat posted:

I feel the problem with you guys is that you get asked a question and your brain explodes in an exponentially diverging avalanche of what ifs instead of just doing exactly what the interviewer asked for

this is it. nobody is asking you to write a complete, perfect, optimal general purpose parser. just answer the question. write the right code for the question. code that runs reasonably well and doesn't break on the obvious corner cases. make it simple. think about the implementation. describe the issues and your approach and why you decided to do it this way.

Bhodi
Dec 9, 2007

Oh, it's just a cat.
Pillbug
much like a real work project, you're only allocated just enough time to cover common cases and part of the test is to confirm that you can indeed make compromises and deliver something working but probably non-optimal on a deadline

Stymie
Jan 9, 2001

by LITERALLY AN ADMIN
and when you're done with the programming question, pray that the interviewer happens to like you/your gender/race/nationality/schooling/etc. because that's what will be the deciding factor rather than glorified trivia

cool av
Mar 2, 2013

even if you find whiteboard coding interviews silly, compare it to the BS you see for interviews in other fields, or to school applications (SAT/GREs) and it's not so bad.

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

The Management posted:

jfc this thread.


this is it. nobody is asking you to write a complete, perfect, optimal general purpose parser. just answer the question. write the right code for the question. code that runs reasonably well and doesn't break on the obvious corner cases. make it simple. think about the implementation. describe the issues and your approach and why you decided to do it this way.

the question as written here was "write a parser for html." my first inclination is to get the spec and start implementing and not stop until i have every statement and stipulation accounted for, because i'm not familliar enough with it in that way to know what the obvious corner cases even are. normally i just write html and if the browser renders the page wrong or the validator raises an issue i fix it.

qhat
Jul 6, 2015


carry on then posted:

the question as written here was "write a parser for html." my first inclination is to get the spec and start implementing and not stop until i have every statement and stipulation accounted for, because i'm not familliar enough with it in that way to know what the obvious corner cases even are. normally i just write html and if the browser renders the page wrong or the validator raises an issue i fix it.

The question was actually "write a parser for this basic html" if you ignore what I wrote afterwards clarifying what the specific question I received was

Iverron
May 13, 2012

cool av posted:

even if you find whiteboard coding interviews silly, compare it to the BS you see for interviews in other fields, or to school applications (SAT/GREs) and it's not so bad.

mind elaborating?

being serious, every time I mention our normal to people in other industries they seem surprised

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

redleader posted:

keep your current house. become an absentee landlord. rise above the millennial cohort

nah, it just reassessed at 30k more than we paid for it and the condo association bans long term rentals. im good with just making a bunch of cash by accident.

Progressive JPEG
Feb 19, 2003

carry on then posted:

the question as written here was "write a parser for html." my first inclination is to get the spec and start implementing and not stop until i have every statement and stipulation accounted for,

this is a problem. knowing when and how to appropriately cut corners (or otherwise refraining from building things that are more complicated than necessary) is a very useful skill, and thats typically part of what the short deadline on interview problems is meant to exercise

Progressive JPEG fucked around with this message at 00:50 on Jun 19, 2017

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Progressive JPEG posted:

this is a problem. knowing when and how to appropriately cut corners (or otherwise refraining from building things that are more complicated than necessary) is a very useful skill, and thats typically part of what the short deadline on interview problems is meant to exercise

yea it is a problem, because i have this constant battle of "this seems unimportant" vs "if someone else interviewing for this implemented this and i don't, i lose, game over"

Mao Zedong Thot
Oct 16, 2008


carry on then posted:

yea it is a problem, because i have this constant battle of "this seems unimportant" vs "if someone else interviewing for this implemented this and i don't, i lose, game over"

well, I'm sorry to say, but it sounds like a bad fit carry on then, best of luck in your future endeavours.

The Management
Jan 2, 2010

sup, bitch?

carry on then posted:

the question as written here was "write a parser for html." my first inclination is to get the spec and start implementing and not stop until i have every statement and stipulation accounted for, because i'm not familliar enough with it in that way to know what the obvious corner cases even are. normally i just write html and if the browser renders the page wrong or the validator raises an issue i fix it.

I can't even

Iverron
May 13, 2012

I get to give notice tomorrow and I really hope I get a free 2 week vacation

The Management
Jan 2, 2010

sup, bitch?
I start my new job tomorrow and I can't wear any of the nice new clothes I bought because the weather decided to go from raining to 102 degrees in a week.

cool av
Mar 2, 2013

Iverron posted:

mind elaborating?

being serious, every time I mention our normal to people in other industries they seem surprised

What's your greatest weakness?
What type of animal would you be?
Where do you see yourself in 10 years?

Also I've heard anecdotally that those awful variants of the "how many gumballs are in a jar?" / "how many gas stations are there in NYC?" that thankfully seem to have died down in tech interviews are starting to pop up in sales interviews of all things.

Shaman Linavi
Apr 3, 2012

the worst interview i ever had was with Blizzard. they opened with "so if you could be any superhero, who would you be?" and i just froze up and mumbled something about not really keeping up on my superheroes and it was all down hill from there.
luckily, it was also one of my shortest interviews!

minivanmegafun
Jul 27, 2004

cool av posted:


Also I've heard anecdotally that those awful variants of the "how many gumballs are in a jar?" / "how many gas stations are there in NYC?" that thankfully seem to have died down in tech interviews are starting to pop up in sales interviews of all things.

so much of sales is trying to bullshit your way through a situation that those questions seem completely appropriate

qhat
Jul 6, 2015


Shaman Linavi posted:

the worst interview i ever had was with Blizzard. they opened with "so if you could be any superhero, who would you be?" and i just froze up and mumbled something about not really keeping up on my superheroes and it was all down hill from there.
luckily, it was also one of my shortest interviews!

Lol. Dodged a bullet IMHO.

Mao Zedong Thot
Oct 16, 2008


Shaman Linavi posted:

the worst interview i ever had was with Blizzard. they opened with "so if you could be any superhero, who would you be?" and i just froze up and mumbled something about not really keeping up on my superheroes and it was all down hill from there.
luckily, it was also one of my shortest interviews!

:discourse:

qhat
Jul 6, 2015


I got an interview tomorrow. Some kind of kernel hacking role, expecting to get rinsed on dumb C and OS internals trivia.

Adbot
ADBOT LOVES YOU

Elysiume
Aug 13, 2009

Alone, she fights.

Shaman Linavi posted:

the worst interview i ever had was with Blizzard. they opened with "so if you could be any superhero, who would you be?" and i just froze up and mumbled something about not really keeping up on my superheroes and it was all down hill from there.
luckily, it was also one of my shortest interviews!
the guy from x-men who uncontrollably kills everyone around him and asks wolverine to kill him in the end

chew on that, interviewer

using the term "superhero" very loosely here

  • Locked thread