Hacker News new | ask | show | jobs
by Chriky 3095 days ago
Is this for real? The solution he proposes is specific to Chess!

I mean, does this guy really think the company cares about efficiently representing chess game states??

Obviously, obviously, OBVIOUSLY, the Chess aspects of this question are irrelevant. What they are trying to find out if how well you will work on their actual codebase, which is presumably not comprised of global functions operating on bitfields

3 comments

> Is this for real? The solution he proposes is specific to Chess!

Yes, that is, it is precisely addressing the question asked, not some unstated drrff hidden intent.

If the tester wants to test ability to apply a particular paradigm, that paradigm should be part of the explicit question. If you want to use a chess representation as a vehicle for testing OOP skills, than specify that object orientation is a requirement in the question.

Otherwise, you should be judging the interviewee on how well they did on the challenge you actually posed. Otherwise, what you are really judging on is whether OOP is the tool the interviewee reaches for no matter whether it's really appropriate to the problem they are faced with.

> Is this for real? The solution he proposes is specific to Chess!

Some aspects of his solution aren't. He just took a holistic approach instead of the classic reductionistic/analogy-with-not-so-real-world one. Holistic approaches are applicable to much more than chess. Game engine for instance often benefit from Entity Component Systems, which are effectively in-memory domain specific databases, quite unlike OOP. More generally, the Data Oriented Design from Mike Acton is applicable in any setting where performance matters. Another example is functional programming, highly suited to data transformation and symbolic processing, such as found in compilers and interpreters (probably not he high-performance ones, though).

Competent entity systems are OOP, entity is synonymous with object (bring out some other object-like system, and a theasurus is usually used to find another word for object). You just don’t use classes, but there have been plenty of classless OOP systems since the Treaty of Orlando. Anything with a nounish tint will lean more OO than functional (of course, taxonomies are never perfect).

Objects have always been about modeling and design, a way to talk about a problem using language that is more similar in how you might talk about it naturally. Object-thinking is much more important than anything else. There are many different ways to spin this, but most game engines and simulation environments benefit from this in spades (and have ever since Simula 2).

I prefer the Treaty of Orlando, which is much more inclusive, and underlies our entire community.

http://web.media.mit.edu/~lieber/Publications/Treaty-of-Orla...

It is scary that the broad definition given in the 80s has been supplanted by a narrow “java or C++” definition today. If that what you mean by it, then no we aren’t talking about the same thing. I’ve built plenty of OO systems that don’t correspond to that definition at all, and at any rate, were still considered OO systems by the OO community (at least by the people who attend ECOOP and OOPSLA).

When I see "OOP" in a forum today, I assume it means the narrow "Java or C++". And I think that more than 90% of the time, I'm right. If you want to use a different, perhaps better, definition, the onus is on you to mention that you don't talk about the same thing as everyone else.
So in your view, Self isn’t OO? There is a rich diversity in the object community, there always has been.
The guy is openly arguing with an interviewer after taking a question too literally. I suspect my interview impressions would've included "candidate may be on the spectrum".

However, this entire thesis is founded on a false dilemma, because you can write an OO domain model with a compact representation.

why the onus is not on the interviewer? Why is he bringing up chess if he just wants OO answers? Aren't there better problems to pose more suited for testing OO knowledge? Bitboard is a standard way of writing chess engines. I think most would agree that a good programmer is one that seeks the best solution, not one that follows dogmatically his preconceived ideas.
Yeah. Based on the HN comments, I went into this article expecting it to be an uninformed tirade. I came away from the article thinking, "I'd hire that guy immediately."

The interviewers are definitely using the wrong problem if they're trying to test knowledge of OOP.

Because you can write an OO domain model using a bitboard representation. It's an opportunity to demonstrate advanced OO knowledge, which this Quora answer most definitely fails at.
I'm interested. Care to elaborate how this OO domain would look like?
A variant of the flyweight pattern using contextual identity. All board representation remains a bunch of uint64_t, all messages sent to boards result in bit manipulation (i.e. not massive duplication of objects), and you instantiate the piece objects once per game.

