skysight-inc/HackerNews huggingface dataset:
Your very first method has a return buried in the middle of your code. That is a gigantic red flag.

Look, what you're trying to do is simple.

getNumbers.fold(println("Failed to load numbers"))(nums => nums.foreach(println))

That's the Scala version, but I'm sure there's a Java version of the same code. This code assumes that getNumbers returns Option[List[Int]], which your compiler can guarantee. If you want something that's a little bit more readable, try this:

getNumbers match {
case Some(nums) => nums.foreach(println)
case None => println("Failed to load numbers")
}

No null check, no loops, just very simple easy-to-read bulletproof code. This code cannot generate a NPE at all, ever.
I keep telling people I do my best work in the shower, and they always think I'm pulling a lewd joke. I'm fully serious though, most of my good ideas have come to me in the shower, weird as it may sound. I'm glad to read I'm not alone in this!
Here you are. The slides aren't as good as the tall (as you'd expect) but still may be helpful.

Other core technologies (in my opinion): cookies, http, TCP/IP, caching.
I'm not sure why that's happening either. Is the point that startups just lose lawsuits against patent trolls not matter how hard they try?

That's probably true, but also sad.
As someone who had never heard the "self-documenting code" term, I imagined a machine-learning-assisted 'autocomplete' of sorts for code comments or a genius.com for code.
I remember showing my father the www, probably 20 years ago, and he was incredulous that certain .coms would exist for any reason. "You're telling me I could type 'shoes.com' and there would be a page about shoes? No way." I don't remember shoes actually being on the page anywhere, prompting the response "see? I told you it wouldn't work."

From the article: "Its approximately 200 employees were made aware of the decision early on January 27, and the company said that it will compensate the employees through to the end of the month." Gosh, how generous of them. A whole 5/7th week severance. I wonder if they were in talks with Walmart for a buyout but they acquired shoebuy instead in early January. Either way shoes.com should have shut the doors earlier and given employees more notice.
In a rational world. But we don't live in such a world. After the Cold War, its ties with bombs and nuclear proliferation, Chernobyl, Fukushima,Chelyabinsk-65 incident in the late 50s, dirty bombs scare after 9/11 people are suspicious of nuclear. They would prefer something more dangerous but predictable like coal instead.
Biologist Proves Measles Isn’t a Virus, Wins Supreme Court Case Against Doctor
GCP's technology is way beyond everyone else's, but they lack a good story.

