News for hackers. Stuff that matters.

jrsala

Re:How JavaScript works: 3 types of polymorphism on Sunday May 09, 2021 @09:30PM (#27101719)
I disagree with some of what you say, but I think your last point is correct.

>you yourself may be mistaken in your JS criticism

It should be easy to verify I'm not. `__proto__` is indeed bad practice [0] and I'm pretty sure criticism of `var` vs. `let` and `const` is a Google search away. Same idea for the other problems I listed, but the details are besides the point.

>There is a clear judgement on your part

I'm not sure what makes you think there is. It was important to first point out that this contribution to HN is a rather poor one on technical grounds. People might have taken away bad practices from the article. Then, I felt it would also be interesting to share my suspicion about the author's state of mind. This is after all what commentators of all kinds do, from movie critics to sportscasters.

>sharing your own [...] shows you speak from experience, and engages someone emotionally into feeling for you rather than just being defensive

This rings true and I could be a better communicator if I applied this advice. So here goes: this [1] is my most upvoted SO answer that I wrote years ago. The code I suggest is rather bad, as I'm sure any experienced C++ dev would agree, and I find the style pompous. It makes me cringe a little, but that answer also demonstrates an interest in technical topics and an eagerness to share, just like the author's article.

[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

[1] https://stackoverflow.com/questions/4788965/when-would-anyon...

Re:How JavaScript works: 3 types of polymorphism on Sunday May 09, 2021 @05:18PM (#27099860)
Pure functions, polymorphism, inheritance, composition, factory functions, classes... All of those are tools. They have benefits and drawbacks that are circumstantial (they depend on the language, the problem, the time pressure to ship, the skill level of the team, and many more other factors). Extremely successful codebases have been written using almost any combination of those tools. What those codebases have in common is that the people who wrote them understood their tools. So if I were you I would strive for understanding.

In that spirit, it's good that you question what experienced people tell you. What about asking your friend to explain why, at a fundamental level, their recommendation is good? "Always use classes and inheritance" as a hard-and-fast rule is not very helpful.

Re:How JavaScript works: 3 types of polymorphism on Sunday May 09, 2021 @05:11PM (#27099796)
There is no judgment in what I said. DK is a fact of life and we will all experience it at some point. I know I have, and quite badly.

I wish when I was younger someone had told me "look, you don't really know what you're talking about, here's how things really work". If no one tells you, how long does it take for you to realize and how much time do you waste thinking you know what you don't know? Again, the author is at the start of their learning journey. I'm not saying they're a bad person or a hopeless case.

And finally, people should not be apprehensive about sharing their work in general, but I think they should be when writing articles that purport to teach others.

Re:How JavaScript works: 3 types of polymorphism on Sunday May 09, 2021 @04:55PM (#27099644)
There is a lot of wrong in this article: inability to articulate what polymorphism is, misunderstanding of prototypes, bad JS practices (`var`, `.__proto__`), falsehoods on programming languages including JS itself, confusion around ECS, unfinished examples... I suspect the author is in the early stages of their learning journey and Dunning-Kruger is in full effect.
Re:Why A.I. Moonshots Miss on Tuesday May 04, 2021 @07:13PM (#27044019)
This is a nitpick but regarding "strong AI" and "weak AI", I take issue with the use of those expressions to refer to actual software systems, or to sub-domains of AI research. Those expressions in fact refer to two hypotheses pertaining to the philosophy of AI and not to any concrete AI research field. Even within the weak AI hypothesis, a system that perfectly replicates the appearance of human consciousness is not conscious. See [0]. Therefore the strong vs. weak dichotomy is unrelated to progress towards emulating human intelligence and behavior. It is concerned with the question of whether a certain fundamental barrier can be broken, not unlike the speed of light.

The meanings people ascribe to those terms nowadays are very diverse and distant from the original hypotheses. Sometimes language evolves usefully so that expression is easier and ideas can be conveyed more accurately, but I'm afraid when it comes to "strong" and "weak" AI, another, more damaging kind of semantic drift has taken place that has muddied and debased the original ideas.

Those terms are victims of the hype surrounding AI. I suspect this is part of why the field has trouble being taken seriously.

[0] https://ai.stackexchange.com/questions/74/what-is-the-differ...

Re:Show HN: Rysolv – Fix open source issues, get paid on Saturday January 23, 2021 @08:12AM (#25881947)
Hi, good-looking site, I hope this works out!

Adding to this [1] bug report, when I change pages using the numbered buttons at the bottom of the issues listing and then press the Back button of my browser it takes me back to HN. Navigating back should instead take me back to the previous-numbered page of the issues list.

For usability, please also consider not requiring people to scroll to the bottom of the listing to change pages.

[1] https://news.ycombinator.com/item?id=25881867

Re:Billionaires Build on Friday December 04, 2020 @11:24PM (#25311733)
This is a false dichotomy. GP did not suggest a planned economy as a solution, and more generally a planned economy is not the only alternative to wanton capitalism where government rather has more control over resources.
Re:Billionaires Build on Friday December 04, 2020 @11:02PM (#25311625)
But GP, despite using the word "cool", is not really talking about how "cool" in a light sense those occupations are perceived. They explicitly talk about how some activities today are "actively bad for the world" and perceived as such.

There is a moral judgment behind the "That's cool dude!" you get when you reveal you're working to fix the climate crisis and I suspect there is fear of moral judgment behind GP's omission of their employer, due to their employer's poor record on the moral issues of the day. This goes deeper than shit being less cool as time passes. In short we're not talking about dubstep or fidget spinners.

Moral judgments like this do not follow a curve that "always happens". It has always been good to volunteer at soup kitchens on one hand, and on the other hand while it used to be good to not be evil and "to organize the world's information and make it universally accessible and useful", I'm sure you'd agree nowadays Google is not perceived as less cool than it was only because it's not the latest shiny new tech success.

Re:Application trust is hard, but Apple does it well on Saturday November 14, 2020 @02:29PM (#25094896)
>I always advocate against opt-outs for security features like this [...] Because most users are not capable of evaluating the impact of opting out of a security process.

I agree fully with the author's characterizations of the dangers of disabling features or ignoring warnings, but I can't possibly agree with the conclusion that users should not be given a choice. So what if the user cannot understand the technical terms of a popup warning them about malware risk? How does that justify taking away their freedom to proceed anyway and run the program? The author's attitude is patronizing (and also intellectually dishonest as explained already by another commenter [1]).

There are lots of domains in life where we're out of our depth and make decisions anyway that might be dangerous, and we don't have anyone trying to hold or hand or to stop us altogether. Imagine you get into your Apple Car and plot a course on the GPS. The computer's voice says "there is a dangerous stretch of road on the plotted itinerary; please wait for your assigned Formula 1 driver to drive you to your destination". The car refuses to move no matter what you do. Half an hour later a small guy with a thick neck shows up, enters the car (because they've got the keys apparently) unlocks it so it can finally move and explains to you "oh yeah, a car fell down a cliff on that road back in 93". You complain about them not even apologizing for the delay. "You accepted the Terms and Conditions, didn't you?"

I get that the lack of freedom to run potentially malicious programs might be a feature, not a bug of Apple's systems. But I don't see them advertising it as what it is in practice. The notion of "false advertising" is well known and understood, but what about the notion of absence of advertising for a feature that might be unwanted to the point of making at least some potential buyers balk? Is there even a name for that?

Whether before the purchase of an Apple system or later at program startup time, the user should be able to make a decision as to whether to give Apple control of their computer in the fashion we've seen. All the necessary information and data should be provided to them. Whatever choice they make should be respected and they should not be judged for it, even if they did not understand the provided information. But the decision should not be made by some security nerd on a massive ego and power trip, imparting their enlightened guidance to "the lowest common denominator".

[1] https://news.ycombinator.com/item?id=25093906

I’m French and when I interviewed at a company abroad they had the usual US layout keyboards which made typing hard. I think the experience of everyone involved would have been smoother if I’d brought my own keyboard and changed the layout in the OS.

I’d say bring your own keyboard or laptop and be honest with the interviewer: you switched to Dvorak for comfort and productivity and you think you’ll perform better at the interview if they allow you to use that layout, possibly with your hardware. I don’t see how that could make you look like anything other than a conscientious professional. It’s about the attitude: will you attempt to create the best conditions for productivity and success and, failing that, can you make the best of what you are given?

I'm a non-native English speaker and I used to struggle as a teenager to read e.g. Harry Potter in English with a dictionary by my side. Literature is full of words you will never encounter in a casual or professional setting and that ESL learners won't know from having been schooled in English lit. So some way to quickly open en.wiktionary.org for a given word or some option have that in a tooltip on hover or when pressing a special key could be helpful, but I'm just guessing.

Very neat website, and very well made, congrats!

Re:The modern web makes me want to throw up (2016) on Tuesday June 30, 2020 @10:52AM (#23690627)
The author states what he feels is holding native apps back: they’re harder to build in a cross-platform way and they have to be installed. Then the author discusses the current state and the future of those two issues.

I feel that discussion was valuable for not merely pointing out issues but thinking of solutions as well.

I'm afraid France Télécom didn't just give their employees "nothing to do", they actively made their employees' work life hell and harassed them psychologically, resulting in 35 suicides.

https://fr.wikipedia.org/wiki/Affaire_France_Télécom (this article is written rather poorly but the referenced newspaper articles explain it quite well)

Re:Verlan: French slang that inverses words on Sunday February 02, 2020 @03:57PM (#22219368)
This phenomenon is called a "Jespersen's cycle" according to Wiktionary.

https://fr.wiktionary.org/wiki/cycle_de_Jespersen

Also according to Wiktionary, "guère" is unrelated to "guerre" (war) and "ne ... guère" is therefore not the product of a Jespersen's cycle.

https://fr.wiktionary.org/wiki/gu%C3%A8re

Re:Propositions Are Not Types (2018) on Saturday October 12, 2019 @06:23PM (#21236792)
I see where you're coming from. I sometimes get that feeling too. The way I approach this is by asking myself if the author could have expressed their ideas with simpler words or if some meaning would have been lost had they tried to simplify. Could I have reformulated anything without loss and without paraphrasing or resorting to examples?

It's like Dijkstra's famous quote: "The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise". Did the author need to invoke these abstract concepts and complicated wordings to be absolutely precise or did they throw around abstractions in over-engineered sentences to make themselves look intelligent?

Since I can't claim to understand the topic and the author's message fully, I can't be certain it's one or the other. All I have is a subjective feeling, but I think the author was trying to be precise and that each word had its genuine place at least in the author's point of view.

For example, when I read the last sentence of the introduction "following Hutto & Myin’s solution that real-world content depends on shared scaffolded practices that augment basic agents, we explore socially situated computing as an approach to naturalizing information content in computing", my internal bullshit alarm was ringing pretty loud, but it turns out each of the concepts gets expanded upon in the rest of the text.

I think overall this text was a challenging read but one benefit of it beyond the author's message is that I learned of the existence of this topic and line of thought in the first place, and it certainly piqued my curiosity.

Re:Propositions Are Not Types (2018) on Saturday October 12, 2019 @03:46PM (#21235716)
I think the author simply uses the vocabulary of his field, and he tries to communicate effectively with it. As a consequence, his language is terse and full of references to concepts that are foreign to a run-of-the-mill SWE like me ("naturalization", "symbol grounding", "intentional-referential behavior").

Effectiveness of communication is relative, of course, and what is appropriate for an audience may not be appropriate for another. A parallel with programming languages can be drawn here: mainstream language programmers often have a knee-jerk reaction to being told "look, in Haskell, this program that took you 80 lines in your favorite OOP language is just 4 lines of almost only special characters that look like I banged my head on the keyboard!" but it's just a matter of easing into a different language and different concepts.

Re:Propositions Are Not Types (2018) on Saturday October 12, 2019 @03:28PM (#21235604)
I think in the context of the author's field, an enlarged definition of the notion of "propositions" is adopted whereby a proposition is a useful statement about the real world, distinct from, but related to the mathematical definition of a formal object used for reasoning about some notion of truth.

The author's point in part 1 is that type systems are intrinsically incapable of formalizing propositions so as to achieve the holy grail of making software systems effective, safe, or whatever other property is sought after, in the real world. The author then goes on to explain this idea and to suggest a different approach.

As for the Curry-Howard isomorphism, the author does say it is perfectly valid from a mathematical point of view, but that is not the subject of the text.