There's simply no need for "instantiate all the things" approach assumed in the Quora answer. That is OO at its most naive.

OOP is messaging, encapsulation, and late binding. What you do inside the capsule is up to you; and at a higher level, how the behaviour emerges from a composition of objects is also up to you.

I have the sinking feeling that your first paragraph is probably what the original author had in mind all along… He advocated for a representation of the entire board, and that's apparently what you would do as well.

I originally though you were advocating for a representation of each piece on the board, were "messages" were "sent" to individual pieces, not the entire board. I was curious about how you'd map that interface to a compact representation.

sorry for going off-topic but I couldn't shake out of the back of mind. you said "candidate may be on the spectrum", do you discriminate against people based on their medical conditions?
Candidate on the spectrum is less suitable for position that requires communication with customer or other people, that is under stress/pressure, that requires you to interpret ambiguous analysis, cooperate with other departments independently and such.
On the other hand he/she can provide a deeper insight into your work AND be able to communicate. People on the spectrum with a special interest in computers tend to speak like they program a computer: simple, succinctly, efficient.

Another plus side: a worker on the spectrum will most likely not be able to lie to you and will often be completely honest.

Does it really matter, if he/she can't look you in the eye or can't understand the social hierarchy and games played in the office?

No they do not speak efficiently and they do to listen efficiently. That is very core of their communication problems. And they are able to lie and they are easy to misinterpret the situation (e.g. their honesty is often not accurate representation of reality).

> Does it really matter, if he/she can't look you in the eye or can't understand the social hierarchy and games played in the office?

No it does not matter whether they look it the eye. Many of them can do that tho. Yes, it does matter that their communication toward junior or customer communicate disdain and lack of regards, to the point where juniors were afraid to speak or have ideas, despite them not really wanting to cause that. It does matter that they confuse own preferences with objectively better. Inability to imagine themselves in shoes of someone else leads to unwanted unfairness.

It does matter that others are suddenly required to put up with insults and have to send a lot of time learning how to communicate and solving problems for that person. All those being symptoms of autism.

Yes, if other collegues have high social skills a lot of that can be mitigated. But when it is not the case, the communication can become quite toxic.

I worked with people on spectrum and they were benefit to the team. But the framing in which they "don't play politics" and thus it is all sun and roses is not accurate. It is naive. You have to learn to predict problems and have to spend additional time to solve them. And you have to put them on position that is not freaking set up to fail.

People with autism suffer from consequences of all that and should be helped. So does often those around them.

I did not know about your experiences, it comes very strange to me that people on the spectrum can lie. But I can imagine that some people on the spectrum can.

Maybe there is a difference between Autism and Aspergers? Many people on the tech scene start programming at an early age and are obsessed with computers at some point in their lives. Thus many of us at least can relate to people with Aspergers.

Nevertheless, I still think an interviewer should note that the candidate is stubborn or pretentious, rather than just writing "on the spectrum". As you've there could be people on the milder side on the spectrum who could work really well.

> Candidate on the spectrum is less suitable for position that requires communication with customer or other people

A candidate with certain communication skills deficits is less suitable for those positions; while that may correlate to some degree with being on the spectrum, it neither necessarily implies nor is necessarily implies by being on the spectrum, and while an interviewer hopefully is qualified to assess that kind of a deficit, they probably aren't qualified to make an ASD diagnosis.

Further, while it's absolutely legal to discriminate on skills, doing so on actual or perceived medical condition is more legally troublesome. So, it's far better all around for the interviewer to confine themselves to observed facts and assessments that are both relevant and that they are qualified to make, rather than playing psychiatrist.

Actually the opposite. Best practice is to correct for them once you realise they may be affecting someone's interview performance. As represented, this interviewer failed to do so.
If you aren't argu^H^H^H^Hdiscusing with the interviewer, you're doing it wrong. If that results in unfavourable evaluation, that's good data for you whether you should take that job.