skysight-inc/HackerNews huggingface dataset:
The police are people I (we) pay to protect against criminals. When I have to fear police as much as criminals there's a problem, since I'm actually paying the police. Not to mention I'm harrased by law enforcement far more than I've ever been by civilians. Sure we might kill more of our own than the cops (after all we make up a bigger population than cops), but it goes beyond just killings, to how even non-lethal encounters unfold.
If that is the entire point, I'd rather they be illegal altogether, and we could avoid the debate by saying that we only license human drivers. I thought the entire point was to lower the costs of transportation and lower the number of cars on the road. The dangers of driving are not great enough to give up individual agency to that degree.
It really is. I can't imagine the havoc that an actually-trained strike team with some real equipment could cause.

I was reading Band of Brothers recently, and the description of how accurate and deadly their mortar-men were in a number of engagements was impressive. A light mortar is not the most high-tech weapon, is mass-produced by every army in the world, and does not take a huge amount of training to handle effectively. Not to mention that it can strike from up to a mile away, from a position without direct line-of-sight to the target; with an accomplice acting as an FO to send adjustments by text. Or skip the accomplice, and use a drone (Is the army doing this? Seems like a natural application). I don't want to imagine the indiscriminate horror that could be inflicted at any kind of open-air event.
That is a pretty reasonable way of looking at it. One of the things that made NetApp interesting when I was there was ONTap, a completely custom OS with one memory space and no user mode. When you thought about it made sense, all you need for a NAS box is a really feature rich ethernet driver :-). Anyway, what it meant was that NetApp would uncover problems in CPUs and Chipsets that nobody in the "PC" world would ever see. Race conditions on the frontside bus, PCI express traffic that would freeze up the chipset etc. It was also true of drive firmware. Drives have all these commands which look good in the manual except no PC ever calls them in production. As a result they don't get a lot of testing. We discovered that 'write zeros' which was a command for zeroing out a disk, on some firmware revs was "write mostly zeros, except when you don't." Never good when you're trying to initialize RAID stripes. As a result there was always a "Netapp version" of the drive firmware which had been qualified but customers always believed it was just a way of preventing them from using commodity drives[1].

Any time you step off the beaten path and try to use a complex technology in an "unusual" way, you are blazing a trail which may not have been traveled before. Always good to be on the lookout for undocumented bugs.

[1] It did have that effect but it wasn't the motivation.
Interesting. So it seems that enjoying baseball is a form of mild insanity that is distributed evenly across all races ;)
Some of these are atrocious... Do NOT let programmers design brand identities.
Talk is cheap, give an example in code.
They certainly can, and have.
I'd suggest people take a read at Steve Souders' books... Though somewhat dated, they're a bit better and more consistent than tfa. For the most part, write clean code... don't optimize until you need to, and have proper profiling/metrics.

As to the examples:

In object access, the output is never written to the innerHTML in the second example. Also, it's unlikely you'll have 10k updates in series.

There's three issues, object chain lookups, which may include prototype crawls in addition to reading/writing innerHTML, as well as string concatentation. 1) Object chain lookups do have some overhead, and with thousands of loops, can make a difference. 2) innerHTML get/set in a loop has the effect of a DOM refresh at each read/write. 3) with the offline version, there is a lot of string concatenation, which has been well optimized in recent JS engines, so not a worry.

With the Custom Objects example, it's abusing the constructor function with a static method attached to the constructor function... this isn't an example of a custom function at all, and I don't know where the author is getting their numbers from.

I'm thinking they did their example wrong.

const MyObject = function() {
return {
create: function() {
console.log('created');
}
};
}

May have been the intended comparison. Either way, if you're creating thousands of objects, you're better off with plain objects and using functional composition, as even object instantiation with the prototype chain has overhead for access.

As to limiting scoping, without ES6 in place (let/const), the only scoping is functions, and even then, you're best off scopign as needed, and letting the runtime advance. The runtime will get better hear, and clean code is better than absolute performance.
That's right. In the U.S., saying you think certain kinds of people should die is not illegal and is not considered a threat, legally. Nor is saying you hate certain people.
How does that differ from today? Don't all rendering engines have to deal with that GC now?
Link to abstract: http://www.sciencedirect.com/science/article/pii/S0092656616...

I was intrigued by the following paragraphs from the article:

> In three separate studies, Tullett and colleagues offered participants in both the Deep South and West Coast a chance to view data on three topics: the justness of the world, the efficacy of social safety nets and the benefits of social media.

and

> Tullett said she picked political issues that were relatively broad because people’s views on specific topics – like gay marriage or abortion – might be more idiosyncratic.

