• (cs) in reply to Tack
    Tack:

    gwenhwyfaer:
    In all fairness, you don't have to iterate through a list with an Nth operator. The iteration will happen, but it's not your responsibility any more, and you can't be blamed for it going wrong.

    This is so Bill Clinton.  "That depends on what the definition of 'is' is." 

    That was kind of my point, and I had hoped that the following text would have conveyed it adequately...

    *sigh* Note to self - use more smileys and less irony, and do remember that no matter how obvious you make it to a bunch of geeks that you're being cynical or sarcastic, at least one of them will choose to take your words as a true expression of your beliefs and start trying to tell you how silly you are.

    They're all a good size, boys, but you can put them away again now.

  • CyVaquero (unregistered)

    I would definitely chalk this up to fantasy if it weren't for the fact that I work at a major research University. My only questions are - who the hell goes through an Engineering program only to make less than your average waiter/waitress and how do you get such an anal group of people together in one building, that alone is worth funding a research project on.

  • Bud (unregistered) in reply to mnature
    Anonymous:
    Anonymous:
    triso:

    ...spewing out in gruesome detail the instructions on how to make a pot of ISO9000 coffee.
     

    Beautiful! Do you know of anyone who has done this or similar? That would a friggin' hilarious thing to have.

    http://guff.szub.net/2003/03/06/general-steps-for-making-coffee/

    http://www.wildandassociates.com/articles/improvass.html

    See also British Standard 6008:1980 (alias ISO 3103:1980) on the subject of preparing tea...

    http://ftp.ee.surrey.ac.uk/papers/AI/L.Gillam/bs_tea.pdf

  • Trix (unregistered) in reply to Egor

    Cos he's a sexist pig?

  • (cs) in reply to Franz Kafka

    Anonymous:
    real_aardvark:

    That's about as good as my interview question, "What kind of linked list do you not have to iterate through to find a value?"

    I go, "Uh...an empty one?"

    He goes, "No one where the bracket [] operator is overloaded...it navigates to the position passed in the operator. That immediately finds the value at a given index, and returns a the value."

    (Remainder clipped for clarity, not for censorship)

    Ummm ... in fact, the proposed use of an overloaded operator [] is indeed an iterator -- albeit the rather uninteresting "random access iterator."

    A few questions spring to mind:

    (1) Why pick operator[] when you have all sorts of equally interesting operators to overload -- for example "operator ->*" ?

    (2) How exactly would this overloaded operator be coded for a linked list? Oh, I know, use a bridge-pattern vector to shadow every entry in the linked list. Ummm again.

    (3) What would happen if you pointed out to your prospective boss that he is a clueless moron by explaining the first two points to him? Not that I really care.

    (4) I'm English, but surely the correct phrase is "Do not taunt Happy Fun Employee Agreement."

    There is no such thing as a random access iterator (in the STL sense) for a linked list. You can fake one with an underlying O(n) accessor, but you can't get around iterating a linked list. sorry

    <font face="Arial" size="2">Sigh.</font>

    You are assuming that this is the STL (or spiffy Java 1.5/C# equivalent).  Or you are assuming that the linked list in question is minimalist, ie something like

    struct syntactic_sludge

    {

        void*   pMeatyBit;

        struct syntactic_sludge* pNext;

    };

    Note that I carefully appended a semi-colon there, just to stop you complaining that it won't compile.

    Obviously, a linked list can be implemented any damn way you want to, in any language you choose, so long as it functions as a linked list.  If you have different requirements, such as the ability to use a random access iterator, you clearly need to add further (and in this case very silly) infrastructure.  See my point (2), which is right below my point (1).  Jeez, a guy who can wade through 500+ pages of Matthew Austern's (excellent) book, and can't even be bothered to read half-a-page of blog reply properly.

    What happened, dude? Did the veins start popping out on your neck and you just had to cut away and reply?

    Although, now I come to think of it, I prefer the interviewee's answer anyway.  As I'm sure you will point out, it is strictly incorrect: there are no values in an empty linked list. (Yes, yes, I suppose you can always claim that NULL, or Null, or undef, or whatever, can in some senses be a value.) However, I don't think I would refuse a hire on the grounds that the guy can come out with a witty reply to a senseless question, but can't count to one without taking his shoes and socks off ...

  • anonymous_m (unregistered) in reply to sparked

    Siteworx?

  • anonymous_m (unregistered) in reply to Patrick

    The one where each value is recorded in a separate data structure that you have to iterate through? Couldn't resists. ;)

  • mike (unregistered)

    I did consulting for a company where the owner/CEO would pull a dollar bill out of his pocket and the last 8 of the serial number would be the persons password.  We tried to convince him multiple times that this was a bad idea and to let us use group policies to create a real secure password policy but he insisted this was the most secure and random.

  • something (unregistered)

    Wow, thats one paranoid company...

    When i was doing an internship at a defence company (so some place where you do expect secret stuff)  i didnt have anything to sign regarding anything beyond the contract that didnt say anything beyond when i should be there, what i should do (hanging around, watching stuff, doing variuos cool things like flying a fighjter jet simulator) and that i wont really get paid.Nothing remotely security related.

    I had a camera with me, used it and nobody ever said a word about that.And we were showed stuff that for sure was not intended for the public.
    We had laptops to work with, with acess to almost any data, floppy drive enabled for sure, we could have stolen enything.We could even take the laptops HOME with us!
    We were given RFID cards for entry, which turned out to work on nearly ANY door, including doors leading to rooms where we better should not have been.


    The only thing they bitched around was when i was taking some advertising flyer.They said id better not take it home with me because it might be classified.Oh yeah, that exact paper was on the company website as a pdf.
     



     

  • Franz Kafka (unregistered) in reply to real_aardvark
    real_aardvark:

    Anonymous:
    real_aardvark:

    That's about as good as my interview question, "What kind of linked list do you not have to iterate through to find a value?"

    I go, "Uh...an empty one?"

    He goes, "No one where the bracket [] operator is overloaded...it navigates to the position passed in the operator. That immediately finds the value at a given index, and returns a the value."

    (Remainder clipped for clarity, not for censorship)

    Ummm ... in fact, the proposed use of an overloaded operator [] is indeed an iterator -- albeit the rather uninteresting "random access iterator."

    A few questions spring to mind:

    (1) Why pick operator[] when you have all sorts of equally interesting operators to overload -- for example "operator ->*" ?

    (2) How exactly would this overloaded operator be coded for a linked list? Oh, I know, use a bridge-pattern vector to shadow every entry in the linked list. Ummm again.

    (3) What would happen if you pointed out to your prospective boss that he is a clueless moron by explaining the first two points to him? Not that I really care.

    (4) I'm English, but surely the correct phrase is "Do not taunt Happy Fun Employee Agreement."

    There is no such thing as a random access iterator (in the STL sense) for a linked list. You can fake one with an underlying O(n) accessor, but you can't get around iterating a linked list. sorry

    <font face="Arial" size="2">Sigh.</font>

    You are assuming that this is the STL (or spiffy Java 1.5/C# equivalent).  Or you are assuming that the linked list in question is minimalist, ie something like

    struct syntactic_sludge

    {

        void*   pMeatyBit;

        struct syntactic_sludge* pNext;

    };

    Note that I carefully appended a semi-colon there, just to stop you complaining that it won't compile.

    Obviously, a linked list can be implemented any damn way you want to, in any language you choose, so long as it functions as a linked list.  If you have different requirements, such as the ability to use a random access iterator, you clearly need to add further (and in this case very silly) infrastructure.  See my point (2), which is right below my point (1).  Jeez, a guy who can wade through 500+ pages of Matthew Austern's (excellent) book, and can't even be bothered to read half-a-page of blog reply properly.

    What happened, dude? Did the veins start popping out on your neck and you just had to cut away and reply?

    Although, now I come to think of it, I prefer the interviewee's answer anyway.  As I'm sure you will point out, it is strictly incorrect: there are no values in an empty linked list. (Yes, yes, I suppose you can always claim that NULL, or Null, or undef, or whatever, can in some senses be a value.) However, I don't think I would refuse a hire on the grounds that the guy can come out with a witty reply to a senseless question, but can't count to one without taking his shoes and socks off ...

     It doesn't really matter what the language is - this is a linked list, so there are certain invariants: data access is O(n), where n is the index in the list. A Random access iterator (which I first saw in STL) has a specific implied access time - O(1), so you just can't do it. If you're faking it with a vector, then you really aren't using a linked list, you're using a vector, so deletes and mid-list inserts are O(n). This is basic data structures, and there's no way around it.
     

  • Old Geezer (unregistered) in reply to newfweiler

    Wow.

    Once again, random scripting language programmer gives scripting languages a bad name. Sad.

    I'm going to clue you into some things. Maps, auto-resizing arrays and lists, and many other magical features of scripting languages are implemented using fundamental data structures. For most computer science majors, this class is taken as the second or third course. In this class you learn of stacks, queues, linked lists, trees, and if the instructor is good, hashing, sorting, searching, and other operations performed on those lists, and the complexity of those operations/algorithms. If they are really good you get into headache-inducing graph theory that underlies networking, decisions, and NP-complete problems.

     

  • tampag (unregistered)

    Such a shame. I collect employee agreements and NDA's and the like. They make for some great, funny (and sometimes disturbing) reading.

     Very glad you didn't take the job.

     G

  • (cs) in reply to Franz Kafka
    Anonymous:
    real_aardvark:

    Anonymous:
    real_aardvark:

    That's about as good as my interview question, "What kind of linked list do you not have to iterate through to find a value?"

    I go, "Uh...an empty one?"

    He goes, "No one where the bracket [] operator is overloaded...it navigates to the position passed in the operator. That immediately finds the value at a given index, and returns a the value."

    (Remainder clipped for clarity, not for censorship)

    Ummm ... in fact, the proposed use of an overloaded operator [] is indeed an iterator -- albeit the rather uninteresting "random access iterator."

    A few questions spring to mind:

    (1) Why pick operator[] when you have all sorts of equally interesting operators to overload -- for example "operator ->*" ?

    (2) How exactly would this overloaded operator be coded for a linked list? Oh, I know, use a bridge-pattern vector to shadow every entry in the linked list. Ummm again.

    (3) What would happen if you pointed out to your prospective boss that he is a clueless moron by explaining the first two points to him? Not that I really care.

    (4) I'm English, but surely the correct phrase is "Do not taunt Happy Fun Employee Agreement."

    There is no such thing as a random access iterator (in the STL sense) for a linked list. You can fake one with an underlying O(n) accessor, but you can't get around iterating a linked list. sorry

    <font face="Arial" size="2">Sigh.</font>

    You are assuming that this is the STL (or spiffy Java 1.5/C# equivalent).  Or you are assuming that the linked list in question is minimalist, ie something like

    struct syntactic_sludge

    {

        void*   pMeatyBit;

        struct syntactic_sludge* pNext;

    };

    Note that I carefully appended a semi-colon there, just to stop you complaining that it won't compile.

    Obviously, a linked list can be implemented any damn way you want to, in any language you choose, so long as it functions as a linked list.  If you have different requirements, such as the ability to use a random access iterator, you clearly need to add further (and in this case very silly) infrastructure.  See my point (2), which is right below my point (1).  Jeez, a guy who can wade through 500+ pages of Matthew Austern's (excellent) book, and can't even be bothered to read half-a-page of blog reply properly.

    What happened, dude? Did the veins start popping out on your neck and you just had to cut away and reply?

    Although, now I come to think of it, I prefer the interviewee's answer anyway.  As I'm sure you will point out, it is strictly incorrect: there are no values in an empty linked list. (Yes, yes, I suppose you can always claim that NULL, or Null, or undef, or whatever, can in some senses be a value.) However, I don't think I would refuse a hire on the grounds that the guy can come out with a witty reply to a senseless question, but can't count to one without taking his shoes and socks off ...

     It doesn't really matter what the language is - this is a linked list, so there are certain invariants: data access is O(n), where n is the index in the list. A Random access iterator (which I first saw in STL) has a specific implied access time - O(1), so you just can't do it. If you're faking it with a vector, then you really aren't using a linked list, you're using a vector, so deletes and mid-list inserts are O(n). This is basic data structures, and there's no way around it.
     

    Criminy.  I can't quite believe that I'm still wasting my time on this.

    For the record, absolutely everything I posted was a feeble, English attempt at humour.  I do wish that people would stop getting so alpha-male on me.  For the record again, yes, I do accept that you all know at least as much about algorithms, data structures, and the STL as I do, and probably more.  Happy now?

    Now, let us hypothesise that we are all wrong, and the pointy-haired boss in question has a real problem.  Let us say that he is dealing with a data-set of, oh, I dunno, around ten million records.  Let us say that this data-set is consumed by an enterprisey system that only accepts linked lists and does not understand such hifalutin things as vectors.

    From a high-level point of view (ie requirements), he obviously thinks in terms of linked lists, because this is what The System deals with.  He might legitimately be worried about the speed at which his company's "Add-on" (which is probably the bulk of the functionality) is operating.  Thus his question.

    Although this is contrived, and although my convoluted "solution" is almost certainly the wrong one, I submit that it would work, it does meet the terms of the interview question, and it certainly features something that can be thought of as a linked list. (And yes, I know, you'll have to expose the actual linked list to the enterprisey system, using a proxy or a cast or something equally horrible.)

     I am not "faking" a linked list with a vector.  The STL does not mandate a specific implementation for its data structures.  I am augmenting the typical implementation with extended functionality to meet a specific business requirement.  The damn thing still works like a linked list in all other respects, which is surely what any normal, sane developer would want.

    Not having a copy of Austern to hand, and not being wiling to plough through the specs, I believe you'll find that the STL does not insist on maximal orders of performance ("No better than O(n)"), merely on minimal orders of performance ("No worse than O(n)").

    This is getting terribly silly.

    Captcha: Do not taunt Happy Fun English Programmer.  If he begins to smoke, parts may include an unknown glowing substance which fell to Earth, presumably from outer space.

  • Guything McThingGuy (unregistered) in reply to real_aardvark

    Dude, you're missing the point. Why specify "linked list" in the question if you're not using any of the linked list functionality? The answer the interviewer gave was pretty much "when you abstract away everything that makes it a linked list".

    Q: When can you use an integer as a bitmap?

    A: When you subclass the Integer type in Java to provide a bunch of image manipulation functions.

  • era (unregistered) in reply to darin
    darin:
    Though I did find that far more companies wanted pre-interview paperwork signed during 1993/94 than I had ever seen before or after.  Maybe that was just the paranoid era.  Things like non-disclosure agreements, waiver of my employment rights, agreements not to sue, etc.

    No, that was the era when the executive team of any mildly successful company was maniacally muttering "we need to go raise some serious VC money before the bubble bursts", and part of what they thought they had to do in order to pull that off was (to pretend really hard, or not) to have "risk management" and "managed processes" because the would-be investors would not take them seriously if not.

    Little did they realize that in many cases, the way they would describe their pathetic attempts would scare off the vultures much faster than an honest lack of competence but with a firm strategy to focus on technical and marketing competence first, and a genuine willingness to learn, eventually. Oh, wait, where did this soapbox come from?

  • PHP coder (unregistered) in reply to Pingmaster
    Pingmaster:
    i'd have probably walked shortly after being handed the 4-page NDA on the first interview. Honestly, what sort of idiocy/corporate paranoia would one be in store for if i'm required to sign a 4 page NDA before even attending a first interview, not even seeing the production environment.  Had I not walked at that point, then it would have been at first sight of the 14 page employment agreement. And I just have to say, working as an engineer for ANYTHING without being allowed pencils and erasers? WTF?The $23k is just icing on the cake, i haven't made that little since high school.

    I had to sign several NDA's in order to get a job coding xbox games. Yes, even before the 1st interview..

  • BlackBird (unregistered)

    Hilarious, what a crack! I've had weird interviewers but these guys are top class. It sure is possible, why not. People has the most unbelievable psychotic habits and when empowered they will turn institutions as insane as they are.

    Great story, Congrats. I hope your career took a better twist than this interview afterwards.

  • vDave420 (unregistered) in reply to Ryan
    Ryan:
    "i'd have probably walked shortly after being handed the 4-page NDA on the first interview. Honestly, what sort of idiocy/corporate paranoia would one be in store for if i'm required to sign a 4 page NDA before even attending a first interview" You've obviously never interviewed at Google have you? 

    Ha! This was my first thought, actually. In all seriousness, though, Google didn't have 4 pages.

    -dave-

  • mikeN (unregistered) in reply to Patrick
    Patrick:
    That's about as good as my interview question, "What kind of linked list do you not have to iterate through to find a value?"

    I go, "Uh...an empty one?"

    He goes, "No one where the bracket [] operator is overloaded...it navigates to the position passed in the operator. That immediately finds the value at a given index, and returns a the value."

    That a good one and you had a good answer to that, btw. But I'm sure it was totally lost on the interviewer. She/He probably felt smart telling you that nonsense. An array sure makes for a funny kind of linked list.

    -- Why is it that copy/pasting from the orginal post works better than the encoded crap that gets put in the text box from the Quote button - WTF?

  • Precious (unregistered)

    I'm impressed with you that you lasted as long as you did in that last interview without cursing them out and just walking out.

    Sounds like a cult.

  • Chris (unregistered) in reply to morry

    "the correct response would have been... I HAVE ALTERED THE CONTRACT... PRAY I DO NOT ALTER IT ANY FURTHER"

    I LOLed, I truly did.

    I have been fortunate where I have worked at places where I was appreciated from the outset, and the interviews went fine. No NDAs pre-interview, though plenty 14+ page contracts to read through (fortunately these were not unreasonable).

    The last place I worked though I should have heard the warning bells when they told me after 3 months that they were extending my trial period indefinitely. I was happy when I got a job earning double, and doing far less. That was a wake up call to the company. They had no other competent staff in that branch when me and my mate walked out.

    It is important that companies realise that their power lies not in their ideas, but in the competence (and happiness) of their staff.

  • Anonymous (unregistered) in reply to Jon
    Jon:
    Anonymous:
    YOU DO NOT TALK ABOUT THE EMPLOYEE AGREEMENT or make pencil markings in it
    DO NOT TAUNT THE EMPLOYEE AGREEMENT. 
    DO NOT LOOK AT THE OPERATIONAL END OF THE EMPLOYMENT AGREEMENT. DO NOT SUBMERGE THE EMPLOYMENT AGREEMENT IN WATER, EVEN PARTIALLY.
  • eric bloedow (unregistered)

    oh, that reminded me of a story where some crazy woman wrote on a contract-in pencil-AFTER it was signed, and expected her changes to be legally binding! the other signer took her to court, and the judge laughed in her face!

  • Crikey (unregistered) in reply to Ollie Jones

    Captchas exist for good reason, otherwise someone could easily use selenium (for example) to post spam

Leave a comment on “Security by Insanity”

Log In or post as a guest

Replying to comment #109898:

« Return to Article