I keep recommending GCP to people, and they wrinkle their noses skeptically. Part of it is Google's reputation for bad support and for killing products; I have to tell them that while that rep is definitely extremely well deserved, GCP operates completely differently. Another part of it is not knowing what GCP is -- it's flying surprisingly low under many people's radar. Some people think it's just App Engine, which I get the impression that a lot of people got burnt by in the early days (apparently it's great now; never used it).

I think Google has a chance, but they need to work on their marketing. I don't know how they would fix the reputation problem, though, other than bide their time and hope that time heals all wounds.
10 Critical Tips to Stay Safe Online
Micron?
I believe the references to World War II are due to the history of the phrase "America First", which goes back at least to the "America First Committee" which was pro-isolationist and against the US entering the war in Europe during WWII.

- https://en.wikipedia.org/wiki/America_First_Committee

- https://www.theatlantic.com/politics/archive/2017/01/trump-a...
+1. I've seen a mix of both... though, if you fill very confident about your skills, just ask for it. It will put the pressure on them even if the culture is about waiting for someone to name you king. They know you can get it somewhere else so it'll move the needle.
(February 2016... which precedes the new version and its clickbait-laden "Feed" forced home page)
I'm 100% opposite, I refuse and won't use paypal unless there is no alternative. I'll pay a few bucks more from another merchant as long as I don't have to use paypal. Once you have been burned trying to use them from a dev perspective, never again.

Just search "paypal screw over startup" and grab some popcorn.
This is a terrible idea in the short term. I want programs I run to be me. With the same access and permissions as I have. And to transfer that access between them.

Long run, I'm interested. Hope it heads some where.
>>Chrome never tried to cater to users like you

That is right, and that is the point. If you do not understand why or how that makes a difference I likely will be unable to explain it to you.

I may not go to chrome, Vivaldi, the new Opera, Some Fork of the good firefox, we are still a little ways away from the the day Mozilla commits Suicide so....

Also I do want to add, my problem is not them removing XUL, my problem is them removing FUNCTIONALITY, if they come up with something else that REPLACES feature for feature XUL fine, if they take everything people are losing and build it in as not an extension that would be fine to, if they Add a option in the Configuration for TreeStyle Tabs with out an extension that would be grand

I am not beholden to extensions, I am beholden to the FUNCTIONALITY.
There are 250 million neurons in the corpus callosum, each with a diameter on the order of microns. Individually, each one transmits a very primitive signal (think biological bit) that doesn't mean much without the other millions of neurons. It's extremely complex and thus extremely frail. If the cut halves on both sides don't line up exactly, you have the equivalent of static. You wouldn't mash two cut ends of normal data cables together, and there are only on the order of 100 "neurons" there.

What you say is theoretically possible if the neurons weren't living cells and humans had the technology to reconstruct the brain's wirings. Your body isn't going to figure out which "wire" connects to which on its own.
The first option ins completely unreadable to me. I cannot imagine that ever scaling well.

The second option, as I have stated many times in this thread, is far preferable to null. Java does not support it but when it does I will like it.

"* No null check, no loops, just very simple easy-to-read bulletproof code. This code cannot generate a NPE at all, ever.*"

The NPE isn't the illness, it's the symptom. It's the symptom of a far larger problem in your program: unhandled or otherwise unexpected state. That's why I like the match example. It forces you to expect all of the states of your program. The first example does neither. It hides flow and operation in a single (ever-expanding) line. Far from ideal in any case in my book.

As soon as Match is supported in Java I'll change my opinion. Until then I'm stuck. You get nothing better from the Java version in terms of readability.
> That's also the logic of the "war on drugs".

The war on drugs isn't a failure because it failed to reduce drug use. It probably has a bit. The failure is that it did so only at the cost of massively increased violence, the erosion of civil liberties, mass incarceration and the debasement of the criminal justice system.

Do you predict lobbying cartels turning to violence to protect their business and so many citizens charged with breaking the law that it debases the justice system?

> It may or may not work in this case -- I don't know -- but it will definitely make lobbying less documented and regulated.

It's not as though there are currently such rigorous and effective regulations that everyone follows.

> What are the sanctions for undocumented lobbyists going to be? How will they be enforced, when the Trump administration is so strongly biased against transparency everywhere else?

The change is to who can be a lobbyist, not in the answer to any of those questions.

> His tax returns matter as the very minimum expected gesture in transparency.

Transparency is for what government officials do in office, not what they do in their private lives.

> At present Americans have no idea what the President owns and how he makes money (or maybe he doesn't -- in which case he would have a strong incentive to use his office to prop up the failing parts of his business empire).

If what he does is good policy that happens to coincide with his business interests, that is not actually a problem. If what he does is bad policy then it's a problem independent of whether it aligns with his business interests. Because what matters is what he does in office, not what he does as a private citizen.
> We're stepping into an era of extreme inequality, authoritarianism, and intolerance

Do you have any evidence to support the same? It seems a bit like fear mongering.
This issue should be fixed as of today in 8.16.3
I think that thought experiment starts from a flawed premise. There's no starting rank for a set of Americans - different people have different starting ranks.

Obama's daughters start out well ahead of a homeless white boy, for example, and any bias that would lead to aiding Obama's daughters instead of the homeless white boy is unjust.
Google SREs are pretty good, but there is disconnect between product and sre (somewhat understandably). SREs will always take steps to mitigate issue. rolling back binaries, mlts, gdps, you name it. Sometimes, it's actually easier to fix the problem, but SRE doesn't know it. It's understandable, they manage many many projects, and they can't know all the products. It's just something i found very interesting.

Obvious PS: Google employee.
I took my Geiger counter on a flight once and took some measurements. Sort of a fun thing to have in your carry-on.

https://whatisnuclear.com/physics/radiation_on_flights.html
They have secret courts for that.
In what region are the politically-neutral companies located?
But Google both provided that cash (presumably, to it's employees as pay) and then got to decide how to spend it on political favors. And the lion's share of the donations are likely from high-level executives who have at least some stake in the company.

So, I guess, you could clarify that it's still somehow routed through an individual at some stage in the process. But that's the sort of technical trickery that is used for this corrupt behavior in the first place... which is why individual donors are required to disclose their employer. As I said, thin level of obfuscation.
Exactly. You can have as many immutable references to an object as you want, or you can have one mutable reference to it, not both. (Each of those references is how you borrow something from the real owner, hence the name.)

The borrow checker is that part of the compiler that makes sure that these borrowing rules are followed. Other rules are implemented by other parts of the compiler; the type system has the job of making sure you don't try to write to something that you only have an immutable reference to, for example.
Feature rich type systems are really great if you have a good understanding of your types. Often, you don't. One of the best parts of software is it's malleability. Pushing business logic up into types makes it less malleable.
In my opinion NDAs are worthless (in most cases) and gives a false sense of ownership protection. As far as code reviews, you absolutely should include at least one. I know of a case directly in which the outsourced developer "accidently" left their API endpoint. Had it went into production they would see all sorts of things.
The match is just my personal preference to deal with option types, because I personally think it's cleaner to read. This reduces the number of flatMap chains in my code, but again, personal preference.

Option(JavaClassFactory.staticMethodThatCanReturnNull()).map(i => i + 1).getOrElse(0)

This is a very readable function, imo, and is how 99% of Scala programmers deal with legacy Java libraries. Scala even has the Try() object, where you can do something like this:

Try(OldJavaClass.methodThatThrowsExceptions()).toOption.map(i => i + 1).getOrElse(0)

It makes creating service-layer code so much simpler because you aren't caught in that rut of "well now I have to deal with this exception at the controller level". You can head off all that garbage very quickly. I suspect that a lot of Java Optional coders will start acting like this.
That's the same approach used by the challenge's original creator (in the GitHub link above). It's a clever solution!
Have you ever been through a re-org? I've seen people get escorted at the door by security on the exact same day of the public annoucement. People who worked 15 years for the company. Also, do you know that some companies rank and keep track of their "least valuable employees"? So when the time comes there's to time to waste trying to find out about who should go and who should stay.
> These days, I'm more likely to suggest Brave over FF, if someone really requires a Chrome alternative.

Brave is just a reskinned Chrome.

> We [web developers] owe a lot to FF, Firebug, etc, but the writings on the wall for mobile and desktop.

Where I work developers have mostly switched to Firefox over the last few years. Firefox is just a better browser (faster, less bloated) under the hood. Yes, Firefox will have a difficult time sine they don't have their own proprietary walled-garden ecosystem as a distribution channel, but the technical product is solid.
There is no evidence, at least not for such a general claim. Each human has a wildly different experience. For many of us, we never left this era. For others, we have been out of it X years. Etc.
Yep, the Warden Diamond has been verified (https://en.wikipedia.org/wiki/Four_Lords_of_the_Diamond)! Very imaginative and gripping series that I totally recommend.
So maybe they ought to be anonymous: http://www.cryptohippie.net/AnonAdmin.html
> Both parties shat all over him during his entire campaign, so he owes them not just nothing, but less than nothing, hence the promise to institute the congressional term limits and anti-lobbying laws.

How will he pass laws without the support of at least 50% of Congress?
For Data Privacy Day, Play Privacy as a Team Sport
Personally Ive always thought it's because it's devoid of external sensory inputs other than white noise. The mind is able to think for itself rather than respond to the world.
As it happens, you did not read the article. If you did, you'd see that "Google will not display ads from lenders who charge annual interest rates of 36 percent or more in the United States."

And the parent post is talking about loans with 35% APR still being quite predatory.

[1]Non-AMP link: https://www.washingtonpost.com/news/the-switch/wp/2016/05/11...
I want his tax returns so we can get some clue as to whether his obsession with Russia is a childish crush on authoritarian bullies, which is a theme of his, or whether in fact there is a financial connection.

I want his tax returns to find out just how badly he's been lying about his net worth.

I want his tax returns because I honestly believe he'll be humiliated by us seeing them.
That's true.

http://www.economist.com/node/1897472

"Initiatives are also responsible for another feature that makes the Assembly unworkable: term limits. These may sometimes be desirable but in California they are simply too short. Proposition 140 set them at six years for Assembly members, eight for state senators.

"As a result, representatives do not have a good grasp of the details of bills, have little long-term loyalty to the institution they serve and can sometimes be unduly influenced by more experienced lobbyists. No sooner do people become head of the assembly, or of an important committee, than they are term-limited out. Legislative leadership becomes almost impossible."
I'm a little unclear - does Duplicity run on macOS?
Clojurescript is the most complete to JS languange. The build and developer tools are _ahead_ of Javascript. The language is great too, and it's pretty 1:1 with javascript, plus all the other goodies. It's not going to satisfy haskellers, but when you look at the big picture it wins over Elm (at the moment, I love Elm too)
But how do you deal with politics? Ambitious or egotistical or just assholes like to take advantage of slow people, right? I tend to get paranoid that these people will appear when I'm taking mine time to understand.
"We"? Is Tarsnap no longer just you?
Robot mechanic simulator
I think Production Engineering is especially interesting to me as I think we do a very good job of lowering the wall between ops and dev, mostly we build tools and do evangelism to help SWEs own their own services, but above all we do whatever is necessary to keep the site up in the most scalable way we possibly can. This includes engaging with our product engineers, not just infrastructure, and helping them understand the impact of product on infra and vice versa. That's one thing I especially like about PE, there is very little of the ops/dev divide, it's more of a partnership with PE and SWE both helping to own the service in production. (disclosure, I work at FB as a PE)
How much data are you trying to store?
End to end encryption wouldn't change this NSL at all. It isn't asking for content, which is the only thing that E2E encryption would affect.
Fold is incredibly important. You should learn it. https://en.wikipedia.org/wiki/Fold_(higher-order_function)

In Scala, the debate between using fold on an Option or using map and getOrElse is almost as old as the language. The method signature for this is:

def fold[B](ifEmpty: => B)(f: (A) => B): B

That is to say, fold always returns type B, and takes two arguments. The first takes a function returning type B if the option is "empty" (None) and the second takes a function that is called with the contents of the Some. As you can see, it's syntactic sugar for map and getOrElse.

def map[B](f: (A) => B): B

def getOrElse[B](f: => B): B
"So Firefox proceeds to use AVX on a CPU that has no AVX support". To make it clear; it uses AVX on a CPU that does support it (otherwise you'd run into an illegal instruction error), but the OS doesn't. Firefox doesn't know this, however, because it thinks the OS set the bit that says it does.
vimfx is the closest replacement at this moment in time.
That's fantastic if that's the truth. I'm not sure how you deal with this. Big corps have many subnets so you need a reliable way to figure out who's link-local.

Octoshape really was a disaster. During a major news event, many hundreds of employees could be live-streaming CNN and the effect was catastrophic.
That's exactly what I do everytime I buy a new iPhone! I pause for an hour and read the documentation before jumping right into it!

Wait a minute... does it come with a docunentation? Hell no - like any other piece of code you come across at work. Who writes documentations anymore???
It's harder now, because any developer can make a fancy framework, draw some graphics, make a website, find a domain (on the .io TLD!) noone else has thought of yet, and look as good as (or better than) multimillion dollar companies. Anybody can compete now. And so, for the sake of landing a job, or networking/personal publicity, or even just for the experience, people do.

The problem is, frameworks and libraries a) are both easy and fun to write, b) are really hard to comprehensively test with full architectural coverage, and c) suggest some form of standardized behavior. While (b) creates technical debt, the main issue is (c) vs (a): we're flooded with "do it this way!" from a thousand groups, even in situations where the developer(s) didn't really intend for that to be their predominant statement.

With all this noise and chaos, it almost feels awkward to stick to old, icky, widely-hated legacy standards in the face of all this innovation. Or at least that's what it's felt like to me. Objectively thinking about it and comparing everything, though, nothing's perfect, but what's been around for a while has the combined benefit of a) having a fairly widespread mindshare, and b) having known solution patterns for a wide range of issues.