(note that I haven't been able to look at the data)

The researcher says she has picked political issues that are relatively broad. But I actually do wonder if the subjects chosen are neutral enough. My intuition said these issues are the issues a college educated person with a cosmopolitan worldview would pick (saying that as someone with that worldview). I think that the different values and priorities between conservatives and republicans, and the different demographical makeups, might skew the results. So a lot would depend on how different demographical factors were controlled for.

Yourmorals.org has a load of research on different values between liberals and conservatives [1]. Liberals seem to value fairness/reciprocity more, and in-group/loyalty less [2]. Liberals are more likely to think a lack of equality is wrong [1]. I'd think these differences might cause a difference in the interest that respondents have in "the justness of the world" and "the efficacy of social safety nets". It's not that they won't be interested, but I can imagine the political priorities are different. Social Media benefits seems to me something that interests younger people more, but I'd hope those kinds of things were controlled for.

[1] See http://www.polipsych.com/2010/10/27/differences-between-whit... for a portion of the yourmorals.org research.
[2] See http://www.ethicsdefined.org/the-problem-with-morality/conse... for a graph on some different values, taken from yourmorals.org
Do you have a specific example of this situation occurring as you've described it? If so, was there an ethical dilemma when a human was in control? If not, don't worry about it.
As a white man, I definitely think that the problems of gender in tech are still huge and I'd like to help address them. But I also feel like I can't help, because people, both black and white, are so tense about race. As a white man, literally even talking about race is risking being called a racist. And god forbid I have an actual opinion that might disagree with a person of color--even though people of color don't even agree on everything.

For example, I think that the reason people mistake the author of this piece for other black men is that white people have spent most of their lives around other white people, so they become accustomed to the kinds of differences in facial features that white people have. We have less practice differentiating between the facial features of black people, so naturally we're going to be worse at it. It's not malicious or racist.

And in my lifetime, I've had a few people just outright say to me that all white people look the same to them. Which isn't offensive--it's because they grew up around people who looked like them, and have less practice differentiating between white people.

But tensions are so high, that this innocuous common mistake is seen as discrimination merely because it's related to race, not because of any malice or even intent behind it. And I'm quite sure that many people would call me racist for even having the opinion that mistaking people of color for other people of color isn't racist. Even though it could actually be helpful to people of color. If people of color see that white people don't have trouble recognizing you because they dislike you, but because you literally look different from people who they have practice recognizing, that might encourage confidence.

And to be clear, I'm not complaining. It doesn't hurt me at all to keep my mouth shut, and not say anything on the topic of race. The only people who are hurt by my not helping are people of color. Which sucks, but is the result of how tense people (both black and white) are about race.

In short, everyone (of all colors) should chill out and focus more on the problems that are clearly problems, not just assuming anything any white person says or does that is race related is racist. That just alienates allies and makes people of color feel hurt.

EDIT: I do want to point out that while I don't think mistaking one person of color for another is racist, I do think that many of the behaviors the writer of this piece pointed out are racist. I don't want to say that what the author wrote is all incorrect or invalidate his opinion.

EDIT 2: A flurry of downvotes without responses prove my point--people can't point out logically why they think I'm racist, but they downvote to express that they think I am. :)
To Help Guide Artillery Rounds, Russia Deploys the Drones (2015)
Whaaaat? Maybe you're not that into video games. Valve helped define a generation of gaming. You can't tell the history of video games without devoting some time to them.

Box is a great company but I don't think it's as impactful.
Thanks for clarifying. I can see exactly what you're talking about when I hear people talk about how Malcolm X needed to die because he wanted to kill all whites as if he wasn't excommunicated for preaching peace and unity after his pilgrimage.
one persons 'lack of expressive power' is another persons 'this code is easy to read'.

i've moved from python -> go for server backends & some personal command-line tools, and couldn't be happier.

i still use python for interactively for figuring stuff out, but for anything big enough to be saved to a file, i'll reach for go.

ymmv!
Under what law would it be illegal? It's not just medical equipment - it's tractors and iPhones, too.
Webassmebly is just as debuggable as minified JS. So what are you on about?
I don't like a lot of logic in the the database, but you can do continuous integration with tools like flyway:

https://flywaydb.org/

In fact, it's pretty hard to do CI without tools like this, even with zero stored procs.
So first, you produce an example that literally has nothing to do with repair. Then your point about the gun is even more absurd. Depriving somebody else of their right to life has absolutely nothing to do with what we're talking about here. Sorry, you will have to excuse me as I have better things to do and do not wish to engage you further.
This is not REST API per se, but it's something that we've used in production for a couple years now and it's working like a charm

https://github.com/robertzk/microserver
https://github.com/kirillseva/rain

This way our rails app can communicate with R prediction backend and we end up using the right tool for each task
Look into the source for bootstrap 3 or 4... They only define a handful of colors. In the end, pick your main branding color, and work out from there.

Even if you don't use bootstrap, it's a good baseline to look at, and imho every web developer/designer should definitely dig through the source of that codebase.
No, to Alexander I of Macedon.

