Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #31342
| From | Doc O'Leary <droleary@2015usenet1.subsume.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: How would you prepare for javascripting interview? |
| Date | 2016-09-12 18:49 +0000 |
| Organization | Subsume Technologies, Inc. |
| Message-ID | <nr6tcg$lka$1@dont-email.me> (permalink) |
| References | (11 earlier) <nqo0jf$a4v$2@dont-email.me> <nqpr7i$l7t$1@dont-email.me> <nqvqac$64e$1@dont-email.me> <nr1k0b$d4t$1@dont-email.me> <nr2gg3$esh$2@dont-email.me> |
For your reference, records indicate that Scott Sauyet <scott@sauyet.com> wrote: > Doc O'Leary wrote: > > Scott Sauyet wrote: > > >> So if we're going to write functions to be used in a mathematical > >> context, we should write functions that are mathematically lucid. > > > > Except computers *aren’t* only used in a mathematical context. Even > > things in Math are called to do work with *meaning*, not demonstrate > > some abstract mathematical laws. > > These abstract mathematical laws you're talking about are what *define* > the meaning in mathematics. What would you think of a version of > `Sting.prototype.toUpperCase` which upper-cased all the characters, > except that it skipped every 37th one? I grow tired of these patently absurd straw man arguments. I’m talking about one very simple issue: whether or not a function like max() should return a valid value when it is called with 0 arguments. Your argument from a purely mathematics perspective has been given and answered. If you have nothing new to add, we’re done here. > In one school of programming, there are a million ways things can go > wrong, because all of your functions have weird edge cases that you have > to handle. Says the person who enjoy a trick question of a comparison behaving unexpectedly, and yet also argues that that is the correct behavior. > In another one, one writes functions that have consistent behavior, > where they take specific types of input and return a given type of > output. They avoid such things as null returns. To work in such an > environment, one needs to ensure that one's functions are clear and > consistent. In this world, it's considered competence to create > simple and elegant code. Which *still* would have max() being less than min(). Wow! So elegant. Much consistency. > The former seems to be the world you're describing. I worked in Java > for enough years that I remember that world. But as I moved into > functional languages, I also moved more into a world where that sort > of error-checking became unnecessary. For +Infinity values of “unnecessary”. > > This depends entirely on how you intend to handle a data set that has > > missing values. Just as it is possible to have max() return NaN for > > non-numeric input, it’s also possible to program it to *ignore* > > non-numeric input. I mean, really, what does your wonderful > > mathematical law say about any of that? > > Right, but the question was not about non-numeric input but about an > empty list of input, where you seemed to be claiming that any numeric > value is illegitimate, leaving only something such as `null`/`undefined` > or an exception. Or do you have a different solution? I’m not sure why you think you need a different solution. If you return an invalid result on an empty set, but invalid values are otherwise discarded, any set that *does* contain at least one numeric value would return that value as the maximum numeric value of that set. Seems simple enough. > I object to raising an exception, as I don't think it's exceptional that > a list might be empty. You’re not raising it on the empty list, you’re raising it on the *operation* on that list because there is no *meaningful* result. You’re welcome to set preconditions that avoid the exception, which is the *only* thing you’d be able to do if you didn’t want the current behavior of fabricated infinities polluting your data set. > > I mean, after all, it’s quite possible for a sensor to return not > > only an empty value, but wildly high and low values as well. I > > certainly know *I* have dealt with things like real-time GPS data > > that falsely indicated I was momentarily *thousands* of miles away > > from my actual position. Your desire for mathematical purity is out > > the window the instant you have to put error bars on your data. > > No, it's just part of the process: simply filter the data appropriately. > > This has nothing to do with the question, though. It does, in that a fabricated infinity needs to be handled as an error, but only if it *wasn’t* part of the valid input. Your mathematical purity doesn’t make for any less of a mess. > > No, that *doesn’t* cover the empty set. You can’t talk about something > > like relative smallness when there are no comparisons to be made! > > There have been several references already in this thread to the Wikipedia > article on Vacuous Truths [1]. *Please* try to read and understand it > before writing nonsense like this again! And I wish *you* would please understand that I’m looking to do useful work when I employ computer science. Again, it’s tiresome that you can’t seem to reach beyond your mathematics education. > You see, I disagre with your contention here. I think of `max` in the > same way I think of `sum`, `all`, etc., as a way to *combine* values, > and not as a way to *select* a value. Even by that logic, there are *no values to combine* in an empty set! To pick the identity element as the result is itself problematic, as your trick question highlights. The burden is on *you* to provide a consistent result, not me. Me, I’m fine dealing with exceptions or non-numeric results because I’m a computer scientist. > >> Sure, let's all sporadically returns some invalid results. We like to > >> keep our users on their toes, right? WTF? > > > > I’m arguing exactly the opposite, and I think you know that. Being > > intellectually dishonest is not the way to make your case. > > Perhaps you miswrote, or perhaps I'm misreading. But looking it over > again, you still seem to me to be saying that a competent developer > would not architect a library to always return valid results. Did you > mean something different? Do you see from the paragraph above why I > interpret it that way? A function should not return a result in a valid range if the operation should not yield such a result. It is *because* we want max() >= min() to hold true, along with all sorts of other following operations, that it is *wrong* for those functions to return values that are inconsistent with that thinking. It is *your* desire to return identities that will “keep our users on their toes”; *you* are arguing for the “sporadically invalid result” that results in the trick question you think is so nifty. > > The more you keep trying to make an appeal to authority, the more you > > undermine any authority you attempt to claim. > > Ok, some basic logical reasoning here. First of all, there is no appeal > to authority (_argumentum ab auctoritate_). Incorrect. You are trotting out your work credentials as if they alone should be reason to see that you are right. Don’t show us you’ve managed to fool your bosses into thinking you know what you’re doing, show us a sound argument that directly proves it. > All of these people have shown > themselves over the years to be competent and intellegent in > conversation. (That doesn't mean I like them all, BTW!) I have no clue > about you. I'm not calling them smart because they agree with me. > Thomas Lahn and I rarely ever agree. But I don't doubt his intelligence. Well it’s good to know you still doubt mine. > > You’re all wrong from a CS perspective, > > You see, I find you all wrong, also from a CS perspective. Do you happen > to work mostly in languages like Java or C#, by any chance? Perhaps > you've simply not had a chance to work in an environment/language that > affords you the opportunity to write really nice code without reams of > boilerplate error-checking. You’re accepting fabricated infinities as valid values in your data. If you’re not *heavily* doing error detection, you’re just not very good at your job. Please again tell us how many people you’ve mentored over the years . . . > > and it just makes me think any code you’ve written is a nightmare to > > actually use. > > If you have a little time, do look into Ramda, and tell me if it lives > down to these expectations of yours? Most of the complaints are that > it's too strict, not that it's too loose, so I'm curious as to how > you see it. I’m not inclined to do a free code audit at this time. And, heck, I might not even be able to make it past your clever interview process if you made a job of it. > > You’d do yourself and everyone > > else a big favor if you could just admit to architectural mistakes like > > this, and work to *fix* the problems rather than puffing your chest > > out in interviews by way of silly trick questions. > > What problem are you suggesting I fix? Do you want me to fix the > specification for `Math.max`/`Math.min`? Yes. Or, at the very least, begin actually talking about the behavior as being a genuine error rather than just an idle curiosity. There is no productive reason for bringing it up in an interview unless you’re looking to mitigate the problems that the current behavior causes. > And where in the world do you get the idea that I'm puffing out my > chest with this question? This is nothing like a "gotcha" question. > It is a guided (as much as necessary) through a somewhat surprising > result to see how the candidate thinks her way to an understanding > of the function. But to go no deeper than that *is* a signal that it’s all about the show rather than doing useful work. It’s a whole lot of juvenile “I know something you don’t know” rather than a professional “Here’s a problem we need to address”. > But I'll tell you what. If you can offer me a question or series of > questions that will give me the same sort of insight into the > candidates, I will replace this one from my routine. Remember > that what I want to know is *how* and *how well* she reasons about > such behavior, Again, I’m not inclined to do your job for you. As it stands, you do the rest of the world a favor when you hire the candidates that nobody else would want. > >> Are you going to even let them determine how to order their elements? > Or > >> do you think you know better than them about that too? > > > > Maybe I do. It depends on the system I’m architecting. For example, > > I have some concurrent code that implicitly orders operations to > > insure an object’s consistency. The last thing I want is someone > > thinking they can get the length of an array *before* all the objects > > have been added to it! > > I said "order", not "sort". And I didn’t say “sort”, so do try not to fabricate another straw man. > My question was rhetorical. I was poking at you. Of course you have > to let those defining a type determine how to order their elements, or > even decide if they can be ordered. Again, I disagree. It it *very* likely that out-of-order execution is the way to architect a modern system that has constraints which aren’t (necessarily) exposed to the end user. You think you’re being clever when you’re “poking” like that, but all you’re doing is exposing a real lack of experience when it comes to doing complex engineering. > >> -Infinity is a number. > > > > Exactly the point I’m making. It’s a number that didn’t exist in > > the input set, but it is being returned in the output set. As a > > result, it makes any operations that follow it which *do not* have > > -Infinity as the identity element *completely unreliable*. > > What part of "This is a function for `Math.max`" don't you understand? The part where you use the fabricated result in future computations without any error checking. I don’t understand that *at all*. > No, I'd really like you to try to answer the question. I already did. It’s a hack. They initialized the result to -Infinity because they were too lazy to handle an empty list more intelligently. It also happens to convenient match the identity element for that operation, which compounds the mistake. It’s essentially numerology, and you should be embarrassed for thinking it’s OK. So, do I get the job? :-) > > So stop with the pretense you’re looking for skilled developers. You > > really want people who agree with you, don’t think too much, keep > > their heads down, and just code what you tell them to code. No doubt > > that has allowed you to surround yourself by people who make you feel > > good about yourself, but you do both yourself and the company you > > work for a *huge* disservice by not willing to be challenged when > > you’re wrong. > > And you accuse me of straw men?!! When it applies, yes. Certainly, of course, I *can’t* really know your motivations for your poor hiring practices. You’re an unreliable witness to you own behavior, though. I do still encourage you to think about whether or not what you *claim* you’re screening for is actually what you *do* screen for, in a real scientific sense. > Where do you get this bullshit? I do not ask candidates to justify (or > to denigrate) the design of these functions. I just ask if they can try > to imagine why it works as it does. And I guide them as much as they > need so that they never walk away from this discussion without an > answer. Indeed, that is the problem. That is why I characterized your behavior the way I did. > > I argue it *is* relevant because the identity element is only > > meaningful on a per-function basis. Even if you stick to > > mathematical functions, it is wrong to treat it as a useful value > > in future calculations. > > Once again, you're full of _non sequiturs_. Why in the world would you > think otherwise? Would you expect the same identity value for `all` as > for `product` as for `max` as for `sum`? That's absurd! Indeed it is. Again, that is *my* argument you’re supporting. > But why does > the fact that they're different make them less useful? Sigh. For the last time, because they lead to the conditions that allow you to ask your silly trick questions. Because they introduce bugs in code. > Is your solution something your able and willing to share? Again, start with any of the *dozens* of other languages that already do the same thing. I’m not about to do any free work beyond that when you have made it *very* clear here that you’re unwilling to accept an answer for numbers that is anything other than: Math.max() == -Infinity; > > As I have said, understanding bad code is trivial. > > Can you say that again? > > With a straight face? > > Have you ever worked on a complex system that includes bad code? Was it > all trivial to understand? (If the answer to the second question was > "yes", please reread the first one again!) Yes and Yes. All I have to do to understand bad code is to turn off the parts of my brain that are thinking critically about it. If you don’t have those parts, and if your brain thinks a *different* wrong is right, only then would I expect you to find it hard to understand a particular bit of bad code. > > You’re not doing a very good job of filtering candidates if you > > simply are looking for them to determine *how* something got done > > badly. > > Did I ever say that this was *all* I looked for from candidates? > > Did I ever imply it? Yes. You said you’d have a problem with me if I couldn’t “get back down to Earth” (or some similar phrase) when you raised the issue. > Did I ever make the suggestion that this was anything more than four > to six minutes of a 60 - 90 minute interview? And, again, that’s exactly the problem. You think it’s a nothing issue, but you’re wrong. But you refuse to take the time to *be* wrong, so you compound your error. You interview like you code. > Did I not note that this was only used for candidates who's already > impressed me a bit, as a way to learn more about the better ones? Who you proceed to cut off at the knee before they even get a chance to dive deep. Here we’ve had what could still be a productive discussion about the tradeoff, but your own words describe how little that sort of candidate would interest you in an interview. > Have you ever performed interviews? Yes. All indications are I do a *much* worse job than you do in inflating my own ego when I do them. Maybe it’s because I’m looking to hire someone who is competent that I can delegate complex jobs to, and who is willing to tell me when I’m being foolish. I guess I’ve just had too much experience with jerk bosses to approach things the way you do. -- "Also . . . I can kill you with my brain." River Tam, Trash, Firefly
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How would you prepare for javascripting interview? justaguy <lichunshen84@gmail.com> - 2016-07-18 09:10 -0700
Re: How would you prepare for javascripting interview? Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2016-07-18 18:37 +0200
Re: How would you prepare for javascripting interview? justaguy <lichunshen84@gmail.com> - 2016-07-18 11:09 -0700
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-07-21 01:04 +0000
Re: How would you prepare for javascripting interview? John Harris <niam@jghnorth.org.uk.invalid> - 2016-07-21 14:24 +0100
Re: How would you prepare for javascripting interview? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-23 16:25 +0200
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-07-23 15:56 +0000
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-03 19:39 +0000
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-04 15:56 +0000
Re: How would you prepare for javascripting interview? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-09-05 00:06 +0100
Re: How would you prepare for javascripting interview? John Harris <niam@jghnorth.org.uk.invalid> - 2016-09-05 14:49 +0100
Re: How would you prepare for javascripting interview? $Bill <news@todbe.com> - 2016-09-05 10:01 -0700
Re: How would you prepare for javascripting interview? Gene Wirchenko <genew@telus.net> - 2016-09-06 09:36 -0700
Re: How would you prepare for javascripting interview? John Harris <niam@jghnorth.org.uk.invalid> - 2016-09-05 15:05 +0100
Re: How would you prepare for javascripting interview? Andreas Bergmaier <andber93@web.de> - 2016-09-05 20:31 +0200
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-06 15:15 +0000
Re: How would you prepare for javascripting interview? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-06 19:40 +0200
Re: How would you prepare for javascripting interview? John Harris <niam@jghnorth.org.uk.invalid> - 2016-09-06 19:25 +0100
Re: How would you prepare for javascripting interview? Andreas Bergmaier <andber93@web.de> - 2016-09-06 22:16 +0200
Re: How would you prepare for javascripting interview? John Harris <niam@jghnorth.org.uk.invalid> - 2016-09-07 17:17 +0100
Re: How would you prepare for javascripting interview? Andreas Bergmaier <andber93@web.de> - 2016-09-07 20:07 +0200
Re: How would you prepare for javascripting interview? John Harris <niam@jghnorth.org.uk.invalid> - 2016-09-08 14:36 +0100
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-05 18:46 +0000
Re: How would you prepare for javascripting interview? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-09-05 20:32 +0100
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-05 17:27 +0000
Re: How would you prepare for javascripting interview? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-09-05 20:12 +0100
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-06 16:48 +0000
Re: How would you prepare for javascripting interview? Andreas Bergmaier <andber93@web.de> - 2016-09-06 19:56 +0200
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-07 20:16 +0000
Re: How would you prepare for javascripting interview? Gene Wirchenko <genew@telus.net> - 2016-09-07 10:01 -0700
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-07 20:21 +0000
Re: How would you prepare for javascripting interview? Gene Wirchenko <genew@telus.net> - 2016-09-09 11:41 -0700
Re: How would you prepare for javascripting interview? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-09 15:35 -0700
Re: How would you prepare for javascripting interview? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-09 20:40 -0700
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-10 15:12 +0000
Re: How would you prepare for javascripting interview? Gene Wirchenko <genew@telus.net> - 2016-09-12 11:14 -0700
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-13 21:07 +0000
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-06 16:20 +0000
Re: How would you prepare for javascripting interview? Ken Tilton <kentilton@gmail.com> - 2016-09-05 11:37 -0700
Re: How would you prepare for javascripting interview? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-06 19:26 +0200
Re: How would you prepare for javascripting interview? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-09-08 12:41 -0700
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-05 20:37 +0000
Re: How would you prepare for javascripting interview? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-09-05 22:13 +0100
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-06 02:33 +0000
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-06 16:02 +0000
Re: How would you prepare for javascripting interview? Gene Wirchenko <genew@telus.net> - 2016-09-06 09:50 -0700
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-07 01:36 +0000
Re: How would you prepare for javascripting interview? Gene Wirchenko <genew@telus.net> - 2016-09-07 10:07 -0700
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-10 00:03 +0000
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-10 00:12 +0000
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-10 15:34 +0000
Re: How would you prepare for javascripting interview? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-09-11 01:32 +0100
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-12 19:26 +0000
Re: How would you prepare for javascripting interview? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-09-13 01:02 +0100
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-13 21:38 +0000
Re: How would you prepare for javascripting interview? "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-09-14 00:56 +0200
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-15 15:09 +0000
Re: How would you prepare for javascripting interview? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-09-14 00:47 +0100
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-15 15:34 +0000
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-11 02:45 +0000
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-12 19:10 +0000
Re: How would you prepare for javascripting interview? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-09-12 21:06 +0100
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-07 03:12 +0000
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-07 19:53 +0000
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-10 02:14 +0000
Re: How would you prepare for javascripting interview? John Harris <niam@jghnorth.org.uk.invalid> - 2016-09-10 11:25 +0100
Re: How would you prepare for javascripting interview? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-09-10 15:49 +0100
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-10 18:39 +0000
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-11 02:45 +0000
Re: How would you prepare for javascripting interview? John Harris <niam@jghnorth.org.uk.invalid> - 2016-09-11 16:23 +0100
Re: How would you prepare for javascripting interview? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-09-12 20:32 +0100
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-12 18:49 +0000
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-13 00:27 +0000
Re: How would you prepare for javascripting interview? Tim Streater <timstreater@greenbee.net> - 2016-09-13 08:51 +0100
Re: How would you prepare for javascripting interview? Jon Ribbens <jon+usenet@unequivocal.eu> - 2016-09-13 12:33 +0000
Re: How would you prepare for javascripting interview? Scott Sauyet <scott@sauyet.com> - 2016-09-14 01:17 +0000
Re: How would you prepare for javascripting interview? Tim Streater <timstreater@greenbee.net> - 2016-09-14 11:15 +0100
Re: How would you prepare for javascripting interview? Doc O'Leary <droleary@2015usenet1.subsume.com> - 2016-09-15 15:02 +0000
Re: How would you prepare for javascripting interview? John Harris <niam@jghnorth.org.uk.invalid> - 2016-09-13 10:06 +0100
Re: How would you prepare for javascripting interview? John Harris <niam@jghnorth.org.uk.invalid> - 2016-09-06 19:53 +0100
Re: How would you prepare for javascripting interview? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-07-18 22:30 +0200
Re: How would you prepare for javascripting interview? justaguy <lichunshen84@gmail.com> - 2016-07-18 14:56 -0700
Re: How would you prepare for javascripting interview? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2016-07-19 16:01 -0300
Re: How would you prepare for javascripting interview? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2016-07-19 16:16 -0300
csiph-web