Live data from Hacker News

Nerdsniping: A glimpse into a stubborn mind

blog.andyet.com

71–80 of 94 posts

Re: Nerdsniping: A glimpse into a stubborn mind

#71
post #68
post #57

Earlier quoted context omitted.

No, person C saw an interesting question, and decided to go on an exploratory journey to see what's possible. In any job requiring mental aptitude, you'll find natural curiosity an asset, as long as you keep it within bounds. To be clear, anyone that's presented a question about a tool they are using that may pertain to it's use (be it efficiency or correctness) that shows zero interest in the answer (whether or not…

I'm not sure your second paragraph is clear, to me, at least. Person C admitted that their only contribution to the conversation was to announce that they had been nerd-sniped. Which means that they showed zero interest in the "question they were presented with", because they were sidetracked by another, more interesting (to them) problem. Meanwhile, person A's question went unanswered. I would consider this a case o…

It's not made clear from my post, because I felt it was entirely irrelevant to the context of the post itself (which was merely intended as an interesting meander through the thought process and experiments my mind went through over time) but I stripped a number of comments from the screencap wherein the question was in fact answered.

Had I suspected the quality of my team, or my discipline would be under question, I would have left them in :)

Re: Nerdsniping: A glimpse into a stubborn mind

#72

I was working with this guy - he always tried to prove that everything is possible wasting time. He ALWAYS over-complicated simple things. He was horrible to work with and everyone hated him. Not to say you are just like him etc. but this post reminded me of him because it was probably exactly what he would do.

I think it's worth pointing out the article writer recognizes this is a distraction. In the comic, nerd sniping causes people to forget they're crossing the street and they wind up being hit by a car, which is a pretty serious distraction from the task at hand.

Re: Nerdsniping: A glimpse into a stubborn mind

#73
post #7
post #5

The differences between programming syntax and elementary/Boolean algebra are very awkward to understand clearly and deal with correctly. We clearly understand mathematical algebra to work one way, and we naturally assume programming algebra works the same way, which it doesn't at all. Here, the antagonist says that b can't be 1 and 2 at the same time, which would be self-evident in mathematical algebra, but turns ou…

>This difference in how syntax is understood actually presents a barrier to programming for modestly trained mathematicians, who would otherwise be expected to excel. Although this is true in general that syntax can be a barrier to entry, the article provides a particularly poor example. If anything, the article demonstrates how mathematical training is good preparation for many pitfalls of programming. Mathematician…

> Mathematicians are used to working with various equivalence relations, even in the same context. So if a modestly trained mathematician saw == and ===, she would immediately ask "what is the difference between these two ER's?".

This perhaps illustrates my point. While you say == and === are equivalence relations (I would argue they are not), there is a wider problem.

= itself is an assignment operator and should never be considered as an equivalence relation. But it is normal to consider = as algebraic equality for anyone who has completed high school math.

It's a great loss to intuitive understanding that we use = for assignment. If anything, considering Javascript's == and === is a net benefit as programmers are more acutely aware of the issue here.

What percentage of time spent learning to program and recovering bugs is caused by overcoming this misintuition? It's surely a lot.

Wikipedia has further discussion: https://en.wikipedia.org/wiki/Assignment_%28computer_program...

Re: Nerdsniping: A glimpse into a stubborn mind

#74
post #44

I think there was a more general question here that was missed: can a == x && a == y ever be true for any arbitrary values of a, x, and y, where x != y. From a logical point of view, no, this can never be true. I would suspect this can never be true in javascript, and could only be made true in a language where you can override == to always return true. I think when most developers use the word "never", what they rea…

Something like this could work, to some degree:

        a = {}
        a.valueOf = function() {
           var caller = arguments.callee.caller.toString();
           //parse the caller function, and return 
           //different values based on what comparison is being made. 
        }
But I think this is even worse than the getter on the global object.

Re: Nerdsniping: A glimpse into a stubborn mind

#75

And this is why Javascript can be such an awful language. Leaving off a single equals has such a profound effect, often without a new coder even realizing it while reading the code. Imagine what happens to your code when someone tries to write a function for its side effects similar to the example seen in the blog post. Then releases it in production for it to break in six months with a feature change.

Yeah, just use python! class B(object): def __eq__(self, other): return True b=B() It's much more expressive

Okay.

Re: Nerdsniping: A glimpse into a stubborn mind

#77
post #57
post #35

Earlier quoted context omitted.

Is it really fair to call poor code an edge case? If not for the double-equals typo, which most code reviews would fix, this wouldn't work. I'm more interested that this team has conversations where person A asks a really simple question that should be able to be tested in 11 seconds, person B gives a patently false answer that mistakes && for ||, which is the very thing person A is asking about. Meanwhile person C g…

No, person C saw an interesting question, and decided to go on an exploratory journey to see what's possible. In any job requiring mental aptitude, you'll find natural curiosity an asset, as long as you keep it within bounds. To be clear, anyone that's presented a question about a tool they are using that may pertain to it's use (be it efficiency or correctness) that shows zero interest in the answer (whether or not…

how is the operation of "==" an interesting question to anyone but a novice javascript developer? I think this post is going to give me an aneurism.

Re: Nerdsniping: A glimpse into a stubborn mind

#78
post #77
post #57

Earlier quoted context omitted.

No, person C saw an interesting question, and decided to go on an exploratory journey to see what's possible. In any job requiring mental aptitude, you'll find natural curiosity an asset, as long as you keep it within bounds. To be clear, anyone that's presented a question about a tool they are using that may pertain to it's use (be it efficiency or correctness) that shows zero interest in the answer (whether or not…

how is the operation of "==" an interesting question to anyone but a novice javascript developer? I think this post is going to give me an aneurism.

It's interesting because it looks at the implementation of '==' vs '===' and how this behavior can be modified at runtime. Every good "hacker" should find this interesting on some level.
Post reply on HN