Alexander II was Alexander (III) the Great's uncle.
It seems odd that you left out the start of that sentence:

"All four of these studies, which used diverse, independent populations and tests (or correlates) of cognitive abilities, have reported significant, substantial genetically-based positive associations of autism risk with intelligence, notably including full-scale IQ..."

I think the part of the sentence where they used "diverse, independent populations" and obviously tried to control for effects like income levels in childhood undermines your criticism. More to the point, the studies mentioned were about measuring the IQ of individuals with known alleles for autism. You can attempt to argue that childhood income may have a stronger affect on IQ than autism does, but the studies themselves showed there was some positive effect of Autism on IQ.
Javascript is awful. If WebAssembly is anywhere near consistent across browsers, and there are better languages that compile to WebAssembly, I would go that way in a New York minute.
This lines up exactly what I've heard from Southern friends.

Like you said, I've heard that despite the reputation and history of the South, there is a lot more racial integration in day to day life than most parts of America.

And yes, it irks me to no end to hear whites from big coastal cities (who rarely ever interact with blacks) shit all over the South (most of them who have never been there).
Yep. This. I don't write Python, don't know the ecosystem, so when something doesn't work out of the box I'm screwed. Go on the otherhand I grab a statically linked binary and I'm set.
As a biologist, I'm not surprised. I'm sure there was something quite meaningful happening but most biologists lack the fortitude to venture into unknown areas or new disciplines. Its a highly risk-averse crowd.
I think that's always been my problem with Go, it feels like it makes a set of trade-offs that really benefit nobody. It isn't low level enough to really unseat C (Rust stands a much better chance there), but it isn't high level enough to replace something like Haskell, Java, C#, or Python. Its type system doesn't seem too terrible until you run into the strange hole left by lacking generics, which considering that basically EVERYONE these days supports generics or a similar mechanism is a very strange stance to take.

TL;DR: Go is a language designed for nobody, no matter what niche you try to fit it into it's missing some feature that's desirable in that space.
Python REPL:

>>> 0.3 - 0.1
0.19999999999999998

Ruby REPL:

0.3 - 0.1
=> 0.19999999999999998
expressive power can make things easier to read.

python reads like pseudo code and is arguably the most readable language out there.

C has more expressive power than assembly and is also more readable.
As you say, all rights are social constructs. Therefore you don't "prove" a right exists, as you demanded, you make a right exist by discussing it and lobbying for it. That's what happening here. I say that the market is not correct because it leads to bad outcomes. You seem to be saying that the outcome isn't bad because the market doesn't lead to it. I'm making an assertion that I believe the right to repair is a positive (for many reasons.) You seem to be making an assertion that markets are always right. I just have to convince - because I'm making a statement about what I think we should prefer in society. You have to prove, because you're making a claim of objective fact.
I've seen it happen firsthand a couple of times. In both cases it was done after the cyclists stayed two abreast instead of singling up to let traffic pass.
Yeah, I don't think I worded this in the best way. I am not trying to advocate for people making significant decisions about others based on race, or really any decisions at all. But he criticized the reommendation of a color blind world and then, in my opinion, advocated for one. I was trying to show that by removing the assumptive part of race (as I think you mostly should) you can only react to people based on their actions and how they say they want to be treated. I believe this is a color blind society. No presumptions, but people can still address their race.

I don't personally believe in a purely color blind society, though. I mean, in the article he talks about how it makes him feel when people are surprised by the fact he works in a technical field, which is fine, his feelings are valid. I just don't see anything strange, rude or racist about a person being surprised about a black person doing CS, we are a very small portion of the degrees given in CS, in particular, degrees from prestigious universities (At Stanford about 6%, compared to Asians at 36% and Whites at 38%). And we are a much larger percentage of, say, football players or basketball players. I am not saying you should go an buy your black neighbor Air Jordans so he adds you to his posse when he goes pro, but I do think acting like some one who asks a 6 foot 2 inch tall, 240 pound black guy if he plays football is racist is counterproductive.
It seems to me that Go has very useful runtime features (speed, concurrency & parallelism, easy deployment) but the language has significant drawbacks, including those listed in this article.

The Python runtime is relatively poor (slow and limited by the GIL) but the language is extremely popular [1].

Is there any other language which is a "best of both"?

[1] https://news.ycombinator.com/item?id=3746692
Do-notation is sequenced evaluation, where the result of each statement is passed as the argument to the next (a simplification, but good enough). In this case there are two sequential operations and if either of them fails then it automatically propagates and results in the whole sequence returning a value that indicates failure. In Python, an (approximate) analog would be like this:

from math import sqrt

def f(a):
if (a >= 0):
return (True, sqrt(a))
else:
return (False, None)

def do(a):
(ok, y) = f(a)

if ok:
(ok2, y2) = f(y)