I guess what I'm trying to say is that building software on top of tried-and-tested methodologies is likely to produce long-lived results (which is fairly logical).

I'm also reminded of http://qdb.us/53151 :D

- I say "or better than" because large corporations often have standardized internal Web style guidelines and rendering toolkits/templating engines, and making sweeping changes in those is harder than for websites that are little more than a landing page and some documentation - so the bigger an enterprise is, the likelier it is that its website might look mildly dated.
Understood. The article likely is substantially the same as the Techspot piece that was submitted earlier. (They're both cribbing from the same PC World article: http://www.pcworld.com/article/3162084/storage/seagates-road...) As there's already over 100 comments on the other submissions, the "dupe" is a pointer to the earlier discussion. While not a link to exactly the same article, using "dupe" to indicate this is not uncommon here on HN.
They are as secure as the words on that page that they wrote the security on. Can you really trust it?
most of those will end up with webextension versions. I don't know what they all do, so i can't say all.

I do know that ones like ghostery and lastpass have financial incentives, while others (like vimfx) are already planning on it. Others don't seem to rely on many (if at all) XUL/XPCOM features
Looks great at first glance. A strict or title only search would be nice, I searched for Scala and the first 5 jobs I checked out didn't list Scala anywhere, not even keywords or tiny fine print at the bottom.
Hi Colin, what would you say is the strongest argument in favour of Tarsnap over Arq?

(As an aside: I've been following your work for the past four years - as someone who is quite passionate about infosec, I'd like to thank you deeply for your contributions to the community.)
Because python 3 made hundreds of small changes here and there. Supporting them all would not be possible. The problem is not speed and memory, but complexity of the interpreter.
I legit just physically disconnect the drives with other operating systems while installing Windows in dual boot situations. Can't break what isn't there!
I have never had this problem with chrome.
I read a bit of this during the election cycle but must have got sidetracked. I read through the whole piece just now and I am really impressed by its depth and subtle humor. It's lengthy but I really recommend it.
Here’s how to Get 100k email subscribers
Excellent question... does anyone know?
Laws make corporations accountable. Social "progress" is (should be) not the domain of the government but of everyone.
>but in the lead up to the election, Nate Silver got a lot wrong about Trump. He even had to write a mea culpa about it.

That was for the Republican primary.
I think it’s more like, we had an era where we conflated things like independence, security, knowledge, and diversity with prosperity, and now we are seeing signs that those things were marketing slogans. Thus the new era looks bleak.
Jesus from the rest of the comments, you'd think Mozilla was removing the XUL interface just to spite people. It's being removed because it's incompatible with making Firefox multi-process and sandboxed. Firefox is literally the only major browser that hasn't moved to a multi-process and sandboxed model yet, and it shows hard in performance and in security vulnerabilities. I'm very excited to see Firefox finally catch up.
Evolution of a Python Programmer.py (humor)
Got a link to the mentioned ad serving diagram?
I was all excited to make my first multi-billion dollar acquisition when suddenly a project showed profits of $NaN, an error that cascaded through the interface, eventually turning nearly all values to NaN. The board became very upset about our profits of $NaN.