• trtrwtf (unregistered)

    TRWTF: "Before bringing people in for an interview, we give them a simple questionnaire about PHP"

    What, if they know anything about PHP, they fail?

  • Ralph (unregistered)

    I was FIRST in my class.

  • Johnny B Coder (unregistered)

    FRIST!

    I had a job interview like the the last one once. An hour of psych questions, and a 5 min interview with the technical lead. Didnt get the SQL DBA job supposedly because I wasnt technically qualified. Wierd since I had been teaching the Microsoft SQL Server admin classes for several years.

    Always wondered what my psych scores were....

  • (cs)

    I can think of a specific case where that crazy PHP "fix" would actually work:

    If you have whitespace at the end of a PHP file and you include it as a header, the whitespace will be sent as content, thus preventing you from sending more headers in your main PHP file after including the file. Removing the whitespace from the end of the file would fix it (IIRC).

    In any case it's clear the interviewee doesn't quite understand what's going on. He figured out how to fix it in a specific case, possibly by accident, but he clearly doesn't know what it means or why it happens.

  • Mo (unregistered)

    Any interview where you don't get to blow someone is a waste of time.

  • (cs)

    For my current job, I didn't need a psych test, yay? However, I remember in between jobs I interviewed at a local gas station chain to be a clerk (sales associate/pump overlord/whatever). Everyone was required to take a 60 min fill in the circles test where they basically asked the same 10 questions about, "You wouldn't steal from us, right?" worded many different ways in many different scenarios. The last few were 'fill in here what you would do in X scenario above', stuff like, "A worker has stolen paperclips from the office area! They don't like they are returning them, when you confront them about it, how will you go about convincing them to return the company's paperclips!?"

    Just once I want to take one of these stupid things and respond with something like, "First I would try to convince my fellow employee that stealing is wrong, even if it is 2 pennies worth of paperclips that have been mangled beyond any functional use, and that he should return them to their proper places immediately. If my fellow coworker does not agree with me and argues that the equipment is indeed his as no one else will get functional use of them, I would call upon the powers of the Norse and materialize my trusty claymore into my hands so that I can slay the enemy of my company, who was thoughtful enough to provide me with this minimum wage job! Afterwards, I will move decap'd employee to cold storage so that I can take him out with the trash later. Wouldn't want to miss tending to any customers because I had to return company paperclips, right?"

  • 'Murruhkan (unregistered)

    TRWTF is PHP, amirite? /s

  • Daverino (unregistered) in reply to The MAZZTer

    I want more explanation on the first one, since I am not familiar with PHP. The text is written like it came from someone with experience writing instructions for the lowest common denominator. I've written somewhat similar bits of instruction, because it can be a lot easier to give an action (Hold the delete key) than to explain a concept (there must not be any white space at the end of the file).

  • D: BANANA (unregistered) in reply to The MAZZTer
    The MAZZTer:
    I can think of a specific case where that crazy PHP "fix" would actually work:

    If you have whitespace at the end of a PHP file and you include it as a header, the whitespace will be sent as content, thus preventing you from sending more headers in your main PHP file after including the file. Removing the whitespace from the end of the file would fix it (IIRC).

    In any case it's clear the interviewee doesn't quite understand what's going on. He figured out how to fix it in a specific case, possibly by accident, but he clearly doesn't know what it means or why it happens.

    Still, you could just select to the end instead of holding delete. Heck, as long as I push space for more than 15 seconds, that won't work at all!

  • My Name Is Missing (unregistered)

    Sometimes I think it is worthwhile to take a interview just for the laughs.

  • trtrwtf (unregistered) in reply to BobB
    BobB:
    For my current job, I didn't need a psych test, yay? However, I remember in between jobs I interviewed at a local gas station chain to be a clerk (sales associate/pump overlord/whatever). Everyone was required to take a 60 min fill in the circles test where they basically asked the same 10 questions about, "You wouldn't steal from us, right?" worded many different ways in many different scenarios. The last few were 'fill in here what you would do in X scenario above', stuff like, "A worker has stolen paperclips from the office area! They don't like they are returning them, when you confront them about it, how will you go about convincing them to return the company's paperclips!?"

    Just once I want to take one of these stupid things and respond with something like, "First I would try to convince my fellow employee that stealing is wrong, even if it is 2 pennies worth of paperclips that have been mangled beyond any functional use, and that he should return them to their proper places immediately. If my fellow coworker does not agree with me and argues that the equipment is indeed his as no one else will get functional use of them, I would call upon the powers of the Norse and materialize my trusty claymore into my hands so that I can slay the enemy of my company, who was thoughtful enough to provide me with this minimum wage job! Afterwards, I will move decap'd employee to cold storage so that I can take him out with the trash later. Wouldn't want to miss tending to any customers because I had to return company paperclips, right?"

    Not to get sidetracked, but what do claymores (" a large sword used in the late Medieval and early modern periods... used in the constant clan warfare and border fights with the English from circa 1400 to 1700") have to do with the Norse ("the Scandinavian population of the period from the late 8th century to the 11th century")?

  • (cs)

    I had a lot to say in this comment, but following the instructions about the end of files has caused this post to cut

  • (cs) in reply to trtrwtf
    trtrwtf:
    Not to get sidetracked, but what do claymores (" a large sword used in the late Medieval and early modern periods... used in the constant clan warfare and border fights with the English from circa 1400 to 1700") have to do with the Norse ("the Scandinavian population of the period from the late 8th century to the 11th century")?

    Not to get sidetracked either, but seeing as how this was a fictional response to a fictional situation, I didn't feel it warranted research into the armaments of that particular group of people. I apologize if you are indeed Norse and I have offended you and/or your people. But please, by all means, continue being anal, it appears you're having fun. :)

  • (cs) in reply to notromda
    notromda:
    I had a lot to say in this comment, but following the instructions about the end of files has caused this post to cut
    BTW, the delete key on a mac is what most people call backspace...
  • SeySayux (unregistered) in reply to Daverino
    Daverino:
    I want more explanation on the first one, since I am not familiar with PHP. The text is written like it came from someone with experience writing instructions for the lowest common denominator. I've written somewhat similar bits of instruction, because it can be a lot easier to give an action (Hold the delete key) than to explain a concept (there must not be any white space at the end of the file).
    1. Open the file 2. Press GG/?>(Enter)NlvGGda>(Esc):wq
  • Machtyn (unregistered) in reply to trtrwtf
    trtrwtf:
    Not to get sidetracked, but what do claymores (" a large sword used in the late Medieval and early modern periods... used in the constant clan warfare and border fights with the English from circa 1400 to 1700") have to do with the Norse ("the Scandinavian population of the period from the late 8th century to the 11th century")?

    I'm not sure about anything you wrote, but I am sure that you're a nerd! -says the geek

  • some guy (unregistered) in reply to Daverino
    Daverino:
    I want more explanation on the first one, since I am not familiar with PHP. The text is written like it came from someone with experience writing instructions for the lowest common denominator. I've written somewhat similar bits of instruction, because it can be a lot easier to give an action (Hold the delete key) than to explain a concept (there must not be any white space at the end of the file).

    My guess is that he did indeed google the answer, and more or less just copy/pasted said answer.

  • Martijn (unregistered)

    I suspect Dave stepped through a time portal. dBase, the low pay, floppies, and smoking in the office. I think he ended up somewhere around 1990.

  • trtrwtf (unregistered) in reply to BobB
    BobB:
    trtrwtf:
    Not to get sidetracked, but what do claymores (" a large sword used in the late Medieval and early modern periods... used in the constant clan warfare and border fights with the English from circa 1400 to 1700") have to do with the Norse ("the Scandinavian population of the period from the late 8th century to the 11th century")?

    I apologize if you are indeed Norse and I have offended you and/or your people.

    Actually, I just checked my passports, and one of them does say I'm Finnish. I'm just dispatching a longboat full of large beardy guys in horned helmets to exact vengeance in blood for the offense you've given. What's your location?

  • (cs)

    I once had an interview like the second one. After the rediculous math questions (this guy had a math fetish), his tirade of how Entity Framework and linq to sql really just output sql text and nothing else, and that his entirely string-based "data access" layer used, GASP, string interning, I was ready to walk away... I remember asking him (quite sarcastically) if he'd ever heard of sql injection vulnerabilities. Apparently because of my security background, he wanted to hire me.

    The guy was a total jerkoff (very condescending, etc.), and I think he sensed that I didn't want the job because he kept me there for ~4 hours talking about how profitable the company was, blah blah blah.

    The funny thing was that, other than math/algo questions, he didn't even TOUCH .Net, which was funny considering it was for a senior .net role.

  • yetihehe (unregistered) in reply to some guy
    some guy:
    Daverino:
    I want more explanation on the first one, since I am not familiar with PHP. The text is written like it came from someone with experience writing instructions for the lowest common denominator. I've written somewhat similar bits of instruction, because it can be a lot easier to give an action (Hold the delete key) than to explain a concept (there must not be any white space at the end of the file).

    My guess is that he did indeed google the answer, and more or less just copy/pasted said answer.

    My guess is that this weeds out those without clue about php. If someone knows anything, he will just say that those instructions are wrong or will do it the right way.

  • (cs) in reply to BobB
    BobB:
    trtrwtf:
    Not to get sidetracked, but what do claymores (" a large sword used in the late Medieval and early modern periods... used in the constant clan warfare and border fights with the English from circa 1400 to 1700") have to do with the Norse ("the Scandinavian population of the period from the late 8th century to the 11th century")?

    Not to get sidetracked either, but seeing as how this was a fictional response to a fictional situation, I didn't feel it warranted research into the armaments of that particular group of people. I apologize if you are indeed Norse and I have offended you and/or your people. But please, by all means, continue being anal, it appears you're having fun. :)

    You must be new here.

    Pedantry is a favourite passtime of many trolls and visitors here.

  • Eric (unregistered) in reply to SeySayux
    SeySayux:
    1. Open the file 2. Press GG/?>(Enter)NlvGGda>(Esc):wq

    For all I know, this could be lauching the missiles if typed in Emacs, so be careful what advice you dispense...

  • (cs) in reply to trtrwtf
    trtrwtf:
    Actually, I just checked my passports, and one of them does say I'm Finnish. I'm just dispatching a longboat full of large beardy guys in horned helmets to exact vengeance in blood for the offense you've given. What's your location?

    I'm in Oklahoma, US. I got a whole raiding party full of Apache braves. Bring it!

  • (cs) in reply to C-Octothorpe
    C-Octothorpe:
    Pedantry is a favourite passtime of many trolls and visitors here.
    Pastime. (You did that on purpose, I'm assuming, to prove your point?)
  • Martijn (unregistered) in reply to trtrwtf
    trtrwtf:
    BobB:
    trtrwtf:
    Not to get sidetracked, but what do claymores (" a large sword used in the late Medieval and early modern periods... used in the constant clan warfare and border fights with the English from circa 1400 to 1700") have to do with the Norse ("the Scandinavian population of the period from the late 8th century to the 11th century")?

    I apologize if you are indeed Norse and I have offended you and/or your people.

    Actually, I just checked my passports, and one of them does say I'm Finnish. I'm just dispatching a longboat full of large beardy guys in horned helmets to exact vengeance in blood for the offense you've given. What's your location?

    Oh no! Not sysadmins!
  • (cs) in reply to neminem
    neminem:
    C-Octothorpe:
    Pedantry is a favourite passtime of many trolls and visitors here.
    Pastime. (You did that on purpose, I'm assuming, to prove your point?)
    Tell me, when you saw that mispelling, did your eye twitch a little? Dance puppets! DANCE!!! HAHAHA
  • (cs) in reply to D: BANANA

    /**** Updated instructions to fix bug found by MAZZTER ****/

    s/For at least 15 seconds/For at least 30 seconds/

  • Zuy Incognito (unregistered) in reply to C-Octothorpe
    C-Octothorpe:
    BobB:
    trtrwtf:
    Not to get sidetracked, but what do claymores (" a large sword used in the late Medieval and early modern periods... used in the constant clan warfare and border fights with the English from circa 1400 to 1700") have to do with the Norse ("the Scandinavian population of the period from the late 8th century to the 11th century")?
    Not to get sidetracked either, but seeing as how this was a fictional response to a fictional situation, I didn't feel it warranted research into the armaments of that particular group of people. I apologize if you are indeed Norse and I have offended you and/or your people. But please, by all means, continue being anal, it appears you're having fun. :)
    You must be new here.

    Pederasty is a favourite passtime of many trolls and visitors here.

    That's why I hooked up! With your baby boy!

  • trtrwtf (unregistered) in reply to BobB
    BobB:
    trtrwtf:
    Actually, I just checked my passports, and one of them does say I'm Finnish. I'm just dispatching a longboat full of large beardy guys in horned helmets to exact vengeance in blood for the offense you've given. What's your location?

    I'm in Oklahoma, US. I got a whole raiding party full of Apache braves. Bring it!

    Okay, damn, I'm going to have to look into shipping options for the longboats. I'll get back to you on the extracting vengeance in blood bit. Are you busy, um, first week of November?

  • (cs) in reply to trtrwtf

    Dear Tony,

    I'm still waiting for a call back as to whether or not I got the job.

    Sincerely, PHP Guru

  • Dereleased-work (unregistered)

    Quick overview of the first one for the PHP clueless (You lucky bastards you):

    As you probably know, an HTTP Message looks like:

    Headers: And Values\r\n More-Headers: Are Awesome\r\n \r\n Body
    Obviously, then, once you start sending the body to the client, the time to send headers has come and gone, so if you try to send any headers, PHP generates an error and appends it to the body letting you know all about how you totally cannot send anymore headers.

    Actual information if you're still curious:

    Things that may dump headers:

    1. session_start()
    2. setcookie()
    3. header()
    4. a function or functions I don't know the name of

    Reasons why we might already have sent headers and be in the body of the message:

    1. PHP raised an error, which was flushed immediately, before a header-generating function was called
    2. Somewhere in the file (or include chain), some output was present and therefore sent to the buffer (could be an error, whitespace in a file, actual expected output happening at unexpected times because you don't understand your include chain, etc)
    3. I bet there's at least one more way

    Ways to keep this from going all splody: 0) Any time you want to dump headers, use headers_sent() to check if you can still send headers. If not, just set yourself on fire.

    1. Use Output Buffering (write all output to a buffer and only flush when done or at a defined point); this can be invoked at run time or defined as auto-on
    2. Just remove the final closing PHP tag in a file; it's valid, and it saves you whitespace woes
    3. MAKE SURE YOUR UTF-* FILES DO NOT HAVE BYTE ORDER MARKS. This will drive you insane if you're unaware of what a BOM is, because most text editors simply won't render it, but stupid PHP will treat it as 2 bytes of whitespace and start flushing your output immediately.
    4. Other things I'm probably forgetting

    So, the answer the person gave basically covers the single situation of having whitespace after the final closing tag in a PHP file, which would itself only matter if it were part of the include chain and not a single file running alone. In reality, of course, while this can be an issue, you are much more likely to be encountering something even dumber, like an error being raised before your call to session_start().

  • Zuy Incognito (unregistered) in reply to Mo
    Mo:
    Any interview where you don't get to blow someone is a waste of time.
    Even then, it's a waste of a potential income if you don't get it on tape.

    Do you know what people would pay to see nerds get blown? It's something you're never gonna see anywhere else. Supply/Demand and all that jizz.

  • (cs)

    Yes, there are a lot of things you wouldn't want to mention in that guy's presence.

    Furbies, for example: We all know what a bunch of little spies they are!

  • Pete (unregistered) in reply to Eric

    Looks like vi to me...

  • (cs) in reply to Pete
    Pete:
    Looks like vi to me...
    Six what?
  • (cs) in reply to BobB
    BobB:
    trtrwtf:
    Actually, I just checked my passports, and one of them does say I'm Finnish. I'm just dispatching a longboat full of large beardy guys in horned helmets to exact vengeance in blood for the offense you've given. What's your location?

    I'm in Oklahoma, US. I got a whole raiding party full of Apache braves. Bring it!

    Former Marine infantryman here. You guys may want consider going home before you find out the modern definition of claymore.

  • (cs) in reply to Dereleased-work
    Dereleased-work:
    Quick overview of the first one for the PHP clueless (You lucky bastards you):

    As you probably know, an HTTP Message looks like:

    Headers: And Values\r\n More-Headers: Are Awesome\r\n \r\n Body
    Obviously, then, once you start sending the body to the client, the time to send headers has come and gone, so if you try to send any headers, PHP generates an error and appends it to the body letting you know all about how you totally cannot send anymore headers.

    Actual information if you're still curious:

    Things that may dump headers:....

    tl;dr, the REAL answer is (somewhere right before the offending line):

    ob_clean();

    Problem solved! kthxbai!

  • trtrwtf (unregistered) in reply to Dereleased-work
    Dereleased-work:
    Obviously, then, once you start sending the body to the client...

    I usually find it's more efficient to send the head to the client. Saves on shipping, and it's typically more identifiable.

  • bleh (unregistered) in reply to SeySayux
    SeySayux:
    Daverino:
    I want more explanation on the first one, since I am not familiar with PHP. The text is written like it came from someone with experience writing instructions for the lowest common denominator. I've written somewhat similar bits of instruction, because it can be a lot easier to give an action (Hold the delete key) than to explain a concept (there must not be any white space at the end of the file).
    1. Open the file 2. Press GG/?>(Enter)NlvGGda>(Esc):wq

    Think you meant: G$/?>(enter)NlvG$da(esc):x

  • (cs) in reply to Zuy Incognito
    Zuy Incognito:
    C-Octothorpe:
    BobB:
    trtrwtf:
    Not to get sidetracked, but what do claymores (" a large sword used in the late Medieval and early modern periods... used in the constant clan warfare and border fights with the English from circa 1400 to 1700") have to do with the Norse ("the Scandinavian population of the period from the late 8th century to the 11th century")?
    Not to get sidetracked either, but seeing as how this was a fictional response to a fictional situation, I didn't feel it warranted research into the armaments of that particular group of people. I apologize if you are indeed Norse and I have offended you and/or your people. But please, by all means, continue being anal, it appears you're having fun. :)
    You must be new here.

    Pederasty is a favourite passtime of many trolls and visitors here.

    That's why I hooked up! With your baby boy!
    No f(r)ictions on being anal with a claymore?

    I am disappointed!

  • boog (unregistered) in reply to frits
    frits:
    Former Marine infantryman here.
    That's highley unlikely.
  • Bronie (unregistered) in reply to SeySayux
    SeySayux:
    1. Open the file 2. Press GG/?>(Enter)NlvGGda>(Esc):wq

    And how adding GG/?> NlvGGda>:wq to file will help?

  • (cs)
    As he pulled a cigarette out and lit it, he muttered "hope you don't mind if I smoke."
    Of course not - after all, as I told the last guy, I was just leaving. </what-dave-should-have-said-instead-of-wasting-the-next-two-hours-listening-to-this-douche>
  • a visitor (unregistered) in reply to C-Octothorpe

    That is not funny! My son was a troll and it is no laughing matter :(

  • Bob (unregistered) in reply to a visitor
    a visitor:
    That is not funny! My son was a troll and it is no laughing matter :(

    Are you making fun of my gigantic retarded autistic son with the bad back? Bitch.

  • Zuy Incognito (unregistered) in reply to no laughing matter
    no laughing matter:
    Zuy Incognito:
    C-Octothorpe:
    You must be new here. Pederasty is a favourite passtime of many trolls and visitors here.
    That's why I hooked up! With your baby boy!
    No f(r)ictions on being anal with a Queermore? I am disappointed!
    Attack Carrier: Ahhh! Someone want to play! Peppy: Incoming enemy from the rear! Disappointed the product works as advertised?

    Read the bottle, it says: "Queermore: No blood, just buds! Nine out of ten queers can't be wrong!"

    Did you really expect 9/10 queers to not know their lube?

  • Jean (unregistered)

    The answers to the PHP question must have been ripped off the Wordpress documentation.

  • Call Center (unregistered) in reply to trtrwtf
    trtrwtf:
    BobB:
    trtrwtf:
    Not to get sidetracked, but what do claymores (" a large sword used in the late Medieval and early modern periods... used in the constant clan warfare and border fights with the English from circa 1400 to 1700") have to do with the Norse ("the Scandinavian population of the period from the late 8th century to the 11th century")?

    I apologize if you are indeed Norse and I have offended you and/or your people.

    Actually, I just checked my passports, and one of them does say I'm Finnish. I'm just dispatching a longboat full of large beardy guys in horned helmets to exact vengeance in blood for the offense you've given. What's your location?

    Forget India, we're outsourcing our call center to Scandinavia!

  • Hortical (unregistered) in reply to trtrwtf
    trtrwtf:
    Actually, I just checked my passports, and one of them does say I'm Finnish. I'm just dispatching a longboat full of large beardy guys in horned helmets to exact vengeance in blood for the offense you've given. What's in your wallet?
    Lame, I know.

Leave a comment on “The High-Security Interview, The PHP Candidate, and Overqualified”

Log In or post as a guest

Replying to comment #:

« Return to Article