if ok2:
return (True, y2)
else:
return (False, None)

else:
return (False, None)

# example
for x in [2, -2]:
(ok, y) = do(x)

if ok:
print("Result: {}".format(y))
else:
print("Calculation failed.")

# Output
>>> Result: 1.189207115002721
>>> Calculation failed.

This sort of thing is super awkward in Python, but is a common/natural pattern in Haskell (note: I realize this is not how you'd do this in Python, but I'm trying to make it equivalent to the Haskell). This does the exact same thing as the Python program above and is a more complete version of what the OP posted:

import Control.Monad (mapM_)

{-
Maybe Double represents a computation that either
returns a Double or fails. In this case, fail
when passed a negative number. Note: this is not
the same as throwing an exception.
-}

f :: Double -> Maybe Double
f x
| x >= 0 = Just (sqrt x)
| otherwise = Nothing

-- Fleshed out version of OP's snippet
eval :: Double -> Maybe Double
eval x = do
y <- f x
f y

{-
do notation desugars to monadic binding; in this
case eval can be desugared to the equivalent definition:
eval x = f x >>= f
-}

-- Here's why this is convenient, because you can pattern match
printIf :: Show a => Maybe a -> IO ()
printIf (Just x) = putStrLn $ "Result: " ++ show x
printIf Nothing = putStrLn "Calculation failed."

-- This is basically the equivalent of the Python for loop
main :: IO ()
main = mapM_ (printIf . eval) [2, -2]

I know Haskell syntax is strange looking if you're unfamiliar with it, but it's mostly geared towards making certain patterns (like this one) convenient.
A few things leap out

- WhatsApp's TLS is insecure but twitters is ok? I assumed everyone would use the same stack.

- hang on - whatsapp now uses silent protocol right? Isn't it now really secure and a billion people have it?

But apart from that, I am honestly burying my head over this stuff.

I have a job and family and tv to watch and now I have to "Understand a complex moving environment and make sure I am secure whilst still providing my family with access to Facebook and hang on that printer wants to send photos to where!. I give up"

I think a set of good baseline practises would be good to start with. Begin by flashing your commercial
Router with openWRT or building a router with RPi and then moving onwards. How can we live a connected life without polluting - it's a hard problem and one I realise I need help with. Speak up though, I have sand in my ears
I wouldn't necessarily call them an anti-pattern, but they are at the very least not encouraged:

> Although string refs are not deprecated, they are considered legacy, and will likely be deprecated at some point in the future. Callback refs are preferred.[1]

I'm still using them in React Native, because I'm new and didn't realise there was an alternative until recently. To me there are three issues:

1. Magic. All you do is specify a string and somehow you end up with this.refs.<name>. Admittedly not that hard to follow, but magic is generally bad.

2. It's hard to keep track of what refs actually exist, which makes naming collisions hard to notice. There's just some arbitrary string in some JSX. Using explicit properties means they can be tracked much more easily e.g. Flow.

3. Again related to Flow, if you're declaring your properties as you should be, then Flow will tell you if swapping a referenced component type (checkbox for switch etc.) is going to cause problems elsewhere in code.

EDIT: I suppose you could already be declaring your refs with Flow. However, if you're doing that you're already 90% the way to using dedicated properties. In which case you might as well eliminate the magic and just use your own properties, rather than properties on refs. This makes searching for usage/references much more obvious; people/IDEs generally don't think of strings being a reference to a variable.

[1] https://facebook.github.io/react/docs/more-about-refs.html
Agreed, Rust's way of error handling with Result and try! (or ?) is far superior.
Be the Change – Women in Tech
How to communicate when the world goes silent
These quotes really show the paradox: within the weird definition used in the article of "amazing engineers" which is not defined but seems to imply those who can talk a big game about architecture or score well on the HackerRank, the "quality" of the engineer has no relation to business success. That's because the engineer's quality is being assessed for being able to bullshit about architecture or score points for writing "clean code."

The idea that "even great engineers" might take on technical debt is insane. In a startup situation, great engineers take on technical debt with the greatest of glee and at every opportunity, as the primary goal is to find product market fit. Bullshitting about scalability, maintainability and frameworks is counterproductive and maturely, one understands that any software will be almost totally rewritten whatever happens: take this example by John Carmack to start a prototype environment for rapid iteration, explicitly laying out ways in which it should be rewritten if successful https://groups.google.com/forum/#!msg/racket-users/RFlh0o6l3...

Many good engineers stay in their comfort zone of some part of the software lifecycle. Seems like the author was trying to assess people imagining their situation was that of big company software project going in for a third generation rewrite with little uncertainty about what it should do. This is not the situation startups are generally in, and great engineers in this situation adapt; they pivot without getting stuck on old conceits, and have a knack of understanding which signals to heed to get to that glorious market fit where suddenly reliability is valuable. Definitely they can be assessed on ability.