Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

11-26-2014 , 03:51 PM
Quote:
Originally Posted by gaming_mouse
i'd give the direction to clean the code up as much possible and give me an example of what you consider clean, production quality code.
Quote:
Originally Posted by gaming_mouse
indeed, and someone who choosing one of those convoluted ways (and not realizing there are simpler ones) is valuable information about them. i mean, it's not like the simpler solutions here are difficult "tricks" that it would be unfair to expect someone to find.
This does not follow. One of the ways in which "production quality" code differs from you know, random answers to interview questions is that it may trade simplicity for extensibility or other attributes. Also by this definition, using "sort" is convoluted. Why is it any more convoluted to rely on a different general algorithm, especially if the candidate offers to implement it? Because sort is included in the standard library?

If you give an interview question, the candidate provides a solution and you go, oh I don't understand how you solved it, can you re-solve it, you know, this other specific way that I like to solve the problem, that's an easy way to lose credibility with some of the very best candidates. If you're a young technical person interviewing another young technical person, you're almost certainly being judged in return and giving a problem that can easily be extended in ways you don't comprehend is a very quick way to fail the reverse interview.

Again, this isn't a great reason not to ask questions that are otherwise good, but this question is completely trivial and what you're trying to measure with this question is entirely trivial. This interview question itself is a convoluted answer to a trivial, solved problem. Reverse a string, Nth from the end on a linked list, fibonacci, etc, etc - there's no shortage of interview questions that are at this level of complexity and avoid the pitfall. As a bonus, most of these questions also give you a better spectrum of answers - how fast you solve these problems is going to give you information whereas how fast you solve a weird cartesian coordinates problem is going to give you very little, because you don't know how that time was spent.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 04:08 PM
Quote:
Originally Posted by jjshabado
If someone comes up with the trivial 4-line solution, I think I've learned a lot about how they can code.
I disagree. I have looked at my own code back in middle school and early high school when I was completely self-taught, before I was aware of concepts like functions and procedures, when I named every variable x1, x2, y1, y2 and wrote every program inside a big loop and "judicious" use of gotos. It turns out I was a bit more skilled at deducing ways to reduce logic complexity and mathematical redundancies.

The problem with a 4-line solution here as opposed to something like the much-maligned 3-line quicksort is that deductive reasoning required to arrive at a short solution here has little to do with the core CS concepts. There's no recursion, there's no indirection, there's no functional abstraction, there's no substitution. Not that basic math skills are unimportant - they are very important to me and I prefer mathematical aptitude to practical programming experience - but for that I ask harder math questions, not a parlay on a trivial math question and a trivial programming question.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 04:59 PM
I don't think anyone is advocating that this question is all you need to know about a candidate.

Edit: And I'm almost certainly going to learn a lot about how they solve problems. If I have a true rockstar that just says "Oh, this is easy" and spits out a clean 4-line solution. Great. I haven't spent much time on it and I can move on to more interesting questions.

If I have a good/great candidate, they'll probably draw a diagram or just explain to me how it works and then write some clean code. Again, I haven't spent much time but I've learned something valuable.

