skysight-inc/HackerNews huggingface dataset:
Goto is heavily used to return early, by jumping to the cleanup section at the bottom of the function. Otherwise, you have to repeat the cleanup code at each exit point, or use the dreaded pyramid of doom where each failure point introduces another indent level, which is what the author here is trying to avoid in the first place.
There is NO ads. So there is nothing terribly annoying.

Why your comment on buying a subscription for something without ads does NOT make any sense?
Allocating healthcare resources is numbers, and there is nothing wrong with that. If you want to decrease costs, then increase the supply of healthcare. Healthcare = doctors + medicines + equipment, so all you need to do is increase that supply. However, you’ll find that the doctors don’t want to increase their supply and they’re very effective. Drug manufacturers also don’t want to increase supply, and they’re also very effective.
If something is truly exceptional, this is a particularly good use for Debug.Assert. You have it fail in debug mode to help catch edge-cases but pass but returning early production (which may be more performant or otherwise wanted instead of throwing an exception).
Big blocks of if/else logic impose a heavy cognitive load. I find that anytime your eyes have to jump more than a few lines there's higher mental overhead
> single exit point rule,

What makes it a "rule" or as sometimes said, a "law"?

It's just a style, and it has pros and cons, cases where it helps, and cases where it hinders.
> laws that govern the number of pharmacies by number of inhabitants and disallow ownership of multiple pharmacies or ownership by non-pharmacists

While that seems a bit over the top, I find the part where it must be owned by a pharmacist quite reasonable. It's the same in Germany.
>However, OEM computer manufacturers are a whole different story altogether. This is where AMD might get hurt by GPP. You see, GPP doesn't only apply to AIB manufacturers, it also applies to OEMs such as Dell, Apple, Lenovo or HP.

