- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
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.
Admin
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.
Admin
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
Admin
Cos he's a sexist pig?
Admin
<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 ...
Admin
Siteworx?
Admin
The one where each value is recorded in a separate data structure that you have to iterate through? Couldn't resists. ;)
Admin
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.
Admin
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.
Admin
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.
Admin
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.
Admin
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
Admin
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.
Admin
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.
Admin
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?
Admin
I had to sign several NDA's in order to get a job coding xbox games. Yes, even before the 1st interview..
Admin
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.
Admin
Ha! This was my first thought, actually. In all seriousness, though, Google didn't have 4 pages.
-dave-
Admin
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?
Admin
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.
Admin
"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.
Admin
Admin
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!
Admin
Captchas exist for good reason, otherwise someone could easily use selenium (for example) to post spam