If I have a poor/****ty candidate, they'll go all over the place and struggle and I'll eventually help them and we'll wind up the interview without asking any really hard questions that make me want to shoot myself when someone poor struggles with them.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 05:04 PM
Quote:
Originally Posted by candybar
If you give an interview question, the candidate provides a solution and you go, oh I don't understand how you solved it, can you re-solve it, you know, this other specific way that I like to solve the problem, that's an easy way to lose credibility with some of the very best candidates.
This is bad no matter what question is asked. Nobody is saying that this question should be asked looking for a specific answer.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 05:58 PM
Quote:
Originally Posted by KatoKrazy
A classmate asked me about preparing for interviews and I gave him some pointers and then introduced him to FizzBuzz. Guess what programming problem he was given in the interview?
Create a rectangle when two rectangles intersect? 😂
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 06:04 PM
Quote:
Originally Posted by jjshabado
I don't think anyone is advocating that this question is all you need to know about a candidate.
Likewise, I'm not arguing that you can't learn anything about the candidate. You could give any programming exercise and learn something. All I'm saying is that you guys need to evaluate interview questions rigorously - they are tools for obtaining specific information about the candidate - and that this kind of wishy-washy question is a bad way to judge candidates, because the quality of the information you get is low.

What skills are you testing for here? It's not testing CS knowledge nor pragmatic programming concepts. The programming part is so bland that it doesn't even reach the FizzBuzz level of complexity. Being able to use loops effortlessly is a skill, after all. Here, you're just testing if the candidate has their way around cartesian coordinates and make correct inferences.

Quote:
And I'm almost certainly going to learn a lot about how they solve problems. If I have a true rockstar that just says "Oh, this is easy" and spits out a clean 4-line solution. Great. I haven't spent much time on it and I can move on to more interesting questions.

If I have a good/great candidate, they'll probably draw a diagram or just explain to me how it works and then write some clean code. Again, I haven't spent much time but I've learned something valuable.

If I have a poor/****ty candidate, they'll go all over the place and struggle and I'll eventually help them and we'll wind up the interview without asking any really hard questions that make me want to shoot myself when someone poor struggles with them.
You could say this about any programming question but what about this particular problem is such that a rockstar quickly spits out a clean solution and a worse programmer is going to take a while to solve the problem? My problem with this question is that I know for sure that a mediocre to bad, but not terrible programmer with strong grasp of cartesian coordinates is going to look like a rockstar. Enough good programmers are removed from middle school math that they won't look great, which makes the one who is able to quickly come up with a clean solution look great, regardless of their other qualifications.

In a competitive labor market, hiring becomes a moneyball problem - you're not just trying to find great developers, but you're trying to find great developers that other people don't think are great. Unless you're the New York Yankees or Google or Facebook or a hedge fund, you're not going to outbid everyone else for the guys you want. And you lose if your scouts are distracted by irrelevant qualities.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 06:12 PM
Quote:
Originally Posted by jjshabado
This is bad no matter what question is asked. Nobody is saying that this question should be asked looking for a specific answer.
The problem here is that the question here is very easy, but can be easily extended to become overwhelmingly hard even for the interviewer. If someone with a background in computational geometry says, oh, there's this funky algorithm for computing intersection between two convex polygons and I'll just write this out for you, would the typical interviewer know how to evaluate that?

Compare this to something like FizzBuzz, where the question is easy and most of ways you can extend the question are also trivial.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 06:55 PM
jj answered a lot of your comments similarly to how i would have, i mean basically this is a filter question, not a "you've passed this, you're hired!" question. i understand some of your reservations, but i still think the question could have value.

Quote:
Originally Posted by candybar
"Clean, production quality" is an attribute of a code base and generally speaking not a quality that can be attributed to small code snippets.
so i guess you don't like: http://codereview.stackexchange.com/

it's whole premise is a refutation of the above sentiment. i think the site has enormous value.

Quote:
Answers to puzzles aren't going to tell me whether someone is going to have the discipline to come back to a preliminary solution that "works" to fix minor bugs and optimize performance in small ways. They aren't going to tell me whether the candidate is going to fix inconsistent names that are scattered around a code base, add tests to legacy code, carefully isolate code written for a specific situation that's unlikely to apply generally, and otherwise work to improve a code base.
well, if they can't even get a snippet right, i think it's safe to assume they won't be getting those other things right either. the micro here is a necessary, but not sufficient, condition for the skills you're looking for. and as with fizzbuzz (which i've never used myself, but so i hear), it's shocking how effective a filter this kind of thing can be.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 07:02 PM
I think one issue with this kind of question is that it's what I would refer to as an "insight problem". The problem requires one central insight - that if you sort the x and y coordinates, the interior two pairs will always be points defining the intersecting rectangle. After that the code is absurdly trivial.

This has a couple problems:

- The ability to have this insight quickly is strongly correlated with experience in the problem domain, i.e. spatial or Cartesian problems. Which is fine if that's what you're hiring for.

- Most people feel instinctively that this sort of insight thinking will correlate with being a good programmer, unfortunately the evidence for this is thin on the ground. I've read an entire book ("How Would You Move Mount Fuji?: Microsoft's Cult of the Puzzle") on more or less this subject.

This sort of problem says nothing about the candidate's abilities at structuring complex systems, abstracting in ways that make sense, thinking in CS structures like recursion, or the ability to take the lead on projects or to work collaboratively, all things that are much more crucial to success in programming.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 07:12 PM
I suspect this comes down to a difference of opinion on the 'trickiness' of this problem. It doesn't seem like an insight problem to me because I think you could pretty easily 'brute force' the problem by just handling each case independently (the 4,2,1,0 cases you enumerated before). If you realize you need to handle those 4 cases and code them up, cool I don't need to see a 4 line solution to be happy. I haven't thought about it a ton, but I suspect there are other 'insights' that would get you to a good solution.

I'm also a big believer in telling people to define any helper methods they like and I may or may not ask them to implement them. If you end up doing a less 'elegant' solution I think you can still use a couple of helper methods that would end up working quite well.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 07:26 PM
Quote:
Originally Posted by ChrisV
I think one issue with this kind of question is that it's what I would refer to as an "insight problem". The problem requires one central insight - that if you sort the x and y coordinates, the interior two pairs will always be points defining the intersecting rectangle. After that the code is absurdly trivial.

This has a couple problems:

- The ability to have this insight quickly is strongly correlated with experience in the problem domain, i.e. spatial or Cartesian problems. Which is fine if that's what you're hiring for.

- Most people feel instinctively that this sort of insight thinking will correlate with being a good programmer, unfortunately the evidence for this is thin on the ground. I've read an entire book ("How Would You Move Mount Fuji?: Microsoft's Cult of the Puzzle") on more or less this subject.

This sort of problem says nothing about the candidate's abilities at structuring complex systems, abstracting in ways that make sense, thinking in CS structures like recursion, or the ability to take the lead on projects or to work collaboratively, all things that are much more crucial to success in programming.
if someone solved this by breaking it down into the 3 cases you suggested, but didn't have the "insight," i would have no problem with that as long as the code was good.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-26-2014 , 08:37 PM
If you're OK with a less elegant solution, then that's fine.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-27-2014 , 08:37 AM
I feel like this forum should probably involve more sharing of ideas, but IDK what exactly.

Someone mentioned jQuery Datatables before. I have used that quite a bit in projects and found it good, but confusingly documented and missing functionality in weird spots. One thing that I found it strange that it can't do (correct me if I'm wrong?) is simply take ad-hoc JSON and build a table out of it without further instruction. I wrote a javascript function that achieves this and adds a bunch of extra options. When I get to work tomorrow I'll share it here in case anyone else uses Datatables. This thread is pretty low-traffic usually so I think it would be cool to use it to share code. If nothing else, it's an opportunity for people to tear apart my code and comment on its inadequacy :P
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-27-2014 , 09:42 AM
Part of my problem is that I like to keep some level of anonymity on 2+2 and so that means I avoid talking about specific details that I'm working on or posting things from GitHub.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-27-2014 , 12:51 PM
Quote:
Originally Posted by ChrisV
If you're OK with a less elegant solution, then that's fine.
If it matters, I wasn't aware of the sorting trick.

Quote:
Originally Posted by ChrisV
I feel like this forum should probably involve more sharing of ideas, but IDK what exactly.

Someone mentioned jQuery Datatables before. I have used that quite a bit in projects and found it good, but confusingly documented and missing functionality in weird spots. One thing that I found it strange that it can't do (correct me if I'm wrong?) is simply take ad-hoc JSON and build a table out of it without further instruction. I wrote a javascript function that achieves this and adds a bunch of extra options. When I get to work tomorrow I'll share it here in case anyone else uses Datatables. This thread is pretty low-traffic usually so I think it would be cool to use it to share code. If nothing else, it's an opportunity for people to tear apart my code and comment on its inadequacy :P
I've found this thread and sub-forum incredibly valuable. I have no idea where I'd be today if it wasn't for this place. It is up to you how open you would like to be. This isn't really a place where people come to share. This is place where you come and ask questions and (hopefully) start interesting conversations.

I would be interested in seeing what you did with these Datatables, though I won't be able to offer any insight.

****

Quick update on the current application. The DBA wrote me back and asked me to fix a stupid mistake I made on the test. I fixed it and the DBA sent me a mini-exercise. I won't go into detail here, but to say the least, this exercise has been eye-opening. Whether I get to the next step or not, doing this application has been a phenomenal learning experience.

I'm always kind of shocked at how many things I've missed in my learning. Some things seem so obvious and elementary in hindsight. I mean, its not like I never seen these things before, but I never connected the dots.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-27-2014 , 12:51 PM
Quote:
Originally Posted by Barrin6
I love programming, however I think my lack of depth in math is leaving me frustrated at times. Will I ever get better at solving these kind of problems? Or there books that I could get to improve? For example below, we had this for our practice programming exam which I could not get.

Are these the type of problems that you are either good at it or not?
No. I mean, there is an extremely high level of problem solving ability and once you go in that territory its hard to say what separates the best from the best. But those people have solved 1500+ of these types of problems, and much much harder. If you want to improve at these problems, you have to practice. The people who are world-class at these competitions are some of the best problem solvers in the world, and 99.9% of great programmers with great jobs are unlikely to even come close to them in ability.

If you cannot solve this rectangle problem, it does not have to with any lack of ability you have, or math. You are likely getting flustered because you have not done these problems before which is completely fine. Just keep practicing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-27-2014 , 01:32 PM
So as a Canadian that works for an American company - this might be my favourite day of the year to work. I'm the only person working and there's only a small amount of usage (aka support requests to deal with). Extremely productive.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-27-2014 , 02:05 PM
Quote:
Originally Posted by jjshabado
Extremely productive.
said while browsing 2p2 ;P
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-27-2014 , 02:38 PM
I feel ya. I'm actually looking forward to going into work tomorrow. The day is optional, which means almost no one will be there to interrupt me every 10 minutes.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-27-2014 , 03:03 PM
Quote:
Originally Posted by Alobar
said while browsing 2p2 ;P
Touché.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-28-2014 , 03:55 PM
So I impulse contacted a recruiter today and I'm pretty sure its the same thing as impulse going to a car dealership "just to look around".
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-29-2014 , 12:14 AM
Anyone ever have a problem with inaccessible virtual box?

I have all my .vdi files, backups, etc. I created a new machine from the orginal .vdi. The only information I get back is the root user and a default file system. I would like to get back the VM at the state it was this afternoon from the last time I shut it down.

I've went through a bunch of Q&As, but nothing seems to be working. I'm afraid I'm screwed.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-29-2014 , 12:23 AM
Quote:
Originally Posted by Grue
So I impulse contacted a recruiter today and I'm pretty sure its the same thing as impulse going to a car dealership "just to look around".
Was this the same recruiter you told on to your boss?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-29-2014 , 12:41 AM
^^ lol @ "told on", is this kindergarten? No, I will never work with those people again, because they're ****ing terrible at their jobs, they have the exact same jobs 30 other recruiting firms have, and they're *******s who tried to poach me from a job they placed me at 5 months previously. Twice actually, they tried again a couple weeks ago - thats how bad they are at this.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-29-2014 , 01:28 AM
Quote:
Originally Posted by daveT
Anyone ever have a problem with inaccessible virtual box?

I have all my .vdi files, backups, etc. I created a new machine from the orginal .vdi. The only information I get back is the root user and a default file system. I would like to get back the VM at the state it was this afternoon from the last time I shut it down.

I've went through a bunch of Q&As, but nothing seems to be working. I'm afraid I'm screwed.
Current verdict: I'm ****ed.

For some reason, the main .vdi disappeared, so I have a bunch of backup files with no way to get them as far as I can tell.

Think its time to bite the bullet and get a new computer w/ no OS.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m