Live data from Hacker News

I had to give a wrong answer to get the job (2017)

dewitters.com

71–80 of 409 posts

Re: I had to give a wrong answer to get the job (2017)

#71
MVC is such an overloaded term ... I don't think I've seen behavioral equivalence between any two implementations/frameworks in any language I've dealt with. As always, the devil is in the details. So going much further than "the model deals with data (either connected or unconnected), the controller usually deals with behavior, and the view usually deals with presentation" it's really hard to talk about MVC in general without some tighter constraints. For instance, are you models POJOs? Are they tied to the DB directly (i.e. something like ActiveRecord)? Do they process/send events (i.e. something like a model in Swing)? Etc ...

It get's complicated fast if you want to discuss more than very abstract generalities.

Re: I had to give a wrong answer to get the job (2017)

#72
post #63
post #45

In my experience, being "right" is no bar to getting the job. In one case where I was going for a C++ expert job, I got asked a question (that I can't remember now), gave the correct answer, which the interviewer disputed. I asked if they had a copy of TC++PL on hand, which they did, and I pointed out the relevant section. I got the job. In another case, I was asked something complicated about "const" in C++ (which h…

Your experience is not universal. I've been passed over for a job because I did not recite the right buzzwords (framework names, etc.). Your job in an interview is to please the person across the table from you. Some interviewers are looking for a sharp technical mind unafraid to challenge them. Others view any challenge to what they think is right as a threat.

> Some interviewers are looking for a sharp technical mind unafraid to challenge them.

And people like that are those you want to work with.

> Others view any challenge to what they think is right as a threat.

And those you don't.

Re: I had to give a wrong answer to get the job (2017)

#73
post #21

This isn't a great example to me. I doubt the interviewers would disagree that the actual code in MVC runs at the "application tier". I think they were just trying to elicit the idea that the model defines interaction with the database and that the view defines interaction with the browser client. That there is some relation there between MVC and 3-tier architecture. The Wikipedia snippet that disputes any relationsh…

MVC is older than 3 tier applications and saying "model=database" makes me cringe and squirm, but at least I know they do a lot of CRUDs :)

Re: I had to give a wrong answer to get the job (2017)

#74
post #55
post #44

Earlier quoted context omitted.

Disagree. The difference is fundamental and if you don't know it you are going to be stuck with a false understanding of the framework you're working with - and you will likely end up trying to shove bad abstractions into places where they don't belong, resulting in an unmaintainable mess of code. I have seen this happen in a lot of codebases where people fundamentally misunderstand the abstractions they're building…

I disagree with this. If you believe that one thing "3 tier" means is that the client doesn't interact directly with a database, as the old fat-client -> database model did, then "MVC" was one pattern to accomplish that. So, to me, there is some relationship. Enough of one to have a interview discussion about it. I do agree that they aren't the same thing, but they are pretty clearly related to me. The interview ques…

The model's state is not the same thing as the model and even though it's 99% the case, the model in MVC should not be an anemic model.

Re: I had to give a wrong answer to get the job (2017)

#75
post #45

In my experience, being "right" is no bar to getting the job. In one case where I was going for a C++ expert job, I got asked a question (that I can't remember now), gave the correct answer, which the interviewer disputed. I asked if they had a copy of TC++PL on hand, which they did, and I pointed out the relevant section. I got the job. In another case, I was asked something complicated about "const" in C++ (which h…

It get's tricky with ambiguous subjects. If there is a concrete correct answer then yes, give that stick to your guns. If there isn't and the issue comes down to opinion and interpretation ... things get dicy ...

Re: I had to give a wrong answer to get the job (2017)

#76
post #44
post #39

Earlier quoted context omitted.

Seconded. What they're calling the right answer is the pedantic answer.

Disagree. The difference is fundamental and if you don't know it you are going to be stuck with a false understanding of the framework you're working with - and you will likely end up trying to shove bad abstractions into places where they don't belong, resulting in an unmaintainable mess of code. I have seen this happen in a lot of codebases where people fundamentally misunderstand the abstractions they're building…

I find it to be pedantic as well. Sure, all of the code exists in the application layer. But that doesn't really tell you anything about it's relationship to the system as a whole does it?

How about we look at vectors of change? Or dependency relationships? You see, in many systems changes[0] to the UI affect changes to the View and changes[1] to the database affect changes to the Model.

[0][1] I don't mean to say the UI changes and then the View is updated to match. I mean that stakeholders will have decided that the UI needs to display different information, so the View is updated to accommodate such a change (which can then be passed to the UI). The same story above for the Model/Database relationship.

Re: I had to give a wrong answer to get the job (2017)

#77
post #9

Heh. Happens all the time with tests and questionnaires, the choice is always frustrating: * "Does the author really mean what they are asking? Are the mistakes in the phrasing or corner cases intentional, meant to catch me, test my deep knowledge?" , or * "Is the author just not very good with logic / not thinking this through?" I go with the latter in "soft social" contexts. Never regretted it yet. This saved my hi…

Same with some driving exam questions I have had. For example worded something like that, "does driving faster in some sections of the journey affect your planned time of arrival?" I don't remember if the wording was specifically like this, but it was something that to me logically obvious answer is "yes", but the correct answer and what they expect is "no", to show that you are a reasonable driver who won't speed un…

If I remember correctly, that question likely refers to some argument in the driving manual about speeding.

Something along the lines of "speeding in most urban areas doesn't actually help get someone to their destination faster. There are always multiple traffic lights and other cars to contend with, so it's not helpful to go over the speed limit and it increases the risk and severity of an accident." It's perfectly solid advice, who hasn't been passed aggressively by an ah-ole with tinted windows only to catch up to them at every traffic light?

The question obviously wants to screen for that tidbit of knowledge, but it's not phrased rigorously enough for the HN-crowd, I guess.

Re: I had to give a wrong answer to get the job (2017)

#78
Mvc isn’t an architecture at all. It’s just meant to be a tiny pattern for ui widgets from the 70s that people started to use as an architecture. The actual goal is to just keep a tiny piece of business logic from having a dependency on a specific input or on the view. It applied to a single button or a single input field back then.

Architecture is more about deciding what direction your dependencies go and where your hard boundaries go

https://youtu.be/o_TH-Y78tt4 (approx 27 mins in)

Re: I had to give a wrong answer to get the job (2017)

#79
post #15

Can't really comment on whether that was the correct way to handle the situation, given that passing the interview was the goal. However, I would have a hard time giving an incorrect answer on purpose. I also consider an interview as an opportunity to learn about the company I'm going to work for, and especially my future colleagues. I would probably try to give a full answer, such as "there's a widely-held concept X…

The more time I've spent in tech, the more I realize that there are very few "correct answers" - there are things that work in a particular context. Software patterns in particular are just what you make of them.

I would have no problem saying "many people use MVC to mean 3 tier and other people use it to mean XYZ".

It is very difficult to be completely technically correct. It is also rare that one needs to be completely technically correct in conversation.

Re: I had to give a wrong answer to get the job (2017)

#80
post #8

> So I decided to start by giving the correct answer, and see how he responded. I explained “The model-view-controller is a software pattern, and so resides inside the written code. Since in most cases, this code only runs on the application tier, …”. But then I saw him frowning, and so knew this was not the answer the was expecting. So I continued: This is a great cold reading technique that works in magic tricks to…

[deleted]
Post reply on HN