skysight-inc/HackerNews huggingface dataset:
This makes sense only when you have to have an explicit return point. In languages that return the last expression, I find it much more palatable to represent your conditions as top-level if expression.

A conversion of the base example would be:

function () {
if () {
x
} else {
if () {
y
} else {
z
}
}
}

Granted it's also worth noting in such a language I rarely find myself using `if` and `else`. More likely I'm doing flow control based on `map` and some version of `getOrElse` (Scala's term for Option that allows you to return an existing value or alternate to a nonexistent value). These abstractions tend to compose better, and lead to more clarity as to what particular data item is leading to the value being one thing or another; e.g.:

function() {
requestValue orElse sessionValue getOrElse defaultValue
}

If requestValue is defined, return it; otherwise, if sessionValue is defined, return it; otherwise, return defaultValue. While not all conditions are immediately expressed this way, many of them can be simplified to data flow decisions that can be expressed this way, and the exercise of reworking the solution to use this strategy clarifies the surrounding program as well.
I think that these (the various business ideas mentioned in this article) are getting rather inventive!
Not a C-programmer at all but I would separate out the resource creation/access from acting on the resource. So Open X, Do Y on X, Close X would have do Y on X in a separate function and possibly Open X and Close X as well. This way Close X would be executed regardless of the result of Do Y on X.

Only by doing multiple things in one function you really need to use goto's in C. (again, as far I can judge coding in C, not an expert!)
https://keeweb.info/

is based on Keepass. Looks a bit more modern.
It's absolutely a false dichotomy. I have wanted DRM-free digital copies of movies that I paid to see in theaters and paid to get the DVD. Where can I get a DRM-free copy? Illegally. I would pay for it, but it's not for sale. Many statutes of limitations ago, I pirated a lot of music that I would never have paid for otherwise. I actually went and bought a lot of it on CD because I discovered I liked it and wanted to own the original CD. In my case, piracy has caused no loss to movie studios because I've never pirated a movie when I had the faintest option of buying it legally, and was a net gain to record labels because I've bought music I wouldn't have even discovered without piracy. I'm sure the odd thing has slipped through that maybe I would have discovered and bought through some other channel eventually, and not everyone does this maybe, but I agree with you that the calculations are way off and presume too much.
It's not "religion" if there's a technical reason to choose one method over another.

A later comment on the SO post described how K&R can have maintenance costs because when moving things around it's more difficult to tell where a statement ends, and can accidentally cause side effects.
> So yeh, why only one return !?

Because it was a good idea in C.

it's pretty much irrelevant to Java, JavaScript, C#, Ruby, Python, Rust etc.

But the rules stay, for no good reason.
I'm pretty happy with the strong confidentiality guarantees offered by TLS 1.3, and a finished standard is better than more draft and committee turns, but I think the simple use case of securely accessing "public" information with 0-RTT seems to be left out.

Or simply serving static content faster would have been a nice few percentage efficiency gain.
Even the raspberry Pi Zero and Zero W are supported in the latest kernels, and those were the latest Pi boards until the B+ came out.
THREAT TO 'SHOOT UP a SCHOOL' CAUSES SHELTER-IN-PLACE IN SAN MATEO, CA
You'd have to adjust both brightness and white balance based on the environment (just like a camera. How well do professionals trust the camera's automatic choices?) and probably the environment behind the screen (the rest of the user's field of view).

And then you'd probably need to throw in an adjustment for the individual user's light sensitivity needs and preferences, and possibly the user's current eye dilation (did I just go from bright light into a dark room? Or did I just wake up in the dark room?)

You can design for an ideal environment, but realize that users will not always (ever?) be in that ideal.
You want to write "cat" equivalent. How do you do the loop?

I think for loops should be limited to iteration over collections, or repeating sth known number of times.

There are cases when you need to decide if you want to continue iteration on the fly, and while loop is the perfect tool for that. Also while loop is arguably less error-prone than for loop: can't swap clauses because there's just one, can't write "," instead of ";" by mistake.
Yes!

And we hope that you are angry about it and that you will talk badly about us and recommend a different hoster to everyone.

That way, there will be more people knowing about Devuan, which is our primary goal and the reason why we launched devuanhosting.com.
Is KaTeX Ready for Prime Time? You Be the Judge
The irony is that Python actually has open-braces, but they're spelled ":" instead of "{". And the syntax effectively enforces K&R style.

When I write Python I end every block with a "pass" statement so that emacs can auto-indent my code properly. The "pass" statement thus effectively becomes a close-brace. It drives Pythonistas into conniptions, but I never have to worry about reverse-engineering a block of code to figure out how to restore the proper block boundaries after a cut-and-paste has screwed up the indentation.
Titanium production price halved and much, much faster
> Very unlike social platforms

a social media platform that can be used to organize and manipulate hundreds of millions of people globally is far more dangerous than any airplane.
That is the whole issue, using one source for news when knowing any source has a percent of bias. Only way around the issue to keep an open mind and actually view new sources that you might or might not like to get a whole picture.

Don't like CNN nor FOX but still skim them for news, articles not TV nor videos.
As an aspiring SaaS founder, I was surprised how hard email marketing (EM) is.

My questions so far:
1/ ROI - how much of a difference can good EM make as opposed to bad EM or no EM? Should I not rather focus on improving my product?
2/ What is the low hanging fruit?
3/ What are some of the tools I should be using? If my payment management is in Strip, how do I integrate it with the CRM? [answer: https://stripe.com/works-with/categories/crm]
Some data is not suited to go through asynchronous streams with a lot of parsing. At some point I needed to pass real-time eeg data to an application and we were exploring Cordova as an option. The jitter and absurd latency (over 15ms) was a non-starter. Things might have gone better but not everything can be solved by immutable data structures.

For comparison, the same data transfer using Electron native plugin took well under 1ms.
I don't believe Section 230 is a sufficient defense here. If you have a site that is used for a lot of things but has the occasional bad actor, then Section 230 means that bad actor is the legal publisher of the content, not the site.

Megaupload, though, was not that. They paid people who uploaded popular content, which was of course mostly other people's property. They they sold ads against it. If you look at the structure of the business and compare it with a a real cloud storage provider, it's pretty obvious they are no Dropbox:

https://www.docketalarm.com/cases/Virginia_Eastern_District_...

The indictment has a clear claim that Section 230 doesn't apply, as well as a lot of detail. Dotcom was pretty clearly running a criminal conspiracy, and just thought he was clever enough to avoid getting arrested for it. Had he stayed small, he might have managed.
I think comparing it to emacs is kind of missing the point; Oni is primarily targeting two groups of users: long time vim users who want to spend less time configuring plugins and who want some of the modern features that newer IDEs provide; and users of said IDEs who want to experiment with vim but find the learning curve to be a little too steep.

> Emacs has several snippet/templating options, and of course it also has several autocomplete options.

So does vanilla vim, and you can script vim or emacs to do _anything_, but not everybody wants to put that kind of effort into extending their text editor.

> Emacs has had a X GUI for about 25 years (and of course vim has had various GUIs, too — although I think less powerful & extensible).

That's true, and those are great bits of kit, but there's always room for something new, right? :)

> Rather than using Electron and JavaScript and Vimscript and an ancient C core...

Oni is built on top of neovim, which is a modern C core and very nice from what I've heard. :) Also, I don't think Oni would be as far along as it is today if the creator had used native languages and frameworks; at least it wouldn't be available on my mac because IIRC he is primarily a windows user. :D
Closed platforms recreate all previously-solved problems, too, usually requiring you to wait for the gatekeeper to get around to offering a solution.

We have ways to track contacts, organize E-mail threads, view restaurant web sites, etc. and all those tools are uninvented when the data is only visible through Facebook. Even when Facebook graciously permits you to keep using one of your tools (like a web browser), it’s still effectively broken until you log in.

I find a silver lining in this by making it as friction-full as possible for me to view Facebook content. For example, having to unblock domains and log in every time (never saving passwords, etc.). It works: it makes me consider whether or not I really want to spend time viewing whatever silly video/rant/whatever I initially thought was interesting. And of course then I am not sucked into an hour of grazing the rest of the feed.
And to be fair, Facebook was one of the first companies 10 years ago already that offered their terms in standard legalise as well as translated into common people speak!

They have done great things in that regard by pushing the whole industry forward
> (very large) side projects

How big once you remove all the extra newlines?
German cartel office investigates Facebook's use of data from partner websites
This is attempting to fix something that is already fixed.

Morally I want to pay for everything I use. I music production I own a license for everything I use or demo. It is very simple to pirate plugins (Kayne West pirated DeadMau5's Serum plugin) https://www.billboard.com/articles/news/dance/6897291/deadma...

In the past it was impossible to pay for content and the only place it was available was on torrents. It wasn't available and now people just pay for streaming services because it is available. Also it is just easier to use streaming services.
I'll be flipping the point around by saying that if you are concerned about vertical whitespace reduction, you should probably look at the granularity of your files (debatable based on programming environment). Also we could be catering to the lowest common denominator by worrying about people with untrained symmetric sensibility.
Ah, good point — I was thinking of the issues with Firefox Sync.
Let's see. The Unix indent utility was what, mid-1980s? GNU indent came out in 1989. Python was released in the mid-1980s. PEP-8 was released in 2001.

Yup, Python clearly pioneered automatic code formatting. Nobody had done it before them...
University marketing to an unaware public.

The dissertation [1] is a collection of four papers on the focused topic of heavy metal values and safety in recovery.

At least now we'll maybe have less bragging about not putting materials into landfills! [2]

[1] http://lnu.diva-portal.org/smash/record.jsf?aq2=%5B%5B%5D%5D...

[2] https://www.independent.co.uk/environment/sweden-s-recycling...
What are the odds that two pull requests get completed at the exact same time?
Pre Sale open 25% bonus
This is why I'm so sad that Elixir doesn't have a return statement.
Some believe that people who get abortions oppose the "institute" of life (since we don't know when life starts, we can't say it doesn't start before 9 months). Is it possible to oppose a practice one believes is barbaric without hating the person who is practicing it? Of course it is-- if you understand human nature. No one is their behavior-- so, the most logical thing is not to hate a person for a single element of their being. Since we can say that most people are logical, we can say that most people don't hate others on the basis of one element.
> The vast majority of my 2nd Amendment-supporting friends seem to support Trump...

That is probably because the Democratic party platform pushes strongly for gun control. [1] I know many people who vote Republican in elections primarily because of this single issue.

> ...whose authoritarian statements and actions are like nothing seen in a US President.

Could you elaborate on this? I don't think Trump is a great president by any means, and several of his speeches, interviews, and Twitter rants are not very Presidential to say the least. However, I can't think of any authoritarian actions he has taken that are outside of his Constitutionally granted powers.

[1] - https://www.democrats.org/party-platform#gun-violence
To solve this issue explained:

- No easy flow-control, fast services can produce and consume messages quickly enough to cause side effects for the slow services that are the bottlenecks and dictate overall system performance. This can cause large swings in performance as queues fill up.

What you think about using a Load balancer -> Queue -> Service? Have someone tried?
I agree with you 100%. It's all about being able to skim through code to find what you want and understand structure quickly.

Allman is great for this. Though I'm a Whitesmiths guy, myself. Still, same idea.

/36 years of commercial coding here.
Unity releases engine and editor source code through GitHub
I'm in the same boat as you. I use a unique email alias for every single sign-up, so I know who sells my email address or sends me marketing cruft accidentally. I'm very aggressive in reporting bad actors to their mail provider if they don't honor or don't have unsubscribe links.

But I think I'm the exception, not the rule, in this case.
> It's usually opt-in

> it's ticked by default and somewhat hidden above and below the ToS/EULA.

Well, yeah. The point is that it isn't really opt-in.
did this have anything to do with the bear in the ejector pod in spaceballs?
Interface Elephantiasis
I don't think you're in the minority. Whenever possible the happy path should be inside the if. The article seems to imply otherwise but on re-read I think he is just building the case for putting the simple, quick pre-condition type handling up front which generally removes the need for the if/then (which I agree with).

For complex methods with branching logic you want prominently displayed, you'd end up with:

def myfunction(args) {

// check preconditions, return early

if (x) {
// happy path
} else {
// less happy path
}

}

But if the else just contains a bunch of error handling you always have the option of wrapping it in a handler method and putting it near the top in a on-liner.
So without the extra effort of finding and unchecking the hidden checkbox, you'll receive their spam. Sounds like opt-out to me.
Pilot scheme seeks to produce first ‘ethical cobalt’ from Congo
My point is that it's on the consumers to follow the laws, but in each of those cases the companies are implicitly benefitting from mass "illegal" activity from users.
A great opportunity to move to open source. It will help you not only have more control on your assets in case of privacy and GDPR, but also avoid vendor lock-in.
Non-paywall link:

https://archive.fo/tR7Vx
Shopify's infrastructure collaboration with Google
One Percent of Reddit Users Cause 75 Percent of the Drama
I'd say the big difference with google is they can treat a social network as a loss leader. Google has other (far more profitable) forms of privacy invading revenue sources, facebook doesn't.

It's not a ideal solution however. If as a society we have decided social networks are important a not for profit, or decentralised federated scheme is probably the way to go.
Both aslo offer a very clear service, (streaming music) and both only really collect data to improve your music experience.

Facebook seems to grab whatever it can, just to make money.
Any data to back that up? Really curious.
So the 1st is bad because it makes you have to think?
Medium Is Paying Cash Bonuses to Its Top Writers
Using React, Firebase, and Ant Design to Quickly Prototype Web Applications
As a data point, I don't follow (all of) PEP-8.

But tabs vs. spaces is indeed a bad analogy, because of course it's 4 spaces. ;-P

pycodestyle, the Python style checker, has a few checks disabled by default (because there's no consensus they're good ideas), and even some mutually exclusive ones:

https://pycodestyle.readthedocs.io/en/latest/intro.html#erro...
That's a good general point, but Youtube does use MySQL:

https://www.mysql.com/customers/view/?id=750
http://highscalability.com/youtube-architecture
This is a reasonable suggestion since the code isn't too bad.

std::unique_ptr<Foo, std::function<void(Foo*)>> p(new Foo, [](Foo* p) {
if (p) destroyFoo(p);
});
// initialize Foo and set to NULL if failed

It increases complexity a bit because you no longer have a simple pointer, and you can't allocate on the stack anymore (my example should have declared `Foo foo;` with `destroyFoo(&foo)`, sorry for typo.)
Just to continue the quote from the article:

Reached for comment about this apparent conflict of interest, Coinhive replied with a highly technical response, claiming the organization is working on a fix to correct that conflict.

“We have developed Coinhive under the assumption that site keys are immutable,” Coinhive wrote in an email to KrebsOnSecurity. “This is evident by the fact that a site key can not be deleted by a user. This assumption greatly simplified our initial development. We can cache site keys on our WebSocket servers instead of reloading them from the database for every new client. We’re working on a mechanism [to] propagate the invalidation of a key to our WebSocket servers.”
Not being a pest here, but how often are you comparing more than 2 functions at a time? I can't say that I have ever dealt with code in over 20 years where I had to deal with more than 2 functions at once.

Maybe I am mentally disabled, but I can only focus on one logical task at a time. Can other programmers multi-task their coding?
Because Facebook doesn't give you what they really know.

The download-your-data feature for a time showed the truth, in 2013:
http://www.zdnet.com/article/firm-facebooks-shadow-profiles-...

So we may presume FB, especially in the US with little-to-no privacy laws against corporations, won't tell you what the really know.
It's a rhetorical shortcut.

A more complete description might be:

> The Key to this thing that is commonly assumed to be Good Luck Is actually a skill, an Open Mind which is something that can be learned.
This is my preferred git log command:

git config --global alias.lg "log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all"

Of all the git log variants that I have come across I find this one the most clean, easy to parse, and nicely formatted. I think I found it on HN somewhere. Maybe someone finds it as useful as I did
New survey finds Americans’ trust in Facebook continues to decline
Hilarious since Indian versions of Christianity have caste.
I just noticed that the blog's title is "Probably Wrong"
Hate is one of those blinding emotions/states of mind that causes people to deliberately sabotage the thing-hated. Simply opposing a practice cannot be said to be hate unless the hate is what is driving the opposition. Opposition is not sabotage, even though it may seem so to the one opposed.
Hmm I read that. And I was wondering if that meant in future that open it up.

Now I'm wondering if this is essentially doing the coding outside core firefox project with the later plan to just integrate it fully into the browser. Almost like an experimental build kind of workflow. I guess that kinda make sense.
Bitwarden is open source and you can roll your own server
Fundraiser by Save Toys“R”Us: Save Toys“R”Us
I always adapt to the style used in the project I land. I can understand people liking one over another but to reach holy wars levels of disagreement about this kind of subject is something I don't get.

Same goes to spaces vs braces, editor wars, etc.

Downside: my projects are usually a bit of a mess with mixed indentation styles :D
And the ironic cherry on top is the line right under the report “Like the FTC on Facebook.” It this a farce?
Please take note of the “experimental” label on this open source repository, which is posted to HN every few weeks. Previously:

https://news.ycombinator.com/item?id=15992762
https://news.ycombinator.com/item?id=15997239
https://news.ycombinator.com/item?id=15832879
https://news.ycombinator.com/item?id=15596740
Checked-by-default means, by definition, it is opt-out as you are opted-in by default. It just has to be possible to opt-out and, if opted-in, unsubscribe at a later date (usually a small, hard to notice link in the legalese of the spam email).
>this whole case seems to have turned him into a modern day Robin Hood.

This dude is a professional troll and you comparing him to Robin Hood means you are falling for his schtick. The most recent example of his trolling is the fact that he has become one of the biggest public supporters of the conspiracy theory that Seth Rich was behind the DNC leaks and not Russia.
I find it interesting how most of the comments about return early are based on experience.

I had the same thing happen about 10 years in. I just got sick of the extra coding and long indented blocks. And just switched over one day.

Why is this not taught from day one?
Webdash: The customizable web dashboard
If being a millionaire startup entrepreneur is something the women you're seeing care about, then you don't date these women. Also, five different men over the course of 10 days is a lot of dating. Are you sure they don't actually work for the dating site you're on (undercover)? What app did you use? Don't ever let anyone compare you to another person.
Can we use this sub thread to post our knowledge of country laws about this?

Don't worry USA you can continue on browsing ;)
It all made sense when we found out we were autistic
Presentation skills hurdles: Hurdle 2 – Habit
I think the most important part of the article: "You lose your peripheral vision the more anxious you are because your flight-or-fight mechanism creates binocular vision."

Kids growing up in chaotic situations are likely to be very anxious, and will have so much more to worry about. So I think you are right to an extent, that the real luck is growing up in a more stable situation.

What makes it worse, is that being taught how to relax in chaotic situations is so dang helpful in all areas of life, but only those given the opportunity to relax in the first place will discover that. You're otherwise stuck in a downward spiral.
This Florida City Is 100% Solar-Powered
High-energy breakfast promotes weight loss
I learned about while loops at the beginning of my career, and after a few scary errors, I never used them again. 20 years of no while loops anywhere... never going back.
Innovation doesn’t need to be disruptive to be effective