Perhaps in theory (emphasis on the perhaps, IANAL and neither is the author), but not in practice. Nvidia has a great deal of power over ATI, Asus etc. They have no power over Dell, much less Apple. Nvidia needs Dell and Apple far, far more than Dell or Apple needs Nvidia (they don't).

Nvidia and AMD are selling, if not identical products, then near enough for government work. If Dell decided to drop Nvidia from all their product lines, the impact on Dell would be negligible at worst, but it would be a catastrophe for Nvidia (while AMD would be making out like Scrooge McDuck). Apple? Nvidia sends Apple the corporate equivalent of drunken post-breakup apology voicemails (releasing Mac drivers for cards that aren't offered on Macs).

Nvidia's ability to enforce branding guidelines on Dell is nil. If Dell decided they'd rather brand "Nvidia" cards as "Dell GraphicsMaster 6000 SUX," Nvidia would have to roll with it.
my 2cents: to use this strategy, don't forget to have an iron-clad pre-nup, first.
A longer essay on similar issues:

http://www.anthonysteele.co.uk/TheSingleReturnLaw
Windows data recovery
i was creating a windows 10 usb to install win 10 on my other pc when selected my hard drive instead of usb ( i know i am an idiot). i didn't realize this until it ended and i sw my usb was untouched while hard drive now was renamed ad now 32 gb. (it is actually 300 gb) the rest of the hard drive is now unallocated space. this hard drive contains very important phd files

Windows File Recovery Tool is capable to recover network drive, flash drive or local hard drive. Even, Window File Recovery Tool provides option to recover all the deleted items on the original destination. File Recovery Tool is compatible to Windows 10, Windows 8, Windows 7, Vista, Windows Server 2008, Windows Xp, and Windows Server 2003. So enjoy free trial version first.

Know More Detail ;- http://www.filesrecoverytool.com/
How do I choose not to share my Whatsapp account information with Facebook?
The physical U2F key protects you against phishing, which is important, but that's pretty much it.
A Critique of “Enlightenment Now”: When Truth and Reason Are No Longer Enough
I don't see the slippery slope, but I agree that the main problem is that we use to blame someone in case of the accident and with an autonomous car we don't have anyone to blame.

Anyway, there are already a lot of software in cars (and other applications) that can cause deaths. In particular the airbags have a complex heuristic that when it is wrong can kill someone. From https://en.wikipedia.org/wiki/Airbag#Operation

> From 1990 to 2000, the United States National Highway Traffic Safety Administration identified 175 fatalities caused by air bags. Most of these (104) have been children, while the rest were adults. About 3.3 million air bag deployments have occurred during that interval, and the agency estimates more than 6,377 lives saved and countless injuries prevented.
The title is misleading. It really isn't about Linus' memories of days before "Open Source" so much as trying to figure out who coined the term.
I worked in a shop that lived by "use your judgement", and it was really the cleanest body of code that I've ever worked in with more than 30 people, in 20 years of professional coding.

Why? Because people with bad judgement were mercilessly brow-beaten into developing better judgement.

We had lots of different styles of code hanging around, and you could tell if code had been written by our CTO, our leads, different guys in different teams, etc. The one rule was "write like a chameleon, and make your code look like the code it is in." (okay... to make that work, the other was "spaces, not tabs")

The code was generally very readable, and it was a very adult codebase. The problem with hard rules is that comprehensive codification of complete rulesets is fundamentally intractable. You're always going to run into areas that don't fit, or the ruleset will be laughably overwrought (and, thus, impossible to put into practice).

You could call it the code-zealot incompleteness theorem...

Of course, if I get to make all the rules and have no obligation to be complete, consistent, or considerate, I can get on board with this plan.
Google could not be more confusing. I spend 10 hours a day on the computer, and I will avoid Google stuff because it’s just not worth the time it takes to educate yourself about their nonsense, so I wouldn’t expect anyone less tech savvy to want to bother with them either.
Live TV Archives – Page 2 of 3 – Wiki Media Pakistan News and Live TV
It depends! But it depends on the actual meaning of the code, so examples which use meaningless identifiers like `doStuff()` miss the distinction.

If the conditions are semantically symmetrical, if/else is the right approach:

fun max(a, b) {
if a > b { a } else { b }
}

But is it a precondition which causes you to skip the primary logic of the function, then get it out of the way early:

fun max(a, b) {
// special case for null
if a==null or b==null { null }

if a > b { a } else { b }
}

Yeah we want to reduce indentation, but not at the cost of making the code overall harder to follow. The logic of "max" is much clearly expressed as a single expression with `else`.
My politics already are not consistent with Google paying the bills for the Alex Jones content.

I wish no advertisers then Google boot it. You are a private organization so you have zero reason you need to follow freedom of speech.

Google has the most valuable data there is with search data so there is no value in profiles. Google is doing it as they think it is the right thing to do but that is flawed, IMO. Just get rid of it.

https://www.youtube.com/watch?v=TS2der4Ag_s
> Which people do this?

The ones that don't use man pages themselves, obviously.

> Why do they do this?

They couldn't fathom that there are people who are working mainly in terminal
and don't want to leave it for reading the docs of every single tool they use.

> Am I missing something amazing by tying myself to man pages as the first line of documentation?

No, not really.

> Are man pages that hard to write?

Not harder than any other form of documentation, but an author needs to
actually consider writing one, while HTML is a default form.

What projects exactly you have in mind when ranting about crippled man pages?
It's called hate here, when for example a person regards homosexuality as immoral and opposes gay marriage. I've rarely heard anyone publicly claim that such people just have different social standards, or if they do, they are vilified for defending hate.

Any time in history when one group has been oppressed by another, it's been considered normal by majority social standards of the time. When those standards change, discord and sometimes even war is the result.
Dark Patterns, the Ratchet
"or if they are a custom ROM user (such as with LineageOS 15.1) then they will need to enter their Android ID at this page in order to be white-listed."
How about no?

Thank God I left the Google Ecosystem completely on my now years old and trusty OnePlus One, awesome battery life and all with no google play service alive.

I understand and share the wish to combat fragmentation in the Android experience, it can indeed be daunting for newcomers. Treble was a great step in the right direction, but this is not.
Where is the spirit of free customization?
Android is not Google, their grasp on OEMs seems disproportionately dangerous.
This news comes in the wake of Nvidia using their monopolistic position and screwing Graphics card OEMs into a one-sided agreement to serve only them and not to align their Gamerbrands with "competitors".
So an OEM that does not bend over to Google's rules will get a user experience, where Users have to jump through white listing hoops.

I scramble to see the good intentions here.
If I have a choice of using if (err) or if (!err) I'm going to use if (err) to avoid the negation. Same conclusion ultimately, but for a different reason. Bit of a discussion about it here: https://softwareengineering.stackexchange.com/questions/3504...
I can honestly say I've never noticed an unobtrusive Intercom implementation.
Watch a giant industrial drone de-ice a huge wind turbine
Privacy International's history with web site security and what they do now
If you have international family/friends, WhatsApp is the most ubiquitous and easy to use option I’ve come across.
So as far as I understand, films submitted to the Cannes film festival must have a theatrical release in France, and then French law forbids streaming for 36 months after the theatrical release.

I don't see why Netflix doesn't just submit a few of its own movies to Cannes, then does a token theatrical release in one cinema in France somewhere (to abide by the letter of the law), then prominently displays the movie in the streaming catalog. But when a French person selects the movie, it just says: "This movie is not available before $long_away_date because of $stupid_french_law. By the way, this is the phone number of your representative. Just saying."
I have mine stored in 1Password, I then copy them over to ~/.ssh on my encrypted laptop.
It's not ideal but it works (for now).
Watch This Lifelike Robot Fish Swim Through the Ocean
>"Will it? I don't see why not. Companies don't care about user privacy."

Except they do care about their associations and brand management:

'At least three companies -- Sonos, Commerzbank (CRZBF) and Mozilla -- have pulled advertisements off Facebook after a data scandal engulfed the social network. Others are asking tough questions.

Unilever, which owns brands including Dove, Lipton, and Ben & Jerry's, issued a forceful warning to the platforms in February, saying they had become a "swamp" of fake news, racism, sexism and extremism.

"We cannot continue to prop up a digital supply chain which at times is little better than a swamp in terms of its transparency," said Unilever marketing boss Keith Weed'[1]

[1] http://money.cnn.com/2018/03/23/technology/advertisers-faceb...
Python Development: Benefits and Features
Show HN: Capsulelink – Group, save and send links as one
WhatsApp sends the most important one, your social graph aka contact list and how often and when you interact with whom. I also assume the content of the messages you send and receive can be read and monitored.
Yeah, I'm the first to acknowledge that most p2p social $things are doomed from the start and of the rest, only very few stand an actual chance. Twister has been in beta since it featured here on HN in december 2015 (?) but it has been usable the entire time, actually.

I chose twister as an example because its decentralization contrasts nicely/clearly with the federation being discussed in the parent.
Plasma Mobile on open devices
"cleanup section at the bottom of the function" is pretty rare in JavaScript, which is what the original blog post is discussing. Same with Java, C#, Ruby etc.

No, it doesn't play well with early return, so avoid mixing them.
If you didn't restart Firefox again there should be a backup of opened tabs saved in your profile folder!
Capsulelink is a simple web application that lets you add multiple links and send or save them as one.

Also, there are private links for registered users.

Private links are only visible to the user who created them.

Links created by anonymous users (users who are not logged in) expire after 48h, while the links of registered users don't expire.

I would love to hear your opinions and suggestions on this, and what I could improve.
Put an Electronic Genius to Work (1979)
Situs Bandar Q Online Uang Asli Terpercaya Tahun 2018
I wonder if one could couple it to Swift.
We do the alignment too, yes.
No point swapping Facebook for another advertising-driven social network in the same vein. If a company like Apple were running it and people were paying for it, that would be a different matter.

Google have contributed to privacy issues, e.g. with poor permission management.
Why aren’t any blossoms shown in Hokkaido?
Oh gosh yes. If I had a dollar for every time someone forgot a break statement in a "Found item in loop" scenario...
I didn't want to seem too promotional but sure.

The article: http://growista.com/viral-posts-new-research/

Forbes mention: https://www.forbes.com/sites/cherylsnappconner/2018/02/19/by...

Another media placement: https://www.marketingprofs.com/charts/2018/33655/what-goes-v...

I used python and matplotlib to do the research on data I got from buzzsumo.com
> I mean, why would you want only one return even?

Some other comments here discuss resource cleanup issues that can creep into C code with early return.

If you're not coding in C, then more likely it's pure cargo-cult.
This one reason is somewhat OK, but note that these "nice stack traces" are
not really that useful in functional languages (Erlang being a prominent
example). It's a self-inflicted thing that full stack traces are that useful
in Python.
JPMorgan Brings Amazon’s Alexa to Wall Street Trading Floors
I was made to have only one exit point for some projects and it drove me up the wall. It only really makes sense if you're coding in languages like C. I don't like functions written this way because they're longer, are harder to read, have complex nesting and most of all they introduce state (the variable that stores the result). In dynamic languages, you're not going to get warned if you forget to set the result variable and if you forget the variable can be returned as a null which is a horrible source of bugs.
On that note, the Facebook stock is marked as a definite "buy". If you see the stock price movement, it's been a boon since 2013. Depending how you see this FB fiasco, it is both a PR disaster, and a great opportunity to "BUY" Facebook stock.

I believe that Zuckerberg will patch-up this mess (for now) and the investors just managed to buy something for 10% cheaper. There is a rule in forex trading: most events' results last 4 days. Perhaps for FB it will last a bit more. But when it comes to stock that's a different game. FB can make the comeback of this 10% in a couple months (tops) and continue being profitable.

Check stock price since 2013. FB stock definitely to continue performing similarly.

[1]: https://www.tradingview.com/chart/FB/r2H0bemr-FB-Facebook-Li...
Exactly this. Anyone who put their shoe in functional programming can make such a distinction.

Early returns are not a panacea. If/Else-everything is not a silver bullet either.
Stack traces are not a very good argument. As a general rule, you should write your programs to be flawless. Only if you are unsure about a particular piece of code, then can you manually add debugging information, at your own expense.
But that's the issue. If someone simply sees homosexuality as a something that isn't "approved by God" or something of that nature, and they in their minds are just going along with God's law, are they really hating something? I've heard many anti-gay marriage people say that they have no problem with gay people but that they just oppose gay marriage.

Is that cognitive dissonance? Almost certainly, but is it hate? I don't think so.

We throw around the word "hate" too much and doing so loses a lot of the nuance bound up in human attitudes.
True, but one of them is unfortunately common. Some people desperately want to change their harmful behaviors and just can't. I know someone who just had their teeth removed after 30+ years of an eating disorder (acid destroys teeth over time).
I was more or less required to use guard clauses by my manager at my previous job.

I used to hate being forced to use them, just because as a recent computer science graduate I was happy with nested conditionals everywhere. But guard clauses make life so much easier, I eventually discovered.

They make testing your code a lot easier, and also make reasoning about the code and reading it so much easier.

Ruby makes writing methods with guard clauses a breeze, since you can just write something like `return if x > 7`.
The functional style that you show certainly has multiple points where a value is returned, so you could call it "early return"; even if as a syntactic shorthand the keyword "return" is omitted. This is common across a lot of functional languages.
You could still write it as

fun max(a, b) {
if a > b {
return a
}
return b
}

Not saying this is necessarily better or worse. The point I want to make is that your case isn’t special.
Show HN: My opensource React-Native-TypeScript 2D game – welcoming critique
JavaScript has the guard operator. It can really clean up your control flow when you know it's a guard operator and not just logical AND.
To talk about one is to talk about the other. Bad policy is the reason we are having this conversation.
In Ruby these are idiomatic enough to have a name and are built into the linter, so it'll yell at you if it sees that you're not using guard clauses.

As a further refinement, I will often take tricky conditional logic and put them into a method that consists of nothing but guard clauses and a return true or false at the bottom of the method. In Ruby you can use ? and ! at the end of method names, so I'll give the method an intention-revealing question-mark name. "Order.used_credit_card?"

I use this in Javascript whenever I can too, though of course it's not as semantically nice as Ruby.
If you just want to try out the game without interacting with the repository, you can download it in the Expo Client via the URL:
https://exp.host/@bottledlogic/the-box
"Without permission." Translated: our lawyers say that some part of the 50-page user agreement you clicked can be interpreted in a way that technically allows us to do this.
Am I the only one who found the referenced essay by Isaac Asimov on creativity much more interesting than the article? It seems like that essay deserves a HN thread of its own!
An amazing amount of people forget what this was like and think that we've always had "open source", whatever it was called. Many will vehemently argue against the OSI definition of open source, despite them coining the term, because they're very convinced that everyone knew what open source was in 1995 and everyone used it since at least 1970.

It's important to remember this history. In a way, free software (or open source) was the only way to originally do software. You bought a machine, and the manufacturer would just give you the source code, because how could you operate the machine otherwise? People didn't even think software was copyrightable at first.

Whenever you have old people like rms mourning about the current state of software, that's because they remember what it was like when all software was free. This happened, and remembering the origins of the term "open source" is a way to memorialise that.

http://jordi.inversethought.com/blog/5-things-we-have-forgot...
1. This is common in Go;
2. It is not about saving lines or curly braces. It is about the flow of code, and branching away when expectations are violated. It is about helping readers of code establish a mental model of the intentions of code.
Aha, yes that does make hundreds seem absurd.
Some of the places I interviewed gave gift cards between 100-200 bucks + expenses.
> I was made to have only one exit point for some projects

Did they give any rationale for this?
As much as I prefer real native applications and like hating on electron, I have to give it some credit. It is not just chromium, it is chromium+nodejs and all the stuff that comes with it.

The answer to "would it be feasible/easy to port an Electron app to a pure browser app" is no. Unless all of the communication between the frontend part and the native tooling is done via sockets.

I agree that native apps should be sandboxed, however sandboxing something like an IDE will be quite difficult. Even Apple does not sandbox Xcode.
"Unless he is certain of doing as well, he will probably do best to follow the rules." - Guy who wrote the rule book

A better way of saying it might be: If you don't understand why the rule exists and don't have time to learn, follow the rule. When you follow the rule you may discover why it exists, when you don't follow the rule you will almost certainly discover why it exists.
How were people supposed to find about your domain name and website? How would you reach those who changed emails?

How does lack of domain and website cheapens relationships?
From when Zuckerberg was 19:

A normal person's prefrontal cortex (rational brain) is underdeveloped at that age, and is only fully developed at about 25 or even 30 [1].

I had more to say about this a few days ago [2], as did dang [3].

[1] https://mentalhealthdaily.com/2015/02/18/at-what-age-is-the-...

[2] https://news.ycombinator.com/item?id=16661868

[3] https://news.ycombinator.com/item?id=16616988
I had to double check the function call occurred. It's not intuitive and removes braces in favor of possible side effects.
I have read somewhere else (https://softwareengineering.stackexchange.com/questions/1187...) that the "single exit" rule was not actually about having only one place where the function returns, but actually about having a single place where the function returns to.

That rule seems to have been so successful, that no modern language I know of allows (the original definition of) multiple entry or multiple return (except for exceptions).
Some people might not want giraffes allowed in movie theaters, that doesn’t mean those people hate giraffes.

Disagreeing with someone isn’t hate.