OFTS,
You are wise beyond your "smack-fu master, in training" my friend. I couldn't agree more with all you've said. Which prompts me to want to read every post you've ever posted!
Anyway, my rant was related to something like the following...
The other day, the day after you posted your original BST question, which prompted me to do some quick re-reading on the subject, I was at an interview. I figured that they were going to ask me something about O
something or other, give me some kind of question involving BST's, and then a bunch of other stuff about what I had done. The funny thing was, when the interview came, I was exactly right... they asked me all of that. Exactly all of it. The bummer was that the O
question was the same as the BST question. They wanted me to write a search routine something like the following...
So that was the answer I threw out there in like 2 min. They just gave me the stub. So then, the interviewer was like... ok, so what's the order of that algorithm, and I said it was O(n^2). So far so good... I think!?! So then the interviewer was like... ok, so how would you optimize that without modifying the array? Meaning that you can't add things to a list of values that you had already searched, or reorder the list to know that once you had reached a number higher than 7 that you could discontinue searching... and I totally blanked. I thought about it for a minute, or two, and just totally blanked. Because eventhough I had written and could talk about how I created a persistence layer to get by having to waste 25K per cpu on weblogic to use their ejb server, I couldn't for the life of me figure out on the spot how I could optimize that call without just sorting and pre-sorting and massaging the list... then the interviewer said... what if you used a BST? And I can't tell you how stupid I felt. I had just looked at it, read up on it (granted it was like 2am and I was exhausted when doing it), but what the book failed to tell me was the shit I hadn't done in over 6 years... that it's used to reduce O(n^2) algorithms like the one above to O(1). So that just bummed me out, and made me laugh at myself. I think I even told the interviewer how embarrassed I was.
I thought instantly of your question, and hoped that I hadn't also done anything else to make me an unworthy candidate for the job, as if that wasn't enough already.
So then on my way home I started stewing about the typical stuff you stew about after a long-ass interview without any lunch. I was hoping that they'd judge me on the stuff that I knew, and what I had done, and how I had been able to talk intelligently about the stuff that I had worked on over the past several years. I had even written the exact same stuff as one of the interviewers. So we talked about some of that a little bit... incidentally, he also happened to be the same interviewer that asked me the BST question.
So anyway, the stewing got me to thinking about why I could talk intelligently about all this other shit, but couldn't talk intelligently about BST's. I mean, BST's are simple right? And they are, but they're not something that people need anymore, and that's why I couldn't answer the question even to my satisfaction... 'cause I usually don't ding people for not knowing their academic shit. I think formalized education is a joke, eventhough I have more than most!
And the only answer I came up with is the one I posted above regarding how they don't make sense unless you're writing normal command-line utilities and the like. They're just not structures that are used anymore... for much of anything. Or atleast in nothing I've seen lately!
The other thing that generally bumms me out about technical interviews is that they invariably turn into a pissing contest. 'Cause you end up getting some guy in there who wants to prove that he's smarter than you, so he spends his time on a question trying to explain something, and all he ends up doing is confusing himself.
No doubt, I interviewed with this other guy at the same organization who wanted me to draw the arrows between nodes after inserting and removing things from a Linked List. But the problem was that he never said that. The whole time we were talking about designing an EntityCache for a persistence layer, and then he jumps in with:
And how would you remove that element?
I was kinda confused, and just looked at him and said, well... I'd call
And he said that was wrong. So then I was like... huh? What do you mean that's wrong? I'm prettysure that call exists in the java.util.LinkedList. And then he said... well, ok, let's forget about removing the object, how would you add it?
He told me that was wrong again... And that's when I knew there was something we weren't connecting on so I asked him what he really meant? It took him 10 minutes to explain to me that he just wanted me to draw the head, tail, and next pointer arrows that you used to draw in your second semester CS course. At that point, I didn't know who was interviewing who? So I finally got that out of him, drew the pretty little arrows, and we moved on... but I'm sure that part of the interview dinged me, 'cause he was trying to pull his d*%k out and put it on the table
, and for some reason wanted me to do the same. I just don't really operate like that. He wanted to get into a pissing contest over drawing arrows for addition and deletion of items in a Linked List.
All things I'd be concerned about if I was fresh out of school, but things that I have forgotten since I've finished my data structures and algorithms course.
However, I'm rapidly recognizing that I need to brush up on these outdated skills, 'cause people don't really care about if you know what you're doing, just if you can fit their mold. So my only alternative is to conquer the technical interview or say f*@k-it and become a Systems Engineer!
My problem there is that I really like writing code, and using my brain.
-green
You are wise beyond your "smack-fu master, in training" my friend. I couldn't agree more with all you've said. Which prompts me to want to read every post you've ever posted!
Anyway, my rant was related to something like the following...
The other day, the day after you posted your original BST question, which prompted me to do some quick re-reading on the subject, I was at an interview. I figured that they were going to ask me something about O
code:<HR>Code:<P>/* Search through an int[] and return true if any of the numbers add up to 7... ie. x + y = 7 */<P>boolean search (int[] a) { for (int indx = 0; indx < a.length; indx++) { int firstValue = a[indx]; for (int j = indx + 1; j < a.length; j++) { int secondValue = a[j]; if ((firstValue + secondValue) == 7) { return true; } } } return false; }<P>
So that was the answer I threw out there in like 2 min. They just gave me the stub. So then, the interviewer was like... ok, so what's the order of that algorithm, and I said it was O(n^2). So far so good... I think!?! So then the interviewer was like... ok, so how would you optimize that without modifying the array? Meaning that you can't add things to a list of values that you had already searched, or reorder the list to know that once you had reached a number higher than 7 that you could discontinue searching... and I totally blanked. I thought about it for a minute, or two, and just totally blanked. Because eventhough I had written and could talk about how I created a persistence layer to get by having to waste 25K per cpu on weblogic to use their ejb server, I couldn't for the life of me figure out on the spot how I could optimize that call without just sorting and pre-sorting and massaging the list... then the interviewer said... what if you used a BST? And I can't tell you how stupid I felt. I had just looked at it, read up on it (granted it was like 2am and I was exhausted when doing it), but what the book failed to tell me was the shit I hadn't done in over 6 years... that it's used to reduce O(n^2) algorithms like the one above to O(1). So that just bummed me out, and made me laugh at myself. I think I even told the interviewer how embarrassed I was.
I thought instantly of your question, and hoped that I hadn't also done anything else to make me an unworthy candidate for the job, as if that wasn't enough already.
So then on my way home I started stewing about the typical stuff you stew about after a long-ass interview without any lunch. I was hoping that they'd judge me on the stuff that I knew, and what I had done, and how I had been able to talk intelligently about the stuff that I had worked on over the past several years. I had even written the exact same stuff as one of the interviewers. So we talked about some of that a little bit... incidentally, he also happened to be the same interviewer that asked me the BST question.
So anyway, the stewing got me to thinking about why I could talk intelligently about all this other shit, but couldn't talk intelligently about BST's. I mean, BST's are simple right? And they are, but they're not something that people need anymore, and that's why I couldn't answer the question even to my satisfaction... 'cause I usually don't ding people for not knowing their academic shit. I think formalized education is a joke, eventhough I have more than most!
And the only answer I came up with is the one I posted above regarding how they don't make sense unless you're writing normal command-line utilities and the like. They're just not structures that are used anymore... for much of anything. Or atleast in nothing I've seen lately!
The other thing that generally bumms me out about technical interviews is that they invariably turn into a pissing contest. 'Cause you end up getting some guy in there who wants to prove that he's smarter than you, so he spends his time on a question trying to explain something, and all he ends up doing is confusing himself.
No doubt, I interviewed with this other guy at the same organization who wanted me to draw the arrows between nodes after inserting and removing things from a Linked List. But the problem was that he never said that. The whole time we were talking about designing an EntityCache for a persistence layer, and then he jumps in with:
And how would you remove that element?
I was kinda confused, and just looked at him and said, well... I'd call
code:<HR>Code:... LinkedList someList = new LinkedList(aBunchOfItems);<P>someList.remove(whateverIndexYouWant); ...
And he said that was wrong. So then I was like... huh? What do you mean that's wrong? I'm prettysure that call exists in the java.util.LinkedList. And then he said... well, ok, let's forget about removing the object, how would you add it?
code:<HR>Code:... LinkedList someList = new LinkedList(aBunchOfItems);<P>someList.add(someItem, whateverIndexYouWant); ...
He told me that was wrong again... And that's when I knew there was something we weren't connecting on so I asked him what he really meant? It took him 10 minutes to explain to me that he just wanted me to draw the head, tail, and next pointer arrows that you used to draw in your second semester CS course. At that point, I didn't know who was interviewing who? So I finally got that out of him, drew the pretty little arrows, and we moved on... but I'm sure that part of the interview dinged me, 'cause he was trying to pull his d*%k out and put it on the table
All things I'd be concerned about if I was fresh out of school, but things that I have forgotten since I've finished my data structures and algorithms course.
However, I'm rapidly recognizing that I need to brush up on these outdated skills, 'cause people don't really care about if you know what you're doing, just if you can fit their mold. So my only alternative is to conquer the technical interview or say f*@k-it and become a Systems Engineer!
My problem there is that I really like writing code, and using my